OGRE  14.2
Object-Oriented Graphics Rendering Engine
Ogre::SkeletonSerializer Class Reference

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

#include <OgreSkeletonSerializer.h>

+ Inheritance diagram for Ogre::SkeletonSerializer:

Public Member Functions

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

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::SkeletonSerializer::SkeletonSerializer ( )

Member Function Documentation

◆ exportSkeleton() [1/2]

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

Exports a skeleton to the file specified.

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

Parameters
pSkeletonWeak reference to the Skeleton to export
filenameThe destination filename
verSkeleton compatibility versions.
endianModeThe endian mode to write in

◆ exportSkeleton() [2/2]

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

Exports a skeleton to the stream specified.

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

Parameters
pSkeletonWeak reference to the Skeleton to export
streamThe destination stream
verSkeleton compatibility versions.
endianModeThe endian mode to write in

◆ importSkeleton()

void Ogre::SkeletonSerializer::importSkeleton ( DataStreamPtr stream,
Skeleton pDest 
)

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

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
streamThe DataStream holding the .skeleton data. Must be initialised (pos at the start of the buffer).
pDestWeak 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: