OgreBone.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __Bone_H__
#define __Bone_H__
#include "OgrePrerequisites.h"
#include "OgreNode.h"
namespace Ogre
{
class _OgreExport Bone : public Node
{
public:
Bone(unsigned short handle, Skeleton* creator);
Bone(const String& name, unsigned short handle, Skeleton* creator);
~Bone();
Bone* createChild(unsigned short handle,
const Vector3& translate = Vector3::ZERO, const Quaternion& rotate = Quaternion::IDENTITY);
unsigned short getHandle(void) const;
void setBindingPose(void);
void reset(void);
void setManuallyControlled(bool manuallyControlled);
bool isManuallyControlled() const;
void _getOffsetTransform(Matrix4& m) const;
const Vector3& _getBindingPoseInverseScale(void) const { return mBindDerivedInverseScale; }
const Vector3& _getBindingPoseInversePosition(void) const { return mBindDerivedInversePosition; }
const Quaternion& _getBindingPoseInverseOrientation(void) const { return mBindDerivedInverseOrientation; }
void needUpdate(bool forceParentUpdate = false);
protected:
unsigned short mHandle;
bool mManuallyControlled;
Node* createChildImpl(void);
Node* createChildImpl(const String& name);
Skeleton* mCreator;
Vector3 mBindDerivedInverseScale;
Quaternion mBindDerivedInverseOrientation;
Vector3 mBindDerivedInversePosition;
};
}
#endif
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::Quaternion
Implementation of a Quaternion, i.e.
Definition: OgreQuaternion.h:57
Ogre::Skeleton
A collection of Bone objects used to animate a skinned mesh.
Definition: OgreSkeleton.h:87
Ogre::Bone::mHandle
unsigned short mHandle
The numeric handle of this bone.
Definition: OgreBone.h:128
Ogre::Bone::mBindDerivedInverseOrientation
Quaternion mBindDerivedInverseOrientation
The inversed derived orientation of the bone in the binding pose.
Definition: OgreBone.h:144
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:78
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:51
OgreNode.h
OgrePrerequisites.h
Ogre::Bone
A bone in a skeleton.
Definition: OgreBone.h:51
Ogre::Node
Class representing a general-purpose node an articulated scene graph.
Definition: OgreNode.h:64
Ogre::Bone::mBindDerivedInversePosition
Vector3 mBindDerivedInversePosition
The inversed derived position of the bone in the binding pose.
Definition: OgreBone.h:146
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::Bone::mCreator
Skeleton * mCreator
Pointer back to creator, for child creation (not smart ptr so child does not preserve parent) ...
Definition: OgreBone.h:139
Ogre::Bone::mManuallyControlled
bool mManuallyControlled
Bones set as manuallyControlled are not reseted in Skeleton::reset()
Definition: OgreBone.h:131
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::Bone::_getBindingPoseInverseScale
const Vector3 & _getBindingPoseInverseScale(void) const
Gets the inverted binding pose scale.
Definition: OgreBone.h:116
Ogre::Quaternion::IDENTITY
static const Quaternion IDENTITY
Definition: OgreQuaternion.h:301
Ogre::Bone::mBindDerivedInverseScale
Vector3 mBindDerivedInverseScale
The inversed derived scale of the bone in the binding pose.
Definition: OgreBone.h:142
Ogre::Bone::_getBindingPoseInverseOrientation
const Quaternion & _getBindingPoseInverseOrientation(void) const
Gets the inverted binding pose orientation.
Definition: OgreBone.h:120
Ogre::Vector3::ZERO
static const Vector3 ZERO
Definition: OgreVector3.h:800
Ogre::Bone::_getBindingPoseInversePosition
const Vector3 & _getBindingPoseInversePosition(void) const
Gets the inverted binding pose position.
Definition: OgreBone.h:118

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.