OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreOldBone.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2014 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef __Bone_H__
30 #define __Bone_H__
31 
32 #include "OgrePrerequisites.h"
33 #include "OgreOldNode.h"
34 
35 
36 namespace Ogre
37 {
51  class _OgreExport OldBone : public OldNode
52  {
53  public:
55  OldBone(unsigned short handle, Skeleton* creator);
57  OldBone(const String& name, unsigned short handle, Skeleton* creator);
58  ~OldBone();
59 
71  OldBone* createChild(unsigned short handle,
72  const Vector3& translate = Vector3::ZERO, const Quaternion& rotate = Quaternion::IDENTITY);
73 
74 
76  unsigned short getHandle(void) const;
77 
81  void setBindingPose(void);
82 
89  void reset(void);
90 
103  void setManuallyControlled(bool manuallyControlled);
104 
106  bool isManuallyControlled() const;
107 
108 
113  void _getOffsetTransform(Matrix4& m) const;
114 
116  const Vector3& _getBindingPoseInverseScale(void) const { return mBindDerivedInverseScale; }
118  const Vector3& _getBindingPoseInversePosition(void) const { return mBindDerivedInversePosition; }
120  const Quaternion& _getBindingPoseInverseOrientation(void) const { return mBindDerivedInverseOrientation; }
121 
123  void needUpdate(bool forceParentUpdate = false);
124 
125 
126  protected:
128  unsigned short mHandle;
129 
132 
134  OldNode* createChildImpl(void);
136  OldNode* createChildImpl(const String& name);
137 
140 
147  };
148 
152 }
153 
154 #endif
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:79
unsigned short mHandle
The numeric handle of this bone.
Definition: OgreOldBone.h:128
#define _OgreExport
Definition: OgrePlatform.h:255
bool mManuallyControlled
Bones set as manuallyControlled are not reseted in Skeleton::reset()
Definition: OgreOldBone.h:131
static const Vector3 ZERO
Definition: OgreVector3.h:807
Skeleton * mCreator
Pointer back to creator, for child creation (not smart ptr so child does not preserve parent) ...
Definition: OgreOldBone.h:139
Class representing a general-purpose OldNode an articulated scene graph.
Definition: OgreOldNode.h:63
Implementation of a Quaternion, i.e.
Vector3 mBindDerivedInverseScale
The inversed derived scale of the bone in the binding pose.
Definition: OgreOldBone.h:142
static const Quaternion IDENTITY
const Vector3 & _getBindingPoseInverseScale(void) const
Gets the inverted binding pose scale.
Definition: OgreOldBone.h:116
const Vector3 & _getBindingPoseInversePosition(void) const
Gets the inverted binding pose position.
Definition: OgreOldBone.h:118
Quaternion mBindDerivedInverseOrientation
The inversed derived orientation of the bone in the binding pose.
Definition: OgreOldBone.h:144
const Quaternion & _getBindingPoseInverseOrientation(void) const
Gets the inverted binding pose orientation.
Definition: OgreOldBone.h:120
A bone in a skeleton.
Definition: OgreOldBone.h:51
Standard 3-dimensional vector.
Definition: OgreVector3.h:50
Vector3 mBindDerivedInversePosition
The inversed derived position of the bone in the binding pose.
Definition: OgreOldBone.h:146
_StringBase String
Definition: OgreCommon.h:53
A collection of OldBone objects used to animate a skinned mesh.
Definition: OgreSkeleton.h:84