![]() |
Polygon Crucher SDK - Documentation
Documentation
|
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...
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.
#include <3DSceneNode.h>
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) |
C3DScene * | GetScene () |
C3DBaseObject * | GetBaseObject (int time=0) const |
C3DGeomObject * | GetGeomObject (int time=0) const |
bool | IsGeomObject () const |
C3DBaseObject * | GetFinalObject (int time=0, bool computeIfNeeded=true) const |
CCustomData & | GetCustomData () |
const CCustomData & | GetCustomData () 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) |
C3DSceneNode * | Copy (int copyFlags=OBJECT_COPY_DEFAULT, C3DObjectCreator *objectCreator=NULL) const |
C3DSceneNode * | CopyBranch (C3DSceneNode *parent=NULL, int copyFlags=OBJECT_COPY_DEFAULT, C3DObjectCreator *objectCreator=NULL) const |
CTreeNode * | GetTreeNode () |
virtual CTimeRange | GetTimeRange (longuint classid=KEYFRAME_NULLID) const |
![]() | |
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 () |
C3DKeyframe * | CreateKey (int time, longuint classid, unsigned int flags=KEYFRAME_NONE) |
Create key of the given classid. flags is one or more KeyframeFlags. | |
C3DKeyframe * | GetKeyByIndex (unsigned int index, int *time=NULL, longuint classid=KEYFRAME_NULLID) |
This invalidate the cache, and can lead to slower computation. | |
const C3DKeyframe * | GetConstKeyByIndex (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 C3DKeyframe * | Evaluate (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 C3DKeyframe * | GetConstKey (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. | |
![]() | |
int | GetKeyTime (int time, unsigned int pos, longuint classid=KEYFRAME_NULLID) |
Static Public Member Functions | |
static C3DSceneNode * | Create () |
Additional Inherited Members | |
![]() | |
enum | TimeStamp { INVALID_TIME = -1 } |
enum | KeyframeFlags { KEYFRAME_NONE = 0x00 , KEYFRAME_REPLACE_KEY = 0x01 , KEYFRAME_DONT_EVALUATE = 0x02 } |
typedef enum C3DKeyframable::TimeStamp | TimeStamp |
![]() | |
enum | FindKey { KEYFRAME_PREV = 0x01 , KEYFRAME_NEXT = 0x02 , KEYFRAME_SAME = 0x04 } |
|
virtual |
Reimplemented from C3DKeyframable.