diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2005-04-23 15:36:44 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2005-04-23 15:36:44 +0400 |
commit | 2ac1ef13e20949374720afec1d8da59cce83a45c (patch) | |
tree | 845081429f553696e648bc13e863bcff73754dc7 /source/gameengine/Converter/BL_ArmatureObject.h | |
parent | c333ba8dfaa8e92483d29f3cf77988ce0e1beb3a (diff) |
Added bone parent relationship.
Diffstat (limited to 'source/gameengine/Converter/BL_ArmatureObject.h')
-rw-r--r-- | source/gameengine/Converter/BL_ArmatureObject.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/source/gameengine/Converter/BL_ArmatureObject.h b/source/gameengine/Converter/BL_ArmatureObject.h index b81a6f0eddd..7244d08da76 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.h +++ b/source/gameengine/Converter/BL_ArmatureObject.h @@ -37,7 +37,11 @@ #include "SG_IObject.h" +struct bArmature; +struct Bone; + class BL_ActionActuator; +class MT_Matrix4x4; class BL_ArmatureObject : public KX_GameObject { @@ -47,10 +51,10 @@ public: virtual void ProcessReplica(BL_ArmatureObject *replica); class BL_ActionActuator * GetActiveAction(); BL_ArmatureObject(void* sgReplicationInfo, SG_Callbacks callbacks, - struct bArmature *arm, + bArmature *armature, struct bPose *pose) : KX_GameObject(sgReplicationInfo,callbacks), - m_armature(arm), + m_armature(armature), m_pose(pose), m_mrdPose(NULL), m_lastframe(0.), @@ -65,7 +69,17 @@ public: void SetPose (struct bPose *pose); void ApplyPose(); bool SetActiveAction(class BL_ActionActuator *act, short priority, double curtime); - struct bArmature * GetArmature(){return m_armature;}; + + struct bArmature * GetArmature() { return m_armature; } + + const struct bArmature * GetArmature() const { return m_armature; } + + /// Retrieve the pose matrix for the specified bone. + /// Returns true on success. + bool GetBoneMatrix(Bone* bone, MT_Matrix4x4& matrix) const; + + /// Returns the bone length. The end of the bone is in the local y direction. + float GetBoneLength(Bone* bone) const; protected: struct bArmature *m_armature; |