Simplygon C++ API  8.3.35800.0
SimplygonSDK::IScene Class Referenceabstract

#include <SimplygonSDK.h>

Inheritance diagram for SimplygonSDK::IScene:
SimplygonSDK::IObject

Public Member Functions

virtual CountedPointer< IValueArrayAddCustomField (rid base_type, const char *name, unsigned int tuple_size)=0
 
virtual void Append (IScene *otherScene)=0
 
virtual bool CalculateExtents ()=0
 
virtual void Clear ()=0
 
virtual void Compact ()=0
 
virtual void DeepCopy (IScene *src)=0
 
virtual void EvaluateDefaultGlobalTransformation (ISceneNode *node, IMatrix4x4 *global_transform)=0
 
virtual CountedPointer< ISceneBoneTableGetBoneTable ()=0
 
virtual const char * GetClass ()
 
virtual SGDEPRECATED CountedPointer< IGeometryDataGetCombinedGeometry ()=0
 
virtual CountedPointer< IGeometryDataGetCombinedGeometry (int selectionSetID)=0
 
virtual CountedPointer< IValueArrayGetCustomField (const char *name)=0
 
virtual void GetInf (real *realReturnDataPtr)=0
 
virtual CountedPointer< IMappingImageGetMappingImage ()=0
 
virtual CountedPointer< IMaterialTableGetMaterialTable ()=0
 
virtual CountedPointer< ISceneNodeGetNodeByGUID (const char *node_id)=0
 
virtual CountedPointer< ISceneNodeGetNodeByGUID (const char *node_id, ISceneNode *node)=0
 
virtual CountedPointer< ISceneNodeGetNodeFromPath (const char *path)=0
 
virtual real GetRadius ()=0
 
virtual CountedPointer< ISceneNodeGetRootNode ()=0
 
virtual CountedPointer< ISelectionSetTableGetSelectionSetTable ()=0
 
virtual void GetSup (real *realReturnDataPtr)=0
 
virtual CountedPointer< ITextureTableGetTextureTable ()=0
 
virtual unsigned int GetTriangleCount ()=0
 
virtual bool HasCustomField (const char *name)=0
 
virtual bool IsA (const char *type) const
 
virtual bool LoadFromFile (const char *path)=0
 
virtual CountedPointer< IGeometryDataNewCombinedGeometry ()=0
 
virtual CountedPointer< IGeometryDataNewCombinedGeometry (int selectionSetID)=0
 
virtual CountedPointer< ISceneNewCopy ()=0
 
virtual void RemoveCustomField (const char *name)=0
 
virtual void RemoveSceneNodes ()=0
 
virtual void RemoveSceneNodes (const char *nodeType)=0
 
virtual void RemoveSceneNodes (int selectionSetID)=0
 
virtual void RemoveUnlinkedBones ()=0
 
virtual bool SaveToFile (const char *path)=0
 
virtual int SelectNodes (const char *nodeTypeName)=0
 
virtual void ShowSceneDebugWindow ()=0
 
- Public Member Functions inherited from SimplygonSDK::IObject
virtual rid AddObserver (robserver *Observer, rid EventId)=0
 
virtual void AddRef ()=0
 
virtual rstring GetName ()=0
 
virtual void * GetUserComponentArea (rid userid)=0
 
virtual void PrintInfo ()=0
 
virtual void Release ()=0
 
virtual void RemoveObserver (rid ObserverId)=0
 
virtual void SetName (const char *Name)=0
 

Static Public Member Functions

static bool IsClassA (const char *type)
 
static ISceneSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IObject
static bool IsClassA (const char *type)
 
static IObjectSafeCast (IObject *ptr)
 

Detailed Description

IScene is the main keeper of a scene and scene graph in simplygon. The scene is self-contained, with materials, textures, etc. to describe a full scene.

Definition at line 14007 of file SimplygonSDK.h.

Member Function Documentation

◆ AddCustomField()

virtual CountedPointer<IValueArray> SimplygonSDK::IScene::AddCustomField ( rid  base_type,
const char *  name,
unsigned int  tuple_size 
)
pure virtual

Adds a custom data field. To be able to add a field, it must have a name that does not conflict with the existing custom fields.

Parameters
base_typeis the is the type of the field to be added
nameis the name of the new field
tuple_sizeis the tuple size of the new field

◆ Append()

virtual void SimplygonSDK::IScene::Append ( IScene otherScene)
pure virtual

Appends another scene to this scene. All materials, textures etc.

Parameters
otherSceneis the scene object to merge into current scene

◆ CalculateExtents()

virtual bool SimplygonSDK::IScene::CalculateExtents ( )
pure virtual

Calculates the axis-aligned bounding box of the whole scene. If the node tree contains no geometric data, or all data is hidden, the bounding box is not calculated, and the method returns false.

Returns
true if the calculation succeeded

◆ Clear()

virtual void SimplygonSDK::IScene::Clear ( )
pure virtual

Clears the whole scene and releases all items in the graph.

◆ Compact()

virtual void SimplygonSDK::IScene::Compact ( )
pure virtual

Will remove mesh nodes that consist of empty geometry. The node transformation will be added to its children's transformation. If the root node is a sceneMesh with empty geometry, it will be replaced with a generic sceneNode having the same transformation.

◆ DeepCopy()

virtual void SimplygonSDK::IScene::DeepCopy ( IScene src)
pure virtual

Deep copies the source scene, and all things assigned to it, including all nodes, geometry data, materials and tables.

Parameters
srcis source scene to copy

◆ EvaluateDefaultGlobalTransformation()

virtual void SimplygonSDK::IScene::EvaluateDefaultGlobalTransformation ( ISceneNode node,
IMatrix4x4 global_transform 
)
pure virtual

Evaluates the global transformation of the specified node at a specific time. EvaluateDefaultGlobalTransformation is used to evaluate the default transformation, regardless of node animation.

Parameters
nodeis the node to evaluate
global_transformis the transformation matrix that receives the global transformation

◆ GetBoneTable()

virtual CountedPointer<ISceneBoneTable> SimplygonSDK::IScene::GetBoneTable ( )
pure virtual

Get the bone table of the scene

Returns
the bone table

◆ GetClass()

virtual const char* SimplygonSDK::IScene::GetClass ( )
virtual

GetClass returns the name of the class of the object.

Returns
the name of the actual class of the object, as a const char string

Reimplemented from SimplygonSDK::IObject.

◆ GetCombinedGeometry() [1/2]

virtual SGDEPRECATED CountedPointer<IGeometryData> SimplygonSDK::IScene::GetCombinedGeometry ( )
pure virtual
Deprecated:
Method is marked as deprecated and will be removed in future version. Use NewCombinedGeometry() instead. Combines all the geometries from the scene and returns a copy.
Returns
a copy of all geometries combined

◆ GetCombinedGeometry() [2/2]

virtual CountedPointer<IGeometryData> SimplygonSDK::IScene::GetCombinedGeometry ( int  selectionSetID)
pure virtual

Combines all the geometries from the scene and returns a copy.

Parameters
selectionSetIDis the ID of the selection set containing node ids to combine

◆ GetCustomField()

virtual CountedPointer<IValueArray> SimplygonSDK::IScene::GetCustomField ( const char *  name)
pure virtual

Adds/Removes/Gets a custom data field.

Parameters
nameis the name of the field to be fetched
Returns
an array containing the field data

◆ GetInf()

virtual void SimplygonSDK::IScene::GetInf ( real realReturnDataPtr)
pure virtual

Get the inferior (minimum) extent of the scene

Parameters
realReturnDataPtrpointer to a user-provided data area to receive the return value. Note! Needs to be at least 3 elements in size
Returns
the minimum extent of the scene

◆ GetMappingImage()

virtual CountedPointer<IMappingImage> SimplygonSDK::IScene::GetMappingImage ( )
pure virtual

Get the MappingImage object for the scene.

◆ GetMaterialTable()

virtual CountedPointer<IMaterialTable> SimplygonSDK::IScene::GetMaterialTable ( )
pure virtual

Get the material table of the scene

Returns
the material table

◆ GetNodeByGUID() [1/2]

virtual CountedPointer<ISceneNode> SimplygonSDK::IScene::GetNodeByGUID ( const char *  node_id)
pure virtual

Gets a node defined by an id.

Parameters
node_idis the id of the node to get
Returns
the node associated with the id

◆ GetNodeByGUID() [2/2]

virtual CountedPointer<ISceneNode> SimplygonSDK::IScene::GetNodeByGUID ( const char *  node_id,
ISceneNode node 
)
pure virtual

Gets a node defined by an id from the specified node tree.

Parameters
node_idis the id of the node to get
nodeid is the id of the node to get
Returns
the node associated with the id

◆ GetNodeFromPath()

virtual CountedPointer<ISceneNode> SimplygonSDK::IScene::GetNodeFromPath ( const char *  path)
pure virtual

Gets a node defined by a path. Please note that the path must contain names for each level to be able to find the specified node.

Parameters
paththe path of the node to get
Returns
the node associated with path

◆ GetRadius()

virtual real SimplygonSDK::IScene::GetRadius ( )
pure virtual

Get the scene radius.

Returns
the radius of the scene

◆ GetRootNode()

virtual CountedPointer<ISceneNode> SimplygonSDK::IScene::GetRootNode ( )
pure virtual

Get the root node of the scene.

Returns
the root node

◆ GetSelectionSetTable()

virtual CountedPointer<ISelectionSetTable> SimplygonSDK::IScene::GetSelectionSetTable ( )
pure virtual

Get the selection set table of the scene

Returns
the selection set table

◆ GetSup()

virtual void SimplygonSDK::IScene::GetSup ( real realReturnDataPtr)
pure virtual

Get the superior (maximum) extent of the scene

Parameters
realReturnDataPtrpointer to a user-provided data area to receive the return value. Note! Needs to be at least 3 elements in size
Returns
the maximum extent of the scene

◆ GetTextureTable()

virtual CountedPointer<ITextureTable> SimplygonSDK::IScene::GetTextureTable ( )
pure virtual

Get the texture table of the scene

Returns
the texture table

◆ GetTriangleCount()

virtual unsigned int SimplygonSDK::IScene::GetTriangleCount ( )
pure virtual

Traverses the scene meshes in the scene and returns the total triangle count

◆ HasCustomField()

virtual bool SimplygonSDK::IScene::HasCustomField ( const char *  name)
pure virtual

Checks if a custom field is present in the scene

Parameters
nameis the name of the field to be checked
Returns
true is the field exists, false otherwise

◆ IsA()

virtual bool SimplygonSDK::IScene::IsA ( const char *  type) const
virtual

The IsA function returns true if the object is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the object is, or is a descendant of
Returns
true if the object is of the specified class, false if not

Reimplemented from SimplygonSDK::IObject.

◆ IsClassA()

static bool SimplygonSDK::IScene::IsClassA ( const char *  type)
inlinestatic

The IsClassA function returns true if IScene is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the class is, or is a descendant of
Returns
true if the class is of the specified class, false if not

Definition at line 14028 of file SimplygonSDK.h.

◆ LoadFromFile()

virtual bool SimplygonSDK::IScene::LoadFromFile ( const char *  path)
pure virtual

Loads a scene from file

Parameters
pathis the path of the scene file
Returns
true on success, false if file was not found

◆ NewCombinedGeometry() [1/2]

virtual CountedPointer<IGeometryData> SimplygonSDK::IScene::NewCombinedGeometry ( )
pure virtual

Combines all the geometries from the scene and returns a copy.

Returns
a copy of all geometries combined

◆ NewCombinedGeometry() [2/2]

virtual CountedPointer<IGeometryData> SimplygonSDK::IScene::NewCombinedGeometry ( int  selectionSetID)
pure virtual

Combines all the geometries from the selection set and returns a copy. If the selection set ID is -1, then all the geometries will be copied.

Parameters
selectionSetIDis the ID of the selection set containing node ids to combine
Returns
a copy of all geometries combined

◆ NewCopy()

virtual CountedPointer<IScene> SimplygonSDK::IScene::NewCopy ( )
pure virtual

Creates a new deep copy of the scene, and all things assigned to it, including all nodes, geometry data, materials and tables.

Returns
a deep copy of the scene object

◆ RemoveCustomField()

virtual void SimplygonSDK::IScene::RemoveCustomField ( const char *  name)
pure virtual

Removes a custom data field.

Parameters
nameis the name of the field to be removed

◆ RemoveSceneNodes() [1/3]

virtual void SimplygonSDK::IScene::RemoveSceneNodes ( )
pure virtual

Get the CustomFields array collection, where custom data is stored for the scene

Returns
an array collection containing all custom fields

◆ RemoveSceneNodes() [2/3]

virtual void SimplygonSDK::IScene::RemoveSceneNodes ( const char *  nodeType)
pure virtual

Get the CustomFields array collection, where custom data is stored for the scene

Parameters
nodeTypeis the type of object to remove from the scene (i.e ISceneMesh)
Returns
an array collection containing all custom fields

◆ RemoveSceneNodes() [3/3]

virtual void SimplygonSDK::IScene::RemoveSceneNodes ( int  selectionSetID)
pure virtual

Get the CustomFields array collection, where custom data is stored for the scene

Parameters
selectionSetIDis the ID of the selection set containing the nodes to remove
Returns
an array collection containing all custom fields

◆ RemoveUnlinkedBones()

virtual void SimplygonSDK::IScene::RemoveUnlinkedBones ( )
pure virtual

Removes all bones in the scene that are not linked by any ISceneMesh's geometry data. Note that the removal only removes leaf nodes in the scene.

◆ SafeCast()

static IScene* SimplygonSDK::IScene::SafeCast ( IObject ptr)
inlinestatic

SafeCast makes sure the pointer is of a class that can be cast into a IScene pointer, and if this is possible, returns the cast pointer.

Parameters
ptris the pointer to be cast into a IScene pointer
Returns
a pointer to the IScene object, if the cast can be made, and a NULL pointer otherwise

Definition at line 14041 of file SimplygonSDK.h.

◆ SaveToFile()

virtual bool SimplygonSDK::IScene::SaveToFile ( const char *  path)
pure virtual

Saves a scene to file

Parameters
pathis the path to which the scene file will be saved
Returns
true on success, false if file could not be written to

◆ SelectNodes()

virtual int SimplygonSDK::IScene::SelectNodes ( const char *  nodeTypeName)
pure virtual

Selects all nodes of the type specified in the parameter and returns the selection set ID. If no types were found, it returns -1.

Parameters
nodeTypeNamethe type of node to select, for example "ISceneMesh"
Returns
the selection set ID with the selection

◆ ShowSceneDebugWindow()

virtual void SimplygonSDK::IScene::ShowSceneDebugWindow ( )
pure virtual

Show a debug window with the scene graph tree. This debug method returns when the window is closed.


The documentation for this class was generated from the following file: