Commit 62b43830 authored by Jan Möbius's avatar Jan Möbius

Added Pluginfunction for sphere

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10446 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 61bcf4d8
......@@ -73,6 +73,18 @@ bool getObject( int _identifier , SphereObject*& _object ) {
return ( _object != 0 );
}
SphereObject* sphereObject( int _objectId ) {
if ( _objectId == -1 ) {
return 0;
}
BaseObject* object = objectRoot()->childExists( _objectId );
SphereObject* sphereObject = dynamic_cast< SphereObject* >(object);
return sphereObject;
}
// ===============================================================================
// Getting data from objects and casting between them
......
......@@ -85,6 +85,13 @@ SphereNode* sphereNode( BaseObjectData* _object );
DLLEXPORT
SphereObject* sphereObject( BaseObjectData* _object );
/** \brief Get a SphereObject from id if possible
*
* @param _object If the content is a sphere, a SphereObject is returned. Otherwise a NULL pointer is returned.
*/
DLLEXPORT
SphereObject* sphereObject( int _objectId );
}
#endif // PLUGINFUNCTIONSSPHERE_HH
Markdown is supported
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