Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
C3DSceneNode Class Reference

A node matches one element that is part of the C3DScene graph. It references a C3DBaseObject and has some properties such matrix name, transformation, user custom data... More...

Detailed Description

A node matches one element that is part of the C3DScene graph. It references a C3DBaseObject and has some properties such matrix name, transformation, user custom data...

Several nodes might reference the same object, which is called instantiation process. Nodes are organized hierarchically in the scene.
Cf. Working with nodes to get more details on node usage.

Note
C3DSceneNode is not instantiable.

#include <3DSceneNode.h>

Inheritance diagram for C3DSceneNode:
CTreeNode C3DKeyframable C3DAnimatable

Public Member Functions

 C3DSceneNode (C3DBaseObject *nodeObject=NULL)
 
virtual bool Delete ()
 
virtual void PostSerialize (CXArchive &ar, bool lastCall)
 
virtual void Serialize (CXArchive &ar)
 
SceneNodeID32 GetNodeID32 () const
 
SceneNodeID GetNodeID () const
 
BaseObjectID GetObjectID () const
 
SceneNodeID SetNodeID (SceneNodeID nodeid)
 
OBJECT_KINDOF GetObjectKindOf () const
 
void SetScene (C3DScene *scene)
 
void SetObject (C3DBaseObject *pObj, bool deletePrevious=true)
 
C3DSceneGetScene ()
 
C3DBaseObjectGetBaseObject (int time=0) const
 
C3DGeomObjectGetGeomObject (int time=0) const
 
bool IsGeomObject () const
 
C3DBaseObjectGetFinalObject (int time=0, bool computeIfNeeded=true) const
 
CCustomDataGetCustomData ()
 
const CCustomDataGetCustomData () const
 
void SetFlag (SCENE_NODE_FLAGS flag, bool set)
 
void SetFlags (unsigned int flags, bool set)
 
bool IsFlagSet (unsigned int flag) const
 
bool IsOneFlagSet (unsigned int flags) const
 
bool CheckFlags (unsigned int checkflags, bool allSetOrNoneSet) const
 
void Update (unsigned int updateMode)
 
void Invalidate (unsigned int sceneNodeInvFlags, bool set=true)
 
void InvalidateNodeAndObject (unsigned int sceneNodeInvFlags, unsigned int objectInvalidationFlags)
 
bool IsInvalidate (SCENE_NODE_UPDATE_PROPERTIES flag) const
 
void GetNodeLocalTM (int time, C4x4Matrix &matrix) const
 
void SetObjectLocalTM (int time, const C4x4Matrix &localMatrix, bool allowTrsDecomposition=true)
 
void GetObjectLocalTM (int time, C4x4Matrix &matrix) const
 
void GetNodeTM (int time, C4x4Matrix &matrix, bool includeRootOrientation=true, bool excludePivot=false) const
 
void CenterPivotOnCG (const C3DVector &bboxOffset=C3DVector(0.5, 0.5, 0.5), const C3DVector &additionalOffset=C3DVector(0.0, 0.0, 0.0))
 
bool SwapPoints (unsigned int swapMode)
 
bool SwapTransformations (unsigned int swapMode)
 
bool ConvertToGlobalCoordinates (int time)
 
bool ConvertToGlobalCoordinates (const C4x4Matrix &matrix)
 
bool DeleteObjectInstanciation ()
 
bool IsObjectIntanciated (bool checkChilds=false) const
 
bool GetBoundingBox (int time, C3DBBox &bbox, unsigned int bboxflags, unsigned int extraNodeOrPtFaceFlags=0, unsigned int extraKindOfObject=OBJECT_UNKNOWN)
 
bool GetBoundingBox (int time, C3DPoint &point1, C3DPoint &point2, unsigned int bboxflags, unsigned int extraNodeOrPtFaceFlags=0, unsigned int extraKindOfObject=OBJECT_UNKNOWN)
 
bool GetCG (int time, C3DPoint &CG)
 
void SetName (const CXString &name)
 
CXString GetName () const
 
void Inherit (const C3DSceneNode *from, int flags=OBJECT_COPY_DEFAULT)
 
C3DSceneNodeCopy (int copyFlags=OBJECT_COPY_DEFAULT, C3DObjectCreator *objectCreator=NULL) const
 
C3DSceneNodeCopyBranch (C3DSceneNode *parent=NULL, int copyFlags=OBJECT_COPY_DEFAULT, C3DObjectCreator *objectCreator=NULL) const
 
CTreeNodeGetTreeNode ()
 
virtual CTimeRange GetTimeRange (longuint classid=KEYFRAME_NULLID) const
 
- Public Member Functions inherited from C3DKeyframable
int AddKey (int time, C3DKeyframe *newkey)
 Return -1 if fails or keyframe number.
 
int AddKey (int time, const C3DKeyframe &newkey)
 Return keyframe number.
 
int DeleteKey (int time, longuint classid=KEYFRAME_NULLID)
 If time = INVALID_TIME, then all key of classid are deleted or all keys are deleted if classid = KEYFRAME_NULLID.
 
void DeleteAllKeys ()
 
C3DKeyframeCreateKey (int time, longuint classid, unsigned int flags=KEYFRAME_NONE)
 Create key of the given classid. flags is one or more KeyframeFlags.
 
C3DKeyframeGetKeyByIndex (unsigned int index, int *time=NULL, longuint classid=KEYFRAME_NULLID)
 This invalidate the cache, and can lead to slower computation.
 
const C3DKeyframeGetConstKeyByIndex (unsigned int index, int *time=NULL, longuint classid=KEYFRAME_NULLID) const
 
int GetKeyNbr (longuint classid=KEYFRAME_NULLID) const
 
bool Evaluate (int time, C3DKeyframe &findkey) const
 This method evaluate the key at the given time. Same but slower that the following method that return a pointer.
 
const C3DKeyframeEvaluate (int time, longuint classid) const
 This method evaluate the key at the given time. This is the fastest method. The key content cannot be changed.
 
int CopyKeys (const C3DKeyframable *srckeys, longuint classid=KEYFRAME_NULLID, CTimeRange range=CTimeRange(0, CTimeRange::MAX_TIME))
 Copy key of the given classid in the given time range.
 
bool operator== (const C3DKeyframable &refkeys) const
 
bool operator= (const C3DKeyframable &key)
 
virtual const C3DKeyframeGetConstKey (int time, unsigned int findKeyFlag, longuint classid=KEYFRAME_NULLID, int *findKeyTime=NULL) const
 Retrieve a keyframe at / before or after the specified time depending on findKeyFlag.
 
- Public Member Functions inherited from C3DAnimatable
int GetKeyTime (int time, unsigned int pos, longuint classid=KEYFRAME_NULLID)
 

Static Public Member Functions

static C3DSceneNodeCreate ()
 

Additional Inherited Members

- Public Types inherited from C3DKeyframable
enum  TimeStamp { INVALID_TIME = -1 }
 
enum  KeyframeFlags { KEYFRAME_NONE = 0x00 , KEYFRAME_REPLACE_KEY = 0x01 , KEYFRAME_DONT_EVALUATE = 0x02 }
 
typedef enum C3DKeyframable::TimeStamp TimeStamp
 
- Public Types inherited from C3DAnimatable
enum  FindKey { KEYFRAME_PREV = 0x01 , KEYFRAME_NEXT = 0x02 , KEYFRAME_SAME = 0x04 }
 

Member Function Documentation

◆ GetTimeRange()

virtual CTimeRange C3DKeyframable::GetTimeRange ( longuint  classid = KEYFRAME_NULLID) const
virtual

Reimplemented from C3DKeyframable.

◆ Serialize()

virtual void C3DSceneNode::Serialize ( CXArchive ar)
virtual

Reimplemented from CTreeNode.


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