OGRE  master
Object-Oriented Graphics Rendering Engine
Ogre::Pose Class Reference

A pose is a linked set of vertex offsets applying to one set of vertex data. More...

#include <OgrePose.h>

+ Inheritance diagram for Ogre::Pose:

Public Types

typedef ConstMapIterator< NormalsMapConstNormalsIterator
 An iterator over the vertex offsets. More...
 
typedef ConstMapIterator< VertexOffsetMapConstVertexOffsetIterator
 An iterator over the vertex offsets. More...
 
typedef MapIterator< NormalsMapNormalsIterator
 An iterator over the vertex offsets. More...
 
typedef std::map< uint32, Vector3fNormalsMap
 A collection of normals based on the vertex index. More...
 
typedef MapIterator< VertexOffsetMapVertexOffsetIterator
 An iterator over the vertex offsets. More...
 
typedef std::map< uint32, Vector3fVertexOffsetMap
 A collection of vertex offsets based on the vertex index. More...
 

Public Member Functions

 Pose (ushort target, const String &name=BLANKSTRING)
 Constructor. More...
 
const HardwareVertexBufferSharedPtr_getHardwareVertexBuffer (const VertexData *origData) const
 Get a hardware vertex buffer version of the vertex offsets. More...
 
NormalsMap_getNormals ()
 writable access to the vertex normals for offline processing More...
 
VertexOffsetMap_getVertexOffsets ()
 writable access to the vertex offsets for offline processing More...
 
void addVertex (uint32 index, const Vector3f &offset)
 Adds an offset to a vertex for this pose. More...
 
void addVertex (uint32 index, const Vector3f &offset, const Vector3f &normal)
 Adds an offset to a vertex and a new normal for this pose. More...
 
void clearVertices (void)
 Clear all vertices. More...
 
Poseclone (void) const
 Clone this pose and create another one configured exactly the same way (only really useful for cloning holders of this class). More...
 
bool getIncludesNormals () const
 Return whether the pose vertices include normals. More...
 
const StringgetName (void) const
 Return the name of the pose (may be blank) More...
 
const NormalsMapgetNormals (void) const
 Gets a const reference to the vertex normals. More...
 
ConstNormalsIterator getNormalsIterator (void) const
 
NormalsIterator getNormalsIterator (void)
 
ushort getTarget (void) const
 Return the target geometry index of the pose. More...
 
ConstVertexOffsetIterator getVertexOffsetIterator (void) const
 
VertexOffsetIterator getVertexOffsetIterator (void)
 
const VertexOffsetMapgetVertexOffsets (void) const
 Gets a const reference to the vertex offsets. More...
 
void removeVertex (uint32 index)
 Remove a vertex offset. More...
 

Detailed Description

A pose is a linked set of vertex offsets applying to one set of vertex data.

The target index referred to by the pose has a meaning set by the user of this class; but for example when used by Mesh it refers to either the Mesh shared geometry (0) or a SubMesh dedicated geometry (1+). Pose instances can be referred to by keyframes in VertexAnimationTrack in order to animate based on blending poses together.

Member Typedef Documentation

◆ VertexOffsetMap

A collection of vertex offsets based on the vertex index.

◆ VertexOffsetIterator

An iterator over the vertex offsets.

◆ ConstVertexOffsetIterator

An iterator over the vertex offsets.

◆ NormalsMap

A collection of normals based on the vertex index.

◆ NormalsIterator

An iterator over the vertex offsets.

◆ ConstNormalsIterator

An iterator over the vertex offsets.

Constructor & Destructor Documentation

◆ Pose()

Ogre::Pose::Pose ( ushort  target,
const String name = BLANKSTRING 
)

Constructor.

Parameters
targetThe target vertexdata index (0 for shared, 1+ for dedicated at the submesh index + 1)
nameOptional name

Member Function Documentation

◆ getName()

const String& Ogre::Pose::getName ( void  ) const
inline

Return the name of the pose (may be blank)

◆ getTarget()

ushort Ogre::Pose::getTarget ( void  ) const
inline

Return the target geometry index of the pose.

Referenced by Ogre::Lod0Stripifier::StripLod0Vertices().

◆ getIncludesNormals()

bool Ogre::Pose::getIncludesNormals ( ) const
inline

Return whether the pose vertices include normals.

Referenced by Ogre::Lod0Stripifier::~Lod0Stripifier().

◆ addVertex() [1/2]

void Ogre::Pose::addVertex ( uint32  index,
const Vector3f offset 
)

Adds an offset to a vertex for this pose.

Parameters
indexThe vertex index
offsetThe position offset for this pose

Referenced by Ogre::Lod0Stripifier::~Lod0Stripifier().

◆ addVertex() [2/2]

void Ogre::Pose::addVertex ( uint32  index,
const Vector3f offset,
const Vector3f normal 
)

Adds an offset to a vertex and a new normal for this pose.

Parameters
indexThe vertex index
offsetThe position offset for this pose
normalThe new vertex normal

◆ removeVertex()

void Ogre::Pose::removeVertex ( uint32  index)

Remove a vertex offset.

◆ clearVertices()

void Ogre::Pose::clearVertices ( void  )

Clear all vertices.

Referenced by Ogre::Lod0Stripifier::~Lod0Stripifier().

◆ getVertexOffsetIterator() [1/2]

ConstVertexOffsetIterator Ogre::Pose::getVertexOffsetIterator ( void  ) const
Deprecated:
use getVertexOffsets

◆ getVertexOffsetIterator() [2/2]

VertexOffsetIterator Ogre::Pose::getVertexOffsetIterator ( void  )
Deprecated:
use getVertexOffsets

◆ getVertexOffsets()

const VertexOffsetMap& Ogre::Pose::getVertexOffsets ( void  ) const
inline

Gets a const reference to the vertex offsets.

Referenced by Ogre::Lod0Stripifier::~Lod0Stripifier().

◆ getNormalsIterator() [1/2]

ConstNormalsIterator Ogre::Pose::getNormalsIterator ( void  ) const
Deprecated:
use getNormals

◆ getNormalsIterator() [2/2]

NormalsIterator Ogre::Pose::getNormalsIterator ( void  )
Deprecated:
use getNormals

◆ getNormals()

const NormalsMap& Ogre::Pose::getNormals ( void  ) const
inline

Gets a const reference to the vertex normals.

Referenced by Ogre::Lod0Stripifier::~Lod0Stripifier().

◆ _getVertexOffsets()

VertexOffsetMap& Ogre::Pose::_getVertexOffsets ( )
inline

writable access to the vertex offsets for offline processing

Attention
does not invalidate the vertexbuffer

◆ _getNormals()

NormalsMap& Ogre::Pose::_getNormals ( )
inline

writable access to the vertex normals for offline processing

Attention
does not invalidate the vertexbuffer

References OGRE_NODISCARD.

◆ _getHardwareVertexBuffer()

const HardwareVertexBufferSharedPtr& Ogre::Pose::_getHardwareVertexBuffer ( const VertexData origData) const

Get a hardware vertex buffer version of the vertex offsets.

◆ clone()

Pose* Ogre::Pose::clone ( void  ) const

Clone this pose and create another one configured exactly the same way (only really useful for cloning holders of this class).


The documentation for this class was generated from the following file: