mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-20 12:55:15 +08:00
ovis: implement removeEntity method
This commit is contained in:
@@ -70,6 +70,12 @@ public:
|
|||||||
CV_WRAP virtual void createEntity(const String& name, const String& meshname,
|
CV_WRAP virtual void createEntity(const String& name, const String& meshname,
|
||||||
InputArray tvec = noArray(), InputArray rot = noArray()) = 0;
|
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
|
* convenience method to visualize a camera position
|
||||||
*
|
*
|
||||||
|
@@ -342,6 +342,13 @@ public:
|
|||||||
node->attachObject(ent);
|
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,
|
Rect2d createCameraEntity(const String& name, InputArray K, const Size& imsize, float zFar,
|
||||||
InputArray tvec, InputArray rot)
|
InputArray tvec, InputArray rot)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user