OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgrePose.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 #ifndef __OGRE_POSE_H
29 #define __OGRE_POSE_H
30 
31 #include "OgrePrerequisites.h"
32 #include "OgreCommon.h"
34 #include "OgreIteratorWrappers.h"
35 #include "OgreHeaderPrefix.h"
36 
37 namespace Ogre {
38 
55  {
56  public:
62  Pose(ushort target, const String& name = BLANKSTRING);
63  virtual ~Pose();
65  const String& getName(void) const { return mName; }
67  ushort getTarget(void) const { return mTarget; }
81  bool getIncludesNormals() const { return !mNormalsMap.empty(); }
82 
87  void addVertex(size_t index, const Vector3& offset);
88 
93  void addVertex(size_t index, const Vector3& offset, const Vector3& normal);
94 
96  void removeVertex(size_t index);
97 
99  void clearVertices(void);
100 
102  ConstVertexOffsetIterator getVertexOffsetIterator(void) const;
104  VertexOffsetIterator getVertexOffsetIterator(void);
106  const VertexOffsetMap& getVertexOffsets(void) const { return mVertexOffsetMap; }
107 
109  ConstNormalsIterator getNormalsIterator(void) const;
111  NormalsIterator getNormalsIterator(void);
113  const NormalsMap& getNormals(void) const { return mNormalsMap; }
114 
116  const HardwareVertexBufferSharedPtr& _getHardwareVertexBuffer(const VertexData* origData) const;
117 
121  Pose* clone(void) const;
122  protected:
133  };
135 
139 }
140 
141 #include "OgreHeaderSuffix.h"
142 
143 #endif
#define _OgreExport
Definition: OgrePlatform.h:255
VertexOffsetMap mVertexOffsetMap
Primary storage, sparse vertex use.
Definition: OgrePose.h:128
A pose is a linked set of vertex offsets applying to one set of vertex data.
Definition: OgrePose.h:54
Shared pointer implementation used to share vertex buffers.
MapIterator< NormalsMap > NormalsIterator
An iterator over the vertex offsets.
Definition: OgrePose.h:77
const NormalsMap & getNormals(void) const
Gets a const reference to the vertex offsets.
Definition: OgrePose.h:113
HardwareVertexBufferSharedPtr mBuffer
Derived hardware buffer, covers all vertices.
Definition: OgrePose.h:132
const String BLANKSTRING
Constant blank string, useful for returning by ref where local does not exist.
Definition: OgreCommon.h:574
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
vector< Pose * >::type PoseList
Definition: OgrePose.h:134
bool getIncludesNormals() const
Return whether the pose vertices include normals.
Definition: OgrePose.h:81
ushort getTarget(void) const
Return the target geometry index of the pose.
Definition: OgrePose.h:67
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
NormalsMap mNormalsMap
Primary storage, sparse vertex use.
Definition: OgrePose.h:130
map< size_t, Vector3 >::type VertexOffsetMap
A collection of vertex offsets based on the vertex index.
Definition: OgrePose.h:69
ConstMapIterator< VertexOffsetMap > ConstVertexOffsetIterator
An iterator over the vertex offsets.
Definition: OgrePose.h:73
Standard 3-dimensional vector.
Definition: OgreVector3.h:50
ConstMapIterator< NormalsMap > ConstNormalsIterator
An iterator over the vertex offsets.
Definition: OgrePose.h:79
const String & getName(void) const
Return the name of the pose (may be blank)
Definition: OgrePose.h:65
ushort mTarget
Target geometry index.
Definition: OgrePose.h:124
unsigned short ushort
Summary class collecting together vertex source information.
Concrete IteratorWrapper for const access to the underlying key-value container.
String mName
Optional name.
Definition: OgrePose.h:126
_StringBase String
Definition: OgreCommon.h:53
map< size_t, Vector3 >::type NormalsMap
A collection of normals based on the vertex index.
Definition: OgrePose.h:75
MapIterator< VertexOffsetMap > VertexOffsetIterator
An iterator over the vertex offsets.
Definition: OgrePose.h:71
const VertexOffsetMap & getVertexOffsets(void) const
Gets a const reference to the vertex offsets.
Definition: OgrePose.h:106