OGRE  1.7
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OgreSkeletonFileFormat.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-2011 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 #ifndef __SkeletonFileFormat_H__
29 #define __SkeletonFileFormat_H__
30 
31 #include "OgrePrerequisites.h"
32 
33 namespace Ogre {
34 
56  SKELETON_HEADER = 0x1000,
57  // char* version : Version number check
58  SKELETON_BONE = 0x2000,
59  // Repeating section defining each bone in the system.
60  // Bones are assigned indexes automatically based on their order of declaration
61  // starting with 0.
62 
63  // char* name : name of the bone
64  // unsigned short handle : handle of the bone, should be contiguous & start at 0
65  // Vector3 position : position of this bone relative to parent
66  // Quaternion orientation : orientation of this bone relative to parent
67  // Vector3 scale : scale of this bone relative to parent
68 
70  // Record of the parent of a single bone, used to build the node tree
71  // Repeating section, listed in Bone Index order, one per Bone
72 
73  // unsigned short handle : child bone
74  // unsigned short parentHandle : parent bone
75 
77  // A single animation for this skeleton
78 
79  // char* name : Name of the animation
80  // float length : Length of the animation in seconds
81 
83  // A single animation track (relates to a single bone)
84  // Repeating section (within SKELETON_ANIMATION)
85 
86  // unsigned short boneIndex : Index of bone to apply to
87 
89  // A single keyframe within the track
90  // Repeating section
91 
92  // float time : The time position (seconds)
93  // Quaternion rotate : Rotation to apply at this keyframe
94  // Vector3 translate : Translation to apply at this keyframe
95  // Vector3 scale : Scale to apply at this keyframe
97  // Link to another skeleton, to re-use its animations
98 
99  // char* skeletonName : name of skeleton to get animations from
100  // float scale : scale to apply to trans/scale keys
101 
102  };
106 } // namespace
107 
108 
109 #endif
SkeletonChunkID
Definition of the OGRE .skeleton file format.