Ogre::Pose Class Reference
Animation

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:
[legend]

List of all members.

## Public Types

typedef map< size_t, Vector3 > ::type | VertexOffsetMap
| A collection of vertex offsets based on the vertex index.
typedef MapIterator < VertexOffsetMap > | VertexOffsetIterator
| An iterator over the vertex offsets.
typedef ConstMapIterator < VertexOffsetMap > | ConstVertexOffsetIterator
| An iterator over the vertex offsets.
typedef map< size_t, Vector3 > ::type | NormalsMap
| A collection of normals based on the vertex index.
typedef MapIterator< NormalsMap > | NormalsIterator
| An iterator over the vertex offsets.
typedef ConstMapIterator < NormalsMap > | ConstNormalsIterator
| An iterator over the vertex offsets.

## Public Member Functions

| Pose (ushort target, const String &name=StringUtil::BLANK)
| Constructor.
virtual | ~Pose ()
const String & | getName (void) const
| Return the name of the pose (may be blank)
ushort | getTarget (void) const
| Return the target geometry index of the pose.
bool | getIncludesNormals () const
| Return whether the pose vertices include normals.
void | addVertex (size_t index, const Vector3 &offset)
| Adds an offset to a vertex for this pose.
void | addVertex (size_t index, const Vector3 &offset, const Vector3 &normal)
| Adds an offset to a vertex and a new normal for this pose.
void | removeVertex (size_t index)
| Remove a vertex offset.
void | clearVertices (void)
| Clear all vertices.
ConstVertexOffsetIterator | getVertexOffsetIterator (void) const
| Gets an iterator over all the vertex offsets.
VertexOffsetIterator | getVertexOffsetIterator (void)
| Gets an iterator over all the vertex offsets.
const VertexOffsetMap & | getVertexOffsets (void) const
| Gets a const reference to the vertex offsets.
ConstNormalsIterator | getNormalsIterator (void) const
| Gets an iterator over all the vertex offsets.
NormalsIterator | getNormalsIterator (void)
| Gets an iterator over all the vertex offsets.
const NormalsMap & | getNormals (void) const
| Gets a const reference to the vertex offsets.
const HardwareVertexBufferSharedPtr & | _getHardwareVertexBuffer (const VertexData *origData) const
| Get a hardware vertex buffer version of the vertex offsets.
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).
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info
void * | operator new (size_t sz)
void * | operator new (size_t sz, void *ptr)
| placement operator new
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info
void * | operator new[] (size_t sz)
void | operator delete (void *ptr)
void | operator delete (void *ptr, void *)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)

## Protected Attributes

ushort | mTarget
| Target geometry index.
String | mName
| Optional name.
VertexOffsetMap | mVertexOffsetMap
| Primary storage, sparse vertex use.
NormalsMap | mNormalsMap
| Primary storage, sparse vertex use.
HardwareVertexBufferSharedPtr | mBuffer
| Derived hardware buffer, covers all vertices.

## Detailed Description

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

Remarks:
  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.

Definition at line 54 of file OgrePose.h.

## Member Typedef Documentation

typedef ConstMapIterator<NormalsMap> Ogre::Pose::ConstNormalsIterator

An iterator over the vertex offsets.

Definition at line 79 of file OgrePose.h.

typedef ConstMapIterator<VertexOffsetMap> Ogre::Pose::ConstVertexOffsetIterator

An iterator over the vertex offsets.

Definition at line 73 of file OgrePose.h.

typedef MapIterator<NormalsMap> Ogre::Pose::NormalsIterator

An iterator over the vertex offsets.

Definition at line 77 of file OgrePose.h.

typedef map<size_t, Vector3>::type Ogre::Pose::NormalsMap

A collection of normals based on the vertex index.

Definition at line 75 of file OgrePose.h.

typedef MapIterator<VertexOffsetMap> Ogre::Pose::VertexOffsetIterator

An iterator over the vertex offsets.

Definition at line 71 of file OgrePose.h.

typedef map<size_t, Vector3>::type Ogre::Pose::VertexOffsetMap

A collection of vertex offsets based on the vertex index.

Definition at line 69 of file OgrePose.h.

## Constructor & Destructor Documentation

Ogre::Pose::Pose | ( | ushort | target,
|  | const String & | name = `StringUtil::BLANK`
| ) |  |

Constructor.

Parameters:

  target | The target vertexdata index (0 for shared, 1+ for dedicated at the submesh index + 1)
  name | Optional name

virtual Ogre::Pose::~Pose | ( |  | ) | `[virtual]`

## Member Function Documentation

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

Get a hardware vertex buffer version of the vertex offsets.

void Ogre::Pose::addVertex | ( | size_t | index,
|  | const Vector3 & | offset
| ) |  |

Adds an offset to a vertex for this pose.

Parameters:

  index | The vertex index
  offset | The position offset for this pose

void Ogre::Pose::addVertex | ( | size_t | index,
|  | const Vector3 & | offset,
|  | const Vector3 & | normal
| ) |  |

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

Parameters:

  index | The vertex index
  offset | The position offset for this pose

void Ogre::Pose::clearVertices | ( | void |  | ) |

Clear all vertices.

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).

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

Return whether the pose vertices include normals.

Definition at line 81 of file OgrePose.h.

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

Return the name of the pose (may be blank)

Definition at line 65 of file OgrePose.h.

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

Gets a const reference to the vertex offsets.

Definition at line 113 of file OgrePose.h.

ConstNormalsIterator Ogre::Pose::getNormalsIterator | ( | void |  | ) | const

Gets an iterator over all the vertex offsets.

NormalsIterator Ogre::Pose::getNormalsIterator | ( | void |  | ) |

Gets an iterator over all the vertex offsets.

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

Return the target geometry index of the pose.

Definition at line 67 of file OgrePose.h.

ConstVertexOffsetIterator Ogre::Pose::getVertexOffsetIterator | ( | void |  | ) | const

Gets an iterator over all the vertex offsets.

VertexOffsetIterator Ogre::Pose::getVertexOffsetIterator | ( | void |  | ) |

Gets an iterator over all the vertex offsets.

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

Gets a const reference to the vertex offsets.

Definition at line 106 of file OgrePose.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | `[inherited]`

Definition at line 95 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  | `[inherited]`

Definition at line 101 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  | `[inherited]`

Definition at line 107 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | `[inherited]`

Definition at line 112 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  | `[inherited]`

Definition at line 118 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  | `[inherited]`

operator new, with debug line info

Definition at line 67 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | `[inherited]`

Definition at line 72 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr
| ) |  | `[inherited]`

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  | `[inherited]`

array operator new, with debug line info

Definition at line 85 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | `[inherited]`

Definition at line 90 of file OgreMemoryAllocatedObject.h.

void Ogre::Pose::removeVertex | ( | size_t | index | ) |

Remove a vertex offset.

## Member Data Documentation

HardwareVertexBufferSharedPtr Ogre::Pose::mBuffer`[mutable, protected]`

Derived hardware buffer, covers all vertices.

Definition at line 132 of file OgrePose.h.

String Ogre::Pose::mName`[protected]`

Optional name.

Definition at line 126 of file OgrePose.h.

NormalsMap Ogre::Pose::mNormalsMap`[protected]`

Primary storage, sparse vertex use.

Definition at line 130 of file OgrePose.h.

ushort Ogre::Pose::mTarget`[protected]`

Target geometry index.

Definition at line 124 of file OgrePose.h.

VertexOffsetMap Ogre::Pose::mVertexOffsetMap`[protected]`

Primary storage, sparse vertex use.

Definition at line 128 of file OgrePose.h.

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

- OgrePose.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Sep 2 2012 07:27:34