Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kge::sn::Bone Class Reference

#include <Bone.h>

Inheritance diagram for kge::sn::Bone:
kge::sn::SceneNode kge::KgeUnknown

Public Member Functions

 Bone ()
 Constructor.
 ~Bone ()
 Destructor.
void AddChild (SceneNode *child)
 Adds a node as child.
void PreRender (float elapsedTime)
 PrePare the final matrix.
virtual void UpdateFinalMat ()
 Update final matrix.
void Render ()
 Nothing to do.
void PostRender ()
 Nothing to do.
void Draw (bool WithMaterial, bool WithTransform, bool bPosition, bool bNormalTexcoord, bool bTangentBinormal)
 Nothing to do.
void SetName (const char *Name)
 Set a name for this bone.
void SetStartPosition (float *Pos)
 Setting the start position.
void SetStartRotation (float *Rot)
 Setting the start rotation.
void SetParent (int ParentIndex)
 Setting the parent index. Set -1 for no parent.
void SetParent (SceneNode *parent)
 Sets the node parent.
- Public Member Functions inherited from kge::sn::SceneNode
 SceneNode ()
 Constructor.
virtual ~SceneNode ()
 Destructor.
virtual bool AddEffect (efx::EffectType p, efx::Effect **ppOut)
virtual void SetSceneManager (SceneManager *smgr)
 Sets the scene manager and renderer pointer.
virtual void SetPosition (const math::Vector &v)
 Set the position of the scenenode.
virtual void SetRotation (const math::Vector &v)
 Set the rotation of the scenenode.
virtual void SetScale (const math::Vector &v)
 Set the scale of the scenenode.
virtual void SetAutomaticCulling (bool isTrue)
 Set Cutting Enable or Disable.
virtual void SetVisible (bool isVisible)
 Set Visible Enable or Disable.
virtual bool GetVisible ()
 Get Visible.
virtual bool IsVisibleInFrame ()
 Is it visible in this frame?
virtual const math::VectorGetPosition () const
 Returns the node position.
virtual const math::VectorGetRotation () const
 Returns the node rotation.
virtual const math::VectorGetScale () const
 Returns the node scale.
virtual math::MatrixGetAbsoluteMatrix () const
 Get the absolute matrix.
virtual math::MatrixGetFinalMatrix ()
 Get the final matrix.
virtual u32 GetMaterialCount ()
 Get the count of materials this node has.
virtual gfx::MaterialGetMaterial (u32 Index)
virtual math::SphereGetBoundingBox ()
 Returns the node bounding box.
virtual math::AABBGetAxisAlignedBoundingBox ()
 Returns the node Axis aligned bounding box.
virtual NodeType GetType () const
 Returns the node type.
virtual void RemoveChild (SceneNode *child)
virtual void RemoveChildren ()
 Removes all children of this node.
virtual const SceneNodeGetParent ()
 Returns the node parent.
virtual core::StringGetName ()
 Gets the node name.
virtual void SetID (int ID)
 Sets the node ID.
virtual int GetID ()
 Gets the node ID.
void EnableShadow (bool enable)
bool HasShadow () const
- Public Member Functions inherited from kge::KgeUnknown
 KgeUnknown ()
 Constructor.
virtual ~KgeUnknown ()
 Destructor.
virtual void AddRef ()
 Add a reference to the object.
virtual void DecRef ()
 Decrease a reference from the object. if its reference count get 0 then the object will destroy.
u32 GetRefCount ()
 Return resource reference count.
const char * GetDebugText ()
 returns the instance debug text.

Public Attributes

core::String m_sName
gfx::Vertex3 m_vStartPosition
 Bone name.
gfx::Vertex3 m_vStartRotation
 The start position.
math::Matrix m_matLocal
 The start rotation.
math::Matrix m_matAbs
 The Local matrix for transforms.
math::Matrix m_matFinal
 The Absolute matrix = Parent.m_matAbs * m_matLocal.
int m_iParent
 The Final matrix created from animations.

Protected Attributes

bool m_bAddedToSnmgr
 The Parent index. -1 means has no parent.
- Protected Attributes inherited from kge::sn::SceneNode
core::String m_sName
int m_iID
SceneManagerm_pSnMan
gfx::Rendererm_pRenderer
bool m_bVis
bool m_bAutoCulling
bool m_bVisFrame
SceneNodem_pParent
std::vector< SceneNode * > m_vChilds
std::vector< int > m_vEffectType
std::vector< efx::Effect * > m_vEffect
math::Matrixm_pAbsMat
math::Matrixm_pFinalMat
math::Vector m_Position
math::Vector m_Rotation
math::Vector m_Scale
math::Spherem_pBB
math::AABBm_pAABB
NodeType m_eNodeType
bool m_hasShadow

Additional Inherited Members

- Protected Member Functions inherited from kge::sn::SceneNode
virtual bool HasThisEffect (efx::EffectType p)

Detailed Description

Definition at line 19 of file Bone.h.

Constructor & Destructor Documentation

kge::sn::Bone::Bone ( )
inline

Constructor.

Definition at line 25 of file Bone.h.

kge::sn::Bone::~Bone ( )
inline

Destructor.

Definition at line 31 of file Bone.h.

Member Function Documentation

void kge::sn::Bone::AddChild ( SceneNode child)
inlinevirtual
void kge::sn::Bone::Draw ( bool  WithMaterial,
bool  WithTransform,
bool  bPosition,
bool  bNormalTexcoord,
bool  bTangentBinormal 
)
inlinevirtual

Nothing to do.

Implements kge::sn::SceneNode.

Definition at line 71 of file Bone.h.

void kge::sn::Bone::PostRender ( )
inlinevirtual

Nothing to do.

Implements kge::sn::SceneNode.

Definition at line 68 of file Bone.h.

void kge::sn::Bone::PreRender ( float  elapsedTime)
inlinevirtual

PrePare the final matrix.

Implements kge::sn::SceneNode.

Definition at line 49 of file Bone.h.

void kge::sn::Bone::Render ( )
inlinevirtual

Nothing to do.

Implements kge::sn::SceneNode.

Definition at line 65 of file Bone.h.

void kge::sn::Bone::SetName ( const char *  Name)
inlinevirtual

Set a name for this bone.

Reimplemented from kge::sn::SceneNode.

Definition at line 74 of file Bone.h.

void kge::sn::Bone::SetParent ( int  ParentIndex)
inline

Setting the parent index. Set -1 for no parent.

Definition at line 94 of file Bone.h.

void kge::sn::Bone::SetParent ( SceneNode parent)
inlinevirtual

Sets the node parent.

Reimplemented from kge::sn::SceneNode.

Definition at line 100 of file Bone.h.

void kge::sn::Bone::SetStartPosition ( float *  Pos)
inline

Setting the start position.

Definition at line 80 of file Bone.h.

void kge::sn::Bone::SetStartRotation ( float *  Rot)
inline

Setting the start rotation.

Definition at line 88 of file Bone.h.

virtual void kge::sn::Bone::UpdateFinalMat ( )
inlinevirtual

Update final matrix.

Reimplemented from kge::sn::SceneNode.

Definition at line 55 of file Bone.h.

Member Data Documentation

bool kge::sn::Bone::m_bAddedToSnmgr
protected

The Parent index. -1 means has no parent.

Definition at line 120 of file Bone.h.

int kge::sn::Bone::m_iParent

The Final matrix created from animations.

Definition at line 116 of file Bone.h.

math::Matrix kge::sn::Bone::m_matAbs

The Local matrix for transforms.

Definition at line 112 of file Bone.h.

math::Matrix kge::sn::Bone::m_matFinal

The Absolute matrix = Parent.m_matAbs * m_matLocal.

Definition at line 112 of file Bone.h.

math::Matrix kge::sn::Bone::m_matLocal

The start rotation.

Definition at line 112 of file Bone.h.

core::String kge::sn::Bone::m_sName

Definition at line 107 of file Bone.h.

gfx::Vertex3 kge::sn::Bone::m_vStartPosition

Bone name.

Definition at line 109 of file Bone.h.

gfx::Vertex3 kge::sn::Bone::m_vStartRotation

The start position.

Definition at line 109 of file Bone.h.


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