Commit 42b3d1e0 authored by Jan Möbius's avatar Jan Möbius
Browse files

Added pluginFunction

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13894 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 4adf067a
......@@ -89,7 +89,7 @@ bool getObject( int _identifier, SplatCloudObject *&_object )
//================================================================
ShaderNode *splatShaderNode( BaseObjectData *_object )
ShaderNode* splatShaderNode( BaseObjectData *_object )
{
if( !_object )
return 0;
......@@ -109,7 +109,7 @@ ShaderNode *splatShaderNode( BaseObjectData *_object )
//----------------------------------------------------------------
SplatCloudNode *splatCloudNode( BaseObjectData *_object )
SplatCloudNode* splatCloudNode( BaseObjectData *_object )
{
if( !_object )
return 0;
......@@ -129,7 +129,7 @@ SplatCloudNode *splatCloudNode( BaseObjectData *_object )
//----------------------------------------------------------------
SplatCloud *splatCloud( BaseObjectData *_object )
SplatCloud* splatCloud( BaseObjectData *_object )
{
if( !_object )
return 0;
......@@ -154,7 +154,7 @@ SplatCloud *splatCloud( BaseObjectData *_object )
//----------------------------------------------------------------
SplatCloudObject *splatCloudObject( BaseObjectData *_object )
SplatCloudObject* splatCloudObject( BaseObjectData *_object )
{
if( !_object )
return 0;
......@@ -165,6 +165,23 @@ SplatCloudObject *splatCloudObject( BaseObjectData *_object )
return dynamic_cast<SplatCloudObject *>( _object );
}
//----------------------------------------------------------------
SplatCloudObject* splatCloudObject( int _objectId ) {
if (_objectId == -1)
return 0;
BaseObject* object = objectRoot()->childExists( _objectId );
if ( object == 0 )
return 0;
SplatCloudObject* splatCloudObject = dynamic_cast< SplatCloudObject* >(object);
return splatCloudObject;
}
//================================================================
......
......@@ -88,7 +88,7 @@ bool getObject( int _identifier, SplatCloudObject *&_object );
* ShaderNode will be returned. Otherwise a NULL pointer is returned.
*/
DLLEXPORT
ShaderNode *splatShaderNode( BaseObjectData *_object );
ShaderNode* splatShaderNode( BaseObjectData *_object );
/** \brief Get a SplatCloudNode from an object.
......@@ -97,7 +97,7 @@ ShaderNode *splatShaderNode( BaseObjectData *_object );
* SplatCloudNode will be returned. Otherwise a NULL pointer is returned.
*/
DLLEXPORT
SplatCloudNode *splatCloudNode( BaseObjectData *_object );
SplatCloudNode* splatCloudNode( BaseObjectData *_object );
/** \brief Get a SplatCloud from an object.
......@@ -106,16 +106,25 @@ SplatCloudNode *splatCloudNode( BaseObjectData *_object );
* SplatCloud will be returned. Otherwise a NULL pointer is returned.
*/
DLLEXPORT
SplatCloud *splatCloud( BaseObjectData *_object );
SplatCloud* splatCloud( BaseObjectData *_object );
/** \brief Cast an BaseObject to a SplatCloudObject if possible
/** \brief Cast an SplatCloudObject to a SplatCloudObject if possible
*
* @param _object The object should be of type BaseDataObject. If the content is a SplatCloud, a
* SplatCloudObject is returned. Otherwise a NULL pointer is returned.
*/
DLLEXPORT
SplatCloudObject *splatCloudObject( BaseObjectData *_object );
SplatCloudObject* splatCloudObject( BaseObjectData *_object );
/** \brief Get an SplatCloudObject by its id
*
* @param _objectId Id of the object. If the object exists and is a SplatCloud, a
* SplatCloudObject is returned. Otherwise a NULL pointer is returned.
*/
DLLEXPORT
SplatCloudObject* splatCloudObject( int _objectId );
//================================================================
......
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