OGRE-Next: Ogre::v1::SkeletonSerializer Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::v1::SkeletonSerializer Class Reference
Core » Animation

Class for serialising skeleton data to/from an OGRE .skeleton file. More...

`#include <OgreSkeletonSerializer.h>`

Inheritance diagram for Ogre::v1::SkeletonSerializer:
[legend]

## Public Member Functions
| SkeletonSerializer ()
| ~SkeletonSerializer () override
void | exportSkeleton (const Skeleton *pSkeleton, const String &filename, SkeletonVersion ver=SKELETON_VERSION_LATEST, Endian endianMode=ENDIAN_NATIVE)
| Exports a skeleton to the file specified.
void | exportSkeleton (const Skeleton *pSkeleton, DataStreamPtr stream, SkeletonVersion ver=SKELETON_VERSION_LATEST, Endian endianMode=ENDIAN_NATIVE)
| Exports a skeleton to the stream specified.
void | importSkeleton (DataStreamPtr &stream, Skeleton *pDest)
| Imports Skeleton and animation data from a .skeleton file DataStream.
Public Member Functions inherited from Ogre::Serializer
| Serializer ()
virtual | ~Serializer ()

## Additional Inherited Members
Public Types inherited from Ogre::Serializer
enum | Endian { ENDIAN_NATIVE , ENDIAN_BIG , ENDIAN_LITTLE }
| The endianness of written files. More...

## Detailed Description

Class for serialising skeleton data to/from an OGRE .skeleton file.

Remarks
  This class allows exporters to write OGRE .skeleton files easily, and allows the OGRE engine to import .skeleton files into instantiated OGRE Skeleton objects. Note that a .skeleton file includes not only the Skeleton, but also definitions of any Animations it uses.

  To export a Skeleton:
  1. Create a Skeleton object and populate it using it's methods.
  2. Call the exportSkeleton method

## Constructor & Destructor Documentation

## ◆ SkeletonSerializer()

Ogre::v1::SkeletonSerializer::SkeletonSerializer | ( |  | ) |

## ◆ ~SkeletonSerializer()

Ogre::v1::SkeletonSerializer::~SkeletonSerializer | ( |  | ) |
| override

## Member Function Documentation

## ◆ exportSkeleton() [1/2]

void Ogre::v1::SkeletonSerializer::exportSkeleton | ( | const Skeleton * | pSkeleton,
|  | const String & | filename,
|  | SkeletonVersion | ver = SKELETON_VERSION_LATEST,
|  | Endian | endianMode = ENDIAN_NATIVE )

Exports a skeleton to the file specified.

Remarks
  This method takes an externally created Skeleton object, and exports both it and animations it uses to a .skeleton file.

Parameters

  pSkeleton | Weak reference to the Skeleton to export
  filename | The destination filename
  endianMode | The endian mode to write in

References Ogre::Serializer::ENDIAN_NATIVE, and Ogre::v1::SKELETON_VERSION_LATEST.

## ◆ exportSkeleton() [2/2]

void Ogre::v1::SkeletonSerializer::exportSkeleton | ( | const Skeleton * | pSkeleton,
|  | DataStreamPtr | stream,
|  | SkeletonVersion | ver = SKELETON_VERSION_LATEST,
|  | Endian | endianMode = ENDIAN_NATIVE )

Exports a skeleton to the stream specified.

Remarks
  This method takes an externally created Skeleton object, and exports both it and animations it uses to a .skeleton file.

Parameters

  pSkeleton | Weak reference to the Skeleton to export
  stream | The destination stream
  endianMode | The endian mode to write in

References Ogre::Serializer::ENDIAN_NATIVE, and Ogre::v1::SKELETON_VERSION_LATEST.

## ◆ importSkeleton()

void Ogre::v1::SkeletonSerializer::importSkeleton | ( | DataStreamPtr & | stream,
|  | Skeleton * | pDest )

Imports Skeleton and animation data from a .skeleton file DataStream.

Remarks
  This method imports data from a DataStream opened from a .skeleton file and places it's contents into the Skeleton object which is passed in.

Parameters

  stream | The DataStream holding the .skeleton data. Must be initialised (pos at the start of the buffer).
  pDest | Weak reference to the Skeleton object which will receive the data. Should be blank already.

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

- OgreSkeletonSerializer.h