mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 17:25:51 +08:00
Removed duplicated code into SceneRaycaster
This commit is contained in:
parent
5df2713010
commit
083df84009
@ -228,35 +228,6 @@ int SceneRaycaster::base_id(EType type)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_RAYCAST_PICKING_DEBUG
|
|
||||||
size_t SceneRaycaster::active_beds_count() const
|
|
||||||
{
|
|
||||||
size_t count = 0;
|
|
||||||
for (const auto& item : m_bed) {
|
|
||||||
if (item->is_active()) ++count;
|
|
||||||
}
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t SceneRaycaster::active_volumes_count() const
|
|
||||||
{
|
|
||||||
size_t count = 0;
|
|
||||||
for (const auto& item : m_volumes) {
|
|
||||||
if (item->is_active()) ++count;
|
|
||||||
}
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t SceneRaycaster::active_gizmos_count() const
|
|
||||||
{
|
|
||||||
size_t count = 0;
|
|
||||||
for (const auto& item : m_gizmos) {
|
|
||||||
if (item->is_active()) ++count;
|
|
||||||
}
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
#endif // ENABLE_RAYCAST_PICKING_DEBUG
|
|
||||||
|
|
||||||
int SceneRaycaster::encode_id(EType type, int id) { return base_id(type) + id; }
|
int SceneRaycaster::encode_id(EType type, int id) { return base_id(type) + id; }
|
||||||
int SceneRaycaster::decode_id(EType type, int id) { return id - base_id(type); }
|
int SceneRaycaster::decode_id(EType type, int id) { return id - base_id(type); }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user