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-2013 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 "OgreString.h"
34 #include "OgreVector3.h"
35 #include "OgreIteratorWrappers.h"
36 #include "OgreHeaderPrefix.h"
37 
38 namespace Ogre {
39 
56  {
57  public:
63  Pose(ushort target, const String& name = StringUtil::BLANK);
64  virtual ~Pose();
66  const String& getName(void) const { return mName; }
68  ushort getTarget(void) const { return mTarget; }
82  bool getIncludesNormals() const { return !mNormalsMap.empty(); }
83 
88  void addVertex(size_t index, const Vector3& offset);
89 
94  void addVertex(size_t index, const Vector3& offset, const Vector3& normal);
95 
97  void removeVertex(size_t index);
98 
100  void clearVertices(void);
101 
107  const VertexOffsetMap& getVertexOffsets(void) const { return mVertexOffsetMap; }
108 
114  const NormalsMap& getNormals(void) const { return mNormalsMap; }
115 
118 
122  Pose* clone(void) const;
123  protected:
134  };
136 
140 }
141 
142 #include "OgreHeaderSuffix.h"
143 
144 #endif
OgreHeaderSuffix.h
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:59
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::Pose::getName
const String & getName(void) const
Return the name of the pose (may be blank)
Definition: OgrePose.h:66
Ogre::map
Definition: OgrePrerequisites.h:534
Ogre::ushort
unsigned short ushort
Definition: OgrePrerequisites.h:113
Ogre::Pose::getNormalsIterator
ConstNormalsIterator getNormalsIterator(void) const
Gets an iterator over all the vertex offsets.
Ogre::Pose::ConstVertexOffsetIterator
ConstMapIterator< VertexOffsetMap > ConstVertexOffsetIterator
An iterator over the vertex offsets.
Definition: OgrePose.h:74
Ogre::Pose::Pose
Pose(ushort target, const String &name=StringUtil::BLANK)
Constructor.
Ogre::Pose::_getHardwareVertexBuffer
const HardwareVertexBufferSharedPtr & _getHardwareVertexBuffer(const VertexData *origData) const
Get a hardware vertex buffer version of the vertex offsets.
Ogre::Pose::ConstNormalsIterator
ConstMapIterator< NormalsMap > ConstNormalsIterator
An iterator over the vertex offsets.
Definition: OgrePose.h:80
Ogre::Pose::clearVertices
void clearVertices(void)
Clear all vertices.
Ogre::Pose::mName
String mName
Optional name.
Definition: OgrePose.h:127
Ogre::Pose::addVertex
void addVertex(size_t index, const Vector3 &offset, const Vector3 &normal)
Adds an offset to a vertex and a new normal for this pose.
Ogre::Pose::NormalsMap
map< size_t, Vector3 >::type NormalsMap
A collection of normals based on the vertex index.
Definition: OgrePose.h:76
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::Pose::removeVertex
void removeVertex(size_t index)
Remove a vertex offset.
Ogre::Pose::getVertexOffsetIterator
VertexOffsetIterator getVertexOffsetIterator(void)
Gets an iterator over all the vertex offsets.
Ogre::Pose
A pose is a linked set of vertex offsets applying to one set of vertex data.
Definition: OgrePose.h:56
Ogre::Pose::mVertexOffsetMap
VertexOffsetMap mVertexOffsetMap
Primary storage, sparse vertex use.
Definition: OgrePose.h:129
Ogre::Pose::NormalsIterator
MapIterator< NormalsMap > NormalsIterator
An iterator over the vertex offsets.
Definition: OgrePose.h:78
Ogre::VertexData
Summary class collecting together vertex source information.
Definition: OgreVertexIndexData.h:50
Ogre::Pose::getVertexOffsets
const VertexOffsetMap & getVertexOffsets(void) const
Gets a const reference to the vertex offsets.
Definition: OgrePose.h:107
Ogre::StringUtil::BLANK
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
Definition: OgreString.h:196
Ogre::PoseList
vector< Pose * >::type PoseList
Definition: OgrePose.h:135
Ogre::Pose::getNormalsIterator
NormalsIterator getNormalsIterator(void)
Gets an iterator over all the vertex offsets.
OgreHeaderPrefix.h
OgrePrerequisites.h
Ogre::HardwareVertexBufferSharedPtr
Shared pointer implementation used to share vertex buffers.
Definition: OgreHardwareVertexBuffer.h:87
Ogre::Pose::getTarget
ushort getTarget(void) const
Return the target geometry index of the pose.
Definition: OgrePose.h:68
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::Pose::~Pose
virtual ~Pose()
Ogre::MapIterator
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:319
OgreIteratorWrappers.h
OgreHardwareVertexBuffer.h
Ogre::Pose::getVertexOffsetIterator
ConstVertexOffsetIterator getVertexOffsetIterator(void) const
Gets an iterator over all the vertex offsets.
Ogre::Pose::clone
Pose * clone(void) const
Clone this pose and create another one configured exactly the same way (only really useful for clonin...
Ogre::Pose::mBuffer
HardwareVertexBufferSharedPtr mBuffer
Derived hardware buffer, covers all vertices.
Definition: OgrePose.h:133
Ogre::Pose::getIncludesNormals
bool getIncludesNormals() const
Return whether the pose vertices include normals.
Definition: OgrePose.h:82
Ogre::Pose::VertexOffsetIterator
MapIterator< VertexOffsetMap > VertexOffsetIterator
An iterator over the vertex offsets.
Definition: OgrePose.h:72
Ogre::ConstMapIterator
Concrete IteratorWrapper for const access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:352
Ogre::Pose::mNormalsMap
NormalsMap mNormalsMap
Primary storage, sparse vertex use.
Definition: OgrePose.h:131
OgreString.h
Ogre::vector
Definition: OgrePrerequisites.h:492
Ogre::Pose::mTarget
ushort mTarget
Target geometry index.
Definition: OgrePose.h:125
OgreVector3.h
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:52
Ogre::Pose::addVertex
void addVertex(size_t index, const Vector3 &offset)
Adds an offset to a vertex for this pose.
Ogre::Pose::VertexOffsetMap
map< size_t, Vector3 >::type VertexOffsetMap
A collection of vertex offsets based on the vertex index.
Definition: OgrePose.h:70
Ogre::Pose::getNormals
const NormalsMap & getNormals(void) const
Gets a const reference to the vertex offsets.
Definition: OgrePose.h:114

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