Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
3DScene.h File Reference

C3DScene class definition. More...

Detailed Description

C3DScene class definition.

#include "3DSceneNode.h"
#include "3DBaseObject.h"
#include "3DFaceList.h"
#include "3DMaterial.h"
#include "3DAnimatable.h"
#include "Tree.h"

Go to the source code of this file.

Classes

class  C3DObjectCreator
 This class can be provided in C3DScene::Copy operations and allows to modify the created kind of class during the copy operation. More...
 
class  C3DFilter
 C3DFilter allows to filter the nodes / faces / points being processed. More...
 
class  C3DFlagFilter
 
class  C3DConcatenateFilter
 
class  C3DNodePos
 
struct  SceneSerializeData
 
class  C3DInstanceMap
 
class  C3DScene
 The class allows to get access to the scene graph, node hierarchy, material. More...
 
struct  C3DScene::SortSceneData
 
struct  C3DScene::GeoLocation
 

Typedefs

typedef enum SCENE_DATA SCENE_DATA
 
typedef enum NodePosFlags NodePosFlags
 
typedef enum NodeFilterFlags NodeFilterFlags
 
typedef struct SceneSerializeData SceneSerializeData
 
typedef enum SceneSelectionFlags SceneSelectionFlags
 
typedef enum ConcatenateFlags ConcatenateFlags
 
typedef enum CreateBackFaceFlags CreateBackFaceFlags
 
typedef enum ReplaceMatIDFlags ReplaceMatIDFlags
 

Enumerations

enum  SCENE_DATA {
  SCENE_DATA_FILENAME = MAKE_CUSTOM_ID('S', 'N', 'F', 'L') , SCENE_DATA_FILECLASS = MAKE_CUSTOM_ID('S', 'N', 'F', 'C') , SCENE_DATA_TEMPORARY_TEXTURES = MAKE_CUSTOM_ID('T', 'M', 'M', 'P') , SCENE_DATA_PATCH_LEVEL = MAKE_CUSTOM_ID('P', 'A', 'L', 'V') ,
  SCENE_DATA_SMOOTH_ANGLE = MAKE_CUSTOM_ID('S', 'M', 'A', 'N') , SCENE_DATA_SMOOTH_MODE = MAKE_CUSTOM_ID('S', 'M', 'M', 'O') , SCENE_DATA_TEXTURE_PATHS = MAKE_CUSTOM_ID('T', 'X', 'P', 'H') , SCENE_DATA_GEOLOCATION = MAKE_CUSTOM_ID('G', 'E', 'O', 'L') ,
  SCENE_DATA_TARGET_MR_BBOX = MAKE_CUSTOM_ID('T', 'G', 'B', 'X')
}
 
enum  NodePosFlags {
  NODEPOS_DEFAULT = 0 , NODEPOS_INSTANCE_ONCE = 0x01 , NODEPOS_INCLUDE_NODE = 0x02 , NODEPOS_BRANCH_ONLY = 0x04 ,
  NODEPOS_ALLOW_EMPTY_NODES = 0x08
}
 
enum  NodeFilterFlags { NODEFILTER_DEFAULT = 0 , NODEFILTER_VALID = 0x01 , NODEFILTER_SHOW = 0x02 , NODEFILTER_SELECTED = 0x04 }
 
enum  SceneSelectionFlags { SELECTION_DEFAULT = 0 , SELECTION_KEEP_SELECTION = 0x01 , SELECTION_SELECT_INSTANCES = 0x02 , SELECTION_SELECT_CHILDS = 0x04 }
 
enum  ConcatenateFlags {
  CONCATENATE_DEFAULT = 0 , CONCATENATE_INCLUDE_PARENT = 0x01 , CONCATENATE_REMOVE_TO_ROOT = 0x10 , CONCATENATE_REMOVE_AND_ADD_TO_PARENT = 0x20 ,
  CONCATENATE_REPLACE_PARENT = 0x40 , CONCATENATE_PROCESSING_FLAGS = 0xFFFF000 , CONCATENATE_SORT_BY_MATERIAL = 0x1000
}
 
enum  CreateBackFaceFlags { BACKFACE_DEFAULT = 0 , BACKFACE_FBGEOM = 0x01 , BACKFACE_FBFACE_ONLY = 0x02 }
 
enum  ReplaceMatIDFlags { REPLACEMATID_DEFAULT = 0 , REPLACEMATID_COPY_MATERIAL = 0x1 , REPLACEMATID_DELETE_SRC_MATERIAL = 0x2 , REPLACEMATID_INCLUDE_PARENT = 0x100 }
 

Enumeration Type Documentation

◆ ConcatenateFlags

Used by C3DScene::Concatenate and C3DScene::ConcatenateByMaterials to control what is process and where the created nodes are inserted in the scene

Enumerator
CONCATENATE_DEFAULT 

The scene is not modified, and a node is returned which can be added as you need in the scene graph.

CONCATENATE_INCLUDE_PARENT 

parentNode is included in concatenation (could be useful if parent is a geom object)

CONCATENATE_REMOVE_TO_ROOT 

Parent and childs are deleted (or not depending on the optionnal C3DFilter::ProcessNode returned value) and concatenated node is added to the scene root.

CONCATENATE_REMOVE_AND_ADD_TO_PARENT 

Parent childs are deleted (or not depending on the optionnal C3DFilter::ProcessNode returned value) and replace by concatenated node which become child of parent.

CONCATENATE_REPLACE_PARENT 

Parent and its childs is replaced by concatenated node (whatever C3DFilter::ProcessNode returned value)

CONCATENATE_SORT_BY_MATERIAL 

The result node has its faces sorted by material.

◆ CreateBackFaceFlags

Flags for CreateBackfaceNodes method

Enumerator
BACKFACE_DEFAULT 

Create back face for all geom and the whole geom.

BACKFACE_FBGEOM 

Create back face only if geom have back face materials. In this case the whole geom is backfaced.

BACKFACE_FBFACE_ONLY 

Create back face only for face that have back face materials. In this case only the fb faces are backfaced.

◆ NodeFilterFlags

These flags are used within C3DFilter to limit processing to the nodes concerned.

Enumerator
NODEFILTER_DEFAULT 

Do default traversal, filter nothing.

NODEFILTER_VALID 

Return only valid nodes.

NODEFILTER_SHOW 

Return only displayed nodes.

NODEFILTER_SELECTED 

Return only selected nodes.

◆ NodePosFlags

Scene Node traversal flags These flags can be used with C3DScene::GetFirstNode/C3DScene::GetNextNode to control the way the scene tree is

Enumerator
NODEPOS_DEFAULT 

Do default traversal, which means it starts traversal from the first child of the provided node. If provided node is NULL, then all the scene will be traverse.

NODEPOS_INSTANCE_ONCE 

When traversing the tree, settings this flag returns only once time each object instance. This is useful to perform an operation only once on objects when processing them.

NODEPOS_INCLUDE_NODE 

Include the node itself in the traversal. Node childs and right brothers will also be traversed.

NODEPOS_BRANCH_ONLY 

Traverse provided node childs. If NODEPOS_INCLUDE_NODE specified, traverse also right branch (brothers and childs).

NODEPOS_ALLOW_EMPTY_NODES 

During serialization some node might be provided with geometry. This allows to get access to such node, which are used only under special circumstances.

◆ ReplaceMatIDFlags

Flags to control how C3DScene::ReplaceNodeMaterialID handles material replacement

Enumerator
REPLACEMATID_COPY_MATERIAL 

the target material (newmatid) is replaced by the src material (if newmatid exits, it is deleted). If not set, newmatid material is supposed to exists in the material list

REPLACEMATID_DELETE_SRC_MATERIAL 

Delete the src material (matid). To be used only if pParentNode = NULL, otherwise some other might reference oldmatid.

REPLACEMATID_INCLUDE_PARENT 

pParentNode is included in the change

◆ SCENE_DATA

These information might be retrieve through the C3DScene::GetCustomData() class.
If these information is missing, the default value should be taken into account.

Enumerator
SCENE_DATA_FILENAME 

CXString: the scene file path.

SCENE_DATA_FILECLASS 

Unsigned int: the scene file class (Ie. FBX_3D_FILE, WAVEFRONT_3D_FILE...)

SCENE_DATA_TEMPORARY_TEXTURES 

Bool (false): texture files are temporaries and can be deleted when scene deleted (ie, embedded textures in FBX or sketchup). Texture are not temporary if this information is missing.

SCENE_DATA_PATCH_LEVEL 

unsigned int (C3DPreferences::Get3DPreferences()::GetPatchLevel())

SCENE_DATA_SMOOTH_ANGLE 

float ((C3DPreferences::Get3DPreferences()::GetSmoothAngle()). Smooth angle in radian

SCENE_DATA_SMOOTH_MODE 

unsigned int ((C3DPreferences::Get3DPreferences()::GetSmoothMode())

SCENE_DATA_TEXTURE_PATHS 

string array: additional texture paths. Can be retrieve using C3DScene::GetTexturePaths

SCENE_DATA_GEOLOCATION 

Binary (C3DScene::GeoLocation): longitude and latitude position of the scene.

SCENE_DATA_TARGET_MR_BBOX 

Binary - 6 floats - Target bounding box for multiresolution file.

◆ SceneSelectionFlags

these flags control the selection for C3DScene::Select method If these information is missing, the default value should be taken into account.

Enumerator
SELECTION_KEEP_SELECTION 

Add the new selection to the existing one.

SELECTION_SELECT_INSTANCES 

Select also the instances of the provided node.

SELECTION_SELECT_CHILDS 

Select the child of the provided node.