Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

SNode Class Reference

#include <SO3NodeScol.h>

Inheritance diagram for SNode:
SData SBone SCamera SDynamicCubeMap SDynamicReflectionMap SEntity SLight SParticleSystem SSkeleton

List of all members.

Public Types

enum  NodeType {
  NODE_TYPE_ID = 0, ENTITY_TYPE_ID = 1, CAMERA_TYPE_ID = 2, LIGHT_TYPE_ID = 3,
  SCENENODE_TYPE_ID = 4, VIEWPORT_TYPE_ID = 5, BODY_TYPE_ID = 6, SKELETON_TYPE_ID = 7,
  BONE_TYPE_ID = 8, PARTICLE_SYSTEM_TYPE_ID = 9, DYNAMIC_CUBE_MAP_ID = 10, DYNAMIC_REFLECTION_MAP_ID = 11
}
enum  NodeTransformSpace { SO3_LOCAL_TS = 0, SO3_PARENT_TS = 1, SO3_WORLD_TS = 2 }

Public Member Functions

 SNode (SScene *parent, std::string nodeName, bool isRootNode=false)
 ~SNode ()
SSceneGetParentScene ()
Ogre::SceneNode * GetOgreSceneNodePointer ()
Ogre::MovableObject * GetMovableObjectPointer ()
bool getSceneNodeIsMouseForeground ()
void setSceneNodeIsMouseForeground (bool mForeground)
bool getSceneNodeIsMouseClick ()
void setSceneNodeIsMouseClick (bool mClickable)
int getSceneNodeMouseFlags ()
void setSceneNodeMouseFlags (int flags)
bool getSceneNodeHasBody ()
void setSceneNodeHasBody (bool mHasBody)
void UpdateNodeBody (bool bScale)
void destroyAssociatedMoveableObject ()
void disableAutoTarget ()
NodeType GetNodeType ()
void AttachToParent (SNode *newParentNode)
void DetachFromParent ()
SNodeGetParentSceneNode ()
const SNodeMap GetChildrenNodes () const
virtual int GetNumChildren ()
void DetachAllChildren ()
virtual void SetCastShadows (bool castShadows)
virtual bool GetCastShadows ()
virtual void SetRenderingDistance (float distance)
virtual float GetRenderingDistance ()
virtual Ogre::Vector3 GetBoundingBoxSize ()
virtual Ogre::Vector3 GetBoundingBoxCenter ()
virtual Ogre::Matrix4 GetTransformationMatrix ()
virtual Ogre::Vector3 GetPosition ()
virtual void SetPosition (Ogre::Vector3 pos)
virtual Ogre::Quaternion GetOrientation ()
virtual void SetOrientation (Ogre::Quaternion quat)
virtual void AddOrientation (Ogre::Quaternion quat)
virtual Ogre::Vector3 GetScale ()
virtual void SetScale (Ogre::Vector3 scale)
virtual Ogre::Vector3 GetGlobalPosition ()
virtual void SetGlobalPosition (Ogre::Vector3 pos)
virtual Ogre::Quaternion GetGlobalOrientation ()
virtual void SetGlobalOrientation (Ogre::Quaternion quat)
virtual Ogre::Vector3 GetGlobalScale ()
void SetGlobalScale (Ogre::Vector3 scale)
virtual void StoreInitialPRS ()
virtual void ResetToInitialPRS ()
void ResetToInitialPosition ()
virtual void ResetToInitialOrientation ()
void ResetToInitialScale ()
virtual Ogre::Vector3 GetInitialPosition ()
virtual Ogre::Quaternion GetInitialOrientation ()
virtual Ogre::Vector3 GetInitialScale ()
bool GetShowBoundingBox ()
void SetShowBoundingBox (bool showBounding)
void SetAutoTracking (bool autoTrack, SNode *targetNode=0, Ogre::Vector3 localDirectionVector=Ogre::Vector3::NEGATIVE_UNIT_Z, Ogre::Vector3 offset=Ogre::Vector3::ZERO)
SNodeGetAutoTrackingTarget ()
virtual void Pitch (float radianAngle, SNode::NodeTransformSpace relativeTo=SNode::SO3_LOCAL_TS)
virtual void Yaw (float radianAngle, SNode::NodeTransformSpace relativeTo=SNode::SO3_LOCAL_TS)
virtual void Roll (float radianAngle, SNode::NodeTransformSpace relativeTo=SNode::SO3_LOCAL_TS)
virtual void Rotate (Ogre::Vector3 axis, float radianAngle, SNode::NodeTransformSpace relativeTo=SNode::SO3_LOCAL_TS)
virtual void Translate (Ogre::Vector3 d, SNode::NodeTransformSpace relativeTo=SNode::SO3_PARENT_TS)
void SetDirection (Ogre::Vector3 vec, SNode::NodeTransformSpace relativeTo=SNode::SO3_LOCAL_TS, Ogre::Vector3 localDirectionVector=Ogre::Vector3::NEGATIVE_UNIT_Z)
void LookAt (Ogre::Vector3 targetPoint, SNode::NodeTransformSpace relativeTo, Ogre::Vector3 localDirectionVector=Ogre::Vector3::NEGATIVE_UNIT_Z)
bool GetVisible ()
void SetVisible (bool visible, bool cascade=true)
SNodeAnimationCreateNodeAnimation (std::string animationName, float animationLength)
void DeleteAnimation (SAnim *existingAnimation)
unsigned short GetNumAnimations ()
SAnimGetAnimation (std::string animationName)
SAnimGetAnimation (unsigned short animationIndex)
SAnimMap GetAnimations () const
Ogre::Vector3 GetPositionFromNode (SNode *nodeRef)
Ogre::Quaternion GetOrientationFromNode (SNode *nodeRef)
Ogre::Vector3 GetScaleFromNode (SNode *nodeRef)

Public Attributes

SBodynodeBody
SBonenodeBone
bool isBonesAttached
Ogre::Vector3 currentBonePosition
Ogre::Vector3 currentBoneScale

Protected Member Functions

 SNode (SScene *parent, std::string nodeName, NodeType nodeType)
void AddAnimation (SAnim *existingAnimation)
void RemoveAnimation (SAnim *existingAnimation)
void RemoveAnimation (std::string animationName)

Protected Attributes

SScenecurrentScene
Ogre::SceneNode * O3SceneNode
Ogre::MovableObject * ogreMovableObject

Detailed Description

Definition at line 41 of file SO3NodeScol.h.


Member Enumeration Documentation

Enumerator:
SO3_LOCAL_TS 
SO3_PARENT_TS 
SO3_WORLD_TS 

Definition at line 59 of file SO3NodeScol.h.

Enumerator:
NODE_TYPE_ID 
ENTITY_TYPE_ID 
CAMERA_TYPE_ID 
LIGHT_TYPE_ID 
SCENENODE_TYPE_ID 
VIEWPORT_TYPE_ID 
BODY_TYPE_ID 
SKELETON_TYPE_ID 
BONE_TYPE_ID 
PARTICLE_SYSTEM_TYPE_ID 
DYNAMIC_CUBE_MAP_ID 
DYNAMIC_REFLECTION_MAP_ID 

Definition at line 44 of file SO3NodeScol.h.


Constructor & Destructor Documentation

SNode::SNode ( SScene parent,
std::string  nodeName,
bool  isRootNode = false 
)

Definition at line 24 of file SO3NodeScol.cpp.

SNode::~SNode (  )

Definition at line 84 of file SO3NodeScol.cpp.

SNode::SNode ( SScene parent,
std::string  nodeName,
NodeType  nodeType 
) [protected]

Protected constructor for child classes

Definition at line 54 of file SO3NodeScol.cpp.


Member Function Documentation

void SNode::AddAnimation ( SAnim existingAnimation ) [protected]

Add a SAnim object to the list of handled animations.

Definition at line 676 of file SO3NodeScol.cpp.

void SNode::AddOrientation ( Ogre::Quaternion  quat ) [virtual]

Add a rotation to the node in local space terms.

Reimplemented in SBone.

Definition at line 420 of file SO3NodeScol.cpp.

void SNode::AttachToParent ( SNode newParentNode )

Definition at line 236 of file SO3NodeScol.cpp.

SNodeAnimation * SNode::CreateNodeAnimation ( std::string  animationName,
float  animationLength 
)

Create manually (by the user) a new SNodeAnimation.

Remarks:
: if more animation type are needed, (vertex, skeleton)

Definition at line 630 of file SO3NodeScol.cpp.

void SNode::DeleteAnimation ( SAnim existingAnimation )

Delete manually an animation.

Remarks:
: every type of animation can be deleted, so, if you delete an SSkeletonAnimation (that was created automatically by SO3) you will loose all information concerning it without possibility to reload it.

Definition at line 637 of file SO3NodeScol.cpp.

void SNode::destroyAssociatedMoveableObject (  )

TODO JEFF Virer ça.

void SNode::DetachAllChildren (  )

Definition at line 284 of file SO3NodeScol.cpp.

void SNode::DetachFromParent (  )

Definition at line 254 of file SO3NodeScol.cpp.

void SNode::disableAutoTarget (  )

Definition at line 204 of file SO3NodeScol.cpp.

SAnim * SNode::GetAnimation ( std::string  animationName )

Definition at line 653 of file SO3NodeScol.cpp.

SAnim * SNode::GetAnimation ( unsigned short  animationIndex )

Definition at line 662 of file SO3NodeScol.cpp.

SAnimMap SNode::GetAnimations (  ) const

Definition at line 671 of file SO3NodeScol.cpp.

SNode * SNode::GetAutoTrackingTarget (  )

Definition at line 527 of file SO3NodeScol.cpp.

Ogre::Vector3 SNode::GetBoundingBoxCenter (  ) [virtual]
Remarks:
: the SNode implementation throws an exception, you must re-define this function in child classes that manage a bounding box.

Reimplemented in SCamera, SEntity, and SLight.

Definition at line 361 of file SO3NodeScol.cpp.

Ogre::Vector3 SNode::GetBoundingBoxSize (  ) [virtual]
Remarks:
: the SNode implementation throws an exception, you must re-define this function in child classes that manage a bounding box.

Reimplemented in SCamera, SEntity, and SLight.

Definition at line 355 of file SO3NodeScol.cpp.

bool SNode::GetCastShadows (  ) [virtual]
Remarks:
: the SNode implementation throws an exception, you must re-define this function in child classes that manage Shadow Casting.

Reimplemented in SEntity, and SLight.

Definition at line 338 of file SO3NodeScol.cpp.

const SNodeMap SNode::GetChildrenNodes (  ) const

Definition at line 274 of file SO3NodeScol.cpp.

Ogre::Quaternion SNode::GetGlobalOrientation (  ) [virtual]

Get the node orientation in global space terms.

Reimplemented in SBone.

Definition at line 469 of file SO3NodeScol.cpp.

Ogre::Vector3 SNode::GetGlobalPosition (  ) [virtual]

Get the node position in global space terms.

Reimplemented in SBone.

Definition at line 444 of file SO3NodeScol.cpp.

Ogre::Vector3 SNode::GetGlobalScale (  ) [virtual]

Get the node scale in global space terms.

Reimplemented in SBone.

Definition at line 495 of file SO3NodeScol.cpp.

Ogre::Quaternion SNode::GetInitialOrientation (  ) [virtual]

Get the node orientation before "play".

Reimplemented in SBone.

Definition at line 620 of file SO3NodeScol.cpp.

Ogre::Vector3 SNode::GetInitialPosition (  ) [virtual]

Get the node position before "play".

Reimplemented in SBone.

Definition at line 615 of file SO3NodeScol.cpp.

Ogre::Vector3 SNode::GetInitialScale (  ) [virtual]

Get the node scale before "play".

Reimplemented in SBone.

Definition at line 625 of file SO3NodeScol.cpp.

Ogre::MovableObject * SNode::GetMovableObjectPointer (  )

Definition at line 130 of file SO3NodeScol.cpp.

SNode::NodeType SNode::GetNodeType (  )

Definition at line 231 of file SO3NodeScol.cpp.

unsigned short SNode::GetNumAnimations (  )

Definition at line 648 of file SO3NodeScol.cpp.

int SNode::GetNumChildren (  ) [virtual]

Reimplemented in SBone.

Definition at line 279 of file SO3NodeScol.cpp.

Ogre::SceneNode * SNode::GetOgreSceneNodePointer (  )

Definition at line 125 of file SO3NodeScol.cpp.

Ogre::Quaternion SNode::GetOrientation (  ) [virtual]

Get the node orientation in local space terms.

Reimplemented in SBone.

Definition at line 396 of file SO3NodeScol.cpp.

Ogre::Quaternion SNode::GetOrientationFromNode ( SNode nodeRef )

Get the node orientation in another node reference

Definition at line 726 of file SO3NodeScol.cpp.

SScene * SNode::GetParentScene (  )

Definition at line 226 of file SO3NodeScol.cpp.

SNode * SNode::GetParentSceneNode (  )

Definition at line 269 of file SO3NodeScol.cpp.

Ogre::Vector3 SNode::GetPosition (  ) [virtual]

Get the node position in local space terms.

Reimplemented in SBone.

Definition at line 372 of file SO3NodeScol.cpp.

Ogre::Vector3 SNode::GetPositionFromNode ( SNode nodeRef )

Get the node position in another node reference

Definition at line 716 of file SO3NodeScol.cpp.

float SNode::GetRenderingDistance (  ) [virtual]
Remarks:
: the SNode implementation throws an exception, you must re-define this function in child classes that manage Rendering Distance.

Reimplemented in SCamera, SEntity, SLight, and SParticleSystem.

Definition at line 349 of file SO3NodeScol.cpp.

Ogre::Vector3 SNode::GetScale (  ) [virtual]

Get the node scale in local space terms.

Reimplemented in SBone.

Definition at line 433 of file SO3NodeScol.cpp.

Ogre::Vector3 SNode::GetScaleFromNode ( SNode nodeRef )

Get the node scale in another node reference

Definition at line 736 of file SO3NodeScol.cpp.

bool SNode::getSceneNodeHasBody (  )

Definition at line 165 of file SO3NodeScol.cpp.

bool SNode::getSceneNodeIsMouseClick (  )

Definition at line 145 of file SO3NodeScol.cpp.

bool SNode::getSceneNodeIsMouseForeground (  )

Definition at line 135 of file SO3NodeScol.cpp.

int SNode::getSceneNodeMouseFlags (  )

Definition at line 155 of file SO3NodeScol.cpp.

bool SNode::GetShowBoundingBox (  )

Definition at line 507 of file SO3NodeScol.cpp.

Ogre::Matrix4 SNode::GetTransformationMatrix (  ) [virtual]

Reimplemented in SBone.

Definition at line 367 of file SO3NodeScol.cpp.

bool SNode::GetVisible (  )

Reimplemented in SLight.

Definition at line 574 of file SO3NodeScol.cpp.

void SNode::LookAt ( Ogre::Vector3  targetPoint,
SNode::NodeTransformSpace  relativeTo,
Ogre::Vector3  localDirectionVector = Ogre::Vector3::NEGATIVE_UNIT_Z 
)

Definition at line 568 of file SO3NodeScol.cpp.

void SNode::Pitch ( float  radianAngle,
SNode::NodeTransformSpace  relativeTo = SNode::SO3_LOCAL_TS 
) [virtual]

Reimplemented in SBone.

Definition at line 532 of file SO3NodeScol.cpp.

void SNode::RemoveAnimation ( SAnim existingAnimation ) [protected]

Remove a SAnim object from the list of handled animations.

Definition at line 692 of file SO3NodeScol.cpp.

void SNode::RemoveAnimation ( std::string  animationName ) [protected]

Remove a SAnim object from the list of handled animations.

Definition at line 697 of file SO3NodeScol.cpp.

void SNode::ResetToInitialOrientation (  ) [virtual]

Reset the node Orientation as it was before "play" (as it was when "StoreInitialPRS" was called).

Reimplemented in SBone.

Definition at line 604 of file SO3NodeScol.cpp.

void SNode::ResetToInitialPosition (  )

Reset the node Position as it was before "play" (as it was when "StoreInitialPRS" was called).

Definition at line 598 of file SO3NodeScol.cpp.

void SNode::ResetToInitialPRS (  ) [virtual]

Reset the node Position, Rotation and Scale as it was before "play" (as it was when "StoreInitialPRS" was called).

Reimplemented in SBone.

Definition at line 593 of file SO3NodeScol.cpp.

void SNode::ResetToInitialScale (  )

Reset the node Scale as it was before "play" (as it was when "StoreInitialPRS" was called).

Definition at line 609 of file SO3NodeScol.cpp.

void SNode::Roll ( float  radianAngle,
SNode::NodeTransformSpace  relativeTo = SNode::SO3_LOCAL_TS 
) [virtual]

Reimplemented in SBone.

Definition at line 544 of file SO3NodeScol.cpp.

void SNode::Rotate ( Ogre::Vector3  axis,
float  radianAngle,
SNode::NodeTransformSpace  relativeTo = SNode::SO3_LOCAL_TS 
) [virtual]

Reimplemented in SBone.

Definition at line 550 of file SO3NodeScol.cpp.

void SNode::SetAutoTracking ( bool  autoTrack,
SNode targetNode = 0,
Ogre::Vector3  localDirectionVector = Ogre::Vector3::NEGATIVE_UNIT_Z,
Ogre::Vector3  offset = Ogre::Vector3::ZERO 
)

Definition at line 517 of file SO3NodeScol.cpp.

void SNode::SetCastShadows ( bool  castShadows ) [virtual]
Remarks:
: the SNode implementation throws an exception, you must re-define this function in child classes that manage Shadow Casting.

Reimplemented in SEntity, and SLight.

Definition at line 333 of file SO3NodeScol.cpp.

void SNode::SetDirection ( Ogre::Vector3  vec,
SNode::NodeTransformSpace  relativeTo = SNode::SO3_LOCAL_TS,
Ogre::Vector3  localDirectionVector = Ogre::Vector3::NEGATIVE_UNIT_Z 
)

Definition at line 562 of file SO3NodeScol.cpp.

void SNode::SetGlobalOrientation ( Ogre::Quaternion  quat ) [virtual]

Set the node orientation in global space terms.

Reimplemented in SBone.

Definition at line 474 of file SO3NodeScol.cpp.

void SNode::SetGlobalPosition ( Ogre::Vector3  pos ) [virtual]

Set the node position in global space terms.

Reimplemented in SBone.

Definition at line 449 of file SO3NodeScol.cpp.

void SNode::SetGlobalScale ( Ogre::Vector3  scale )

Set the node scale in global space terms.

Definition at line 500 of file SO3NodeScol.cpp.

void SNode::SetOrientation ( Ogre::Quaternion  quat ) [virtual]

Set the node orientation in local space terms.

Reimplemented in SBone.

Definition at line 401 of file SO3NodeScol.cpp.

void SNode::SetPosition ( Ogre::Vector3  pos ) [virtual]

Set the node position in local space terms.

Reimplemented in SBone.

Definition at line 377 of file SO3NodeScol.cpp.

void SNode::SetRenderingDistance ( float  distance ) [virtual]
Remarks:
: the SNode implementation throws an exception, you must re-define this function in child classes that manage Rendering Distance.

Reimplemented in SCamera, SEntity, SLight, and SParticleSystem.

Definition at line 344 of file SO3NodeScol.cpp.

void SNode::SetScale ( Ogre::Vector3  scale ) [virtual]

Set the node scale in local space terms.

Reimplemented in SBone, and SParticleSystem.

Definition at line 438 of file SO3NodeScol.cpp.

void SNode::setSceneNodeHasBody ( bool  mHasBody )

Definition at line 170 of file SO3NodeScol.cpp.

void SNode::setSceneNodeIsMouseClick ( bool  mClickable )

Definition at line 150 of file SO3NodeScol.cpp.

void SNode::setSceneNodeIsMouseForeground ( bool  mForeground )

Definition at line 140 of file SO3NodeScol.cpp.

void SNode::setSceneNodeMouseFlags ( int  flags )

Definition at line 160 of file SO3NodeScol.cpp.

void SNode::SetShowBoundingBox ( bool  showBounding )

Definition at line 512 of file SO3NodeScol.cpp.

void SNode::SetVisible ( bool  visible,
bool  cascade = true 
)

Definition at line 583 of file SO3NodeScol.cpp.

void SNode::StoreInitialPRS (  ) [virtual]

Store the node actual Position, Rotation and Scale before "play".

Reimplemented in SBone.

Definition at line 588 of file SO3NodeScol.cpp.

void SNode::Translate ( Ogre::Vector3  d,
SNode::NodeTransformSpace  relativeTo = SNode::SO3_PARENT_TS 
) [virtual]

Reimplemented in SBone.

Definition at line 556 of file SO3NodeScol.cpp.

void SNode::UpdateNodeBody ( bool  bScale )

Definition at line 176 of file SO3NodeScol.cpp.

void SNode::Yaw ( float  radianAngle,
SNode::NodeTransformSpace  relativeTo = SNode::SO3_LOCAL_TS 
) [virtual]

Reimplemented in SBone.

Definition at line 538 of file SO3NodeScol.cpp.


Member Data Documentation

Definition at line 70 of file SO3NodeScol.h.

Ogre::Vector3 SNode::currentBoneScale

Definition at line 71 of file SO3NodeScol.h.

Definition at line 73 of file SO3NodeScol.h.

Definition at line 67 of file SO3NodeScol.h.

Definition at line 65 of file SO3NodeScol.h.

Definition at line 66 of file SO3NodeScol.h.

Ogre::SceneNode* SNode::O3SceneNode [protected]

Definition at line 74 of file SO3NodeScol.h.

Ogre::MovableObject* SNode::ogreMovableObject [protected]

Definition at line 75 of file SO3NodeScol.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines