VOXELFORMAT: allow to get the region size of the group
parent
8cee98a8cb
commit
7dd6994b03
|
@ -93,6 +93,19 @@ const SceneGraphNode& SceneGraph::root() const {
|
|||
return node(0);
|
||||
}
|
||||
|
||||
voxel::Region SceneGraph::groupRegion() const {
|
||||
int nodeId = activeNode();
|
||||
voxel::Region region = node(nodeId).region();
|
||||
if (node(nodeId).locked()) {
|
||||
for (iterator iter = begin(SceneGraphNodeType::Model); iter != end(); ++iter) {
|
||||
if ((*iter).locked()) {
|
||||
region.accumulate((*iter).region());
|
||||
}
|
||||
}
|
||||
}
|
||||
return region;
|
||||
}
|
||||
|
||||
voxel::Region SceneGraph::region() const {
|
||||
voxel::Region r;
|
||||
bool validVolume = false;
|
||||
|
|
|
@ -42,6 +42,7 @@ public:
|
|||
* @return The full region of the whole scene
|
||||
*/
|
||||
voxel::Region region() const;
|
||||
voxel::Region groupRegion() const;
|
||||
|
||||
const core::DynamicArray<core::String> animations();
|
||||
void addAnimation(const core::String& animation);
|
||||
|
|
Loading…
Reference in New Issue