1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 11:21:39 +08:00

ovis: implement removeEntity method

This commit is contained in:
Pavel Rojtberg
2018-02-13 16:25:01 +01:00
parent faf82d8876
commit c52eed063b
2 changed files with 13 additions and 0 deletions

View File

@@ -70,6 +70,12 @@ public:
CV_WRAP virtual void createEntity(const String& name, const String& meshname,
InputArray tvec = noArray(), InputArray rot = noArray()) = 0;
/**
* remove an entity from the scene
* @param name entity name
*/
CV_WRAP virtual void removeEntity(const String& name) = 0;
/**
* convenience method to visualize a camera position
*

View File

@@ -342,6 +342,13 @@ public:
node->attachObject(ent);
}
void removeEntity(const String& name) {
SceneNode* node = _getSceneNode(sceneMgr, name);
node->getAttachedObject(name)->detachFromParent();
sceneMgr->destroyEntity(name);
sceneMgr->destroySceneNode(node);
}
Rect2d createCameraEntity(const String& name, InputArray K, const Size& imsize, float zFar,
InputArray tvec, InputArray rot)
{