Commit 45a9c2fd authored by Jan Möbius's avatar Jan Möbius
Browse files

Conveniance plugin function

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11530 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b38b1dc8
......@@ -138,6 +138,16 @@ TriMesh* triMesh( BaseObjectData* _object ) {
return 0;
}
TriMesh* triMesh( int _identifier ) {
TriMeshObject* object = triMeshObject(_identifier);
if ( object == 0)
return 0;
else
return object->mesh();
}
TriMeshObject* triMeshObject( BaseObjectData* _object ) {
if ( _object == 0 )
return 0;
......
......@@ -130,6 +130,14 @@ bool getMesh( int _identifier , TriMesh*& _mesh );
DLLEXPORT
TriMesh* triMesh( BaseObjectData* _object );
/** \brief Get a triangle mesh from an object id.
*
* @param _identifier Identifier of the object. If its a triangle mesh, the function will return the pointer to the mesh
* otherwise 0
*/
DLLEXPORT
TriMesh* triMesh( int _identifier );
/** \brief Cast an BaseObject to a TriMeshObject if possible
*
* @param _object The object should be of type BaseDataObject. If the content is a triangle Mesh, a
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment