#include <OgreSkeletonSerializer.h>
Public Types | |
| enum | Endian { ENDIAN_NATIVE, ENDIAN_BIG, ENDIAN_LITTLE } |
| The endianness of written files. More... | |
Public Member Functions | |
| SkeletonSerializer () | |
| virtual | ~SkeletonSerializer () |
| void | exportSkeleton (const Skeleton *pSkeleton, const String &filename, Endian endianMode=ENDIAN_NATIVE) |
| Exports a skeleton to the file specified. | |
| void | importSkeleton (DataStreamPtr &stream, Skeleton *pDest) |
| Imports Skeleton and animation data from a .skeleton file DataStream. | |
Protected Member Functions | |
| void | writeSkeleton (const Skeleton *pSkel) |
| void | writeBone (const Skeleton *pSkel, const Bone *pBone) |
| void | writeBoneParent (const Skeleton *pSkel, unsigned short boneId, unsigned short parentId) |
| void | writeAnimation (const Skeleton *pSkel, const Animation *anim) |
| void | writeAnimationTrack (const Skeleton *pSkel, const NodeAnimationTrack *track) |
| void | writeKeyFrame (const Skeleton *pSkel, const TransformKeyFrame *key) |
| void | writeSkeletonAnimationLink (const Skeleton *pSkel, const LinkedSkeletonAnimationSource &link) |
| void | readBone (DataStreamPtr &stream, Skeleton *pSkel) |
| void | readBoneParent (DataStreamPtr &stream, Skeleton *pSkel) |
| void | readAnimation (DataStreamPtr &stream, Skeleton *pSkel) |
| void | readAnimationTrack (DataStreamPtr &stream, Animation *anim, Skeleton *pSkel) |
| void | readKeyFrame (DataStreamPtr &stream, NodeAnimationTrack *track, Skeleton *pSkel) |
| void | readSkeletonAnimationLink (DataStreamPtr &stream, Skeleton *pSkel) |
| size_t | calcBoneSize (const Skeleton *pSkel, const Bone *pBone) |
| size_t | calcBoneSizeWithoutScale (const Skeleton *pSkel, const Bone *pBone) |
| size_t | calcBoneParentSize (const Skeleton *pSkel) |
| size_t | calcAnimationSize (const Skeleton *pSkel, const Animation *pAnim) |
| size_t | calcAnimationTrackSize (const Skeleton *pSkel, const NodeAnimationTrack *pTrack) |
| size_t | calcKeyFrameSize (const Skeleton *pSkel, const TransformKeyFrame *pKey) |
| size_t | calcKeyFrameSizeWithoutScale (const Skeleton *pSkel, const TransformKeyFrame *pKey) |
| size_t | calcSkeletonAnimationLinkSize (const Skeleton *pSkel, const LinkedSkeletonAnimationSource &link) |
| virtual void | writeFileHeader (void) |
| virtual void | writeChunkHeader (uint16 id, size_t size) |
| void | writeFloats (const float *const pfloat, size_t count) |
| void | writeFloats (const double *const pfloat, size_t count) |
| void | writeShorts (const uint16 *const pShort, size_t count) |
| void | writeInts (const uint32 *const pInt, size_t count) |
| void | writeBools (const bool *const pLong, size_t count) |
| void | writeObject (const Vector3 &vec) |
| void | writeObject (const Quaternion &q) |
| void | writeString (const String &string) |
| void | writeData (const void *const buf, size_t size, size_t count) |
| virtual void | readFileHeader (DataStreamPtr &stream) |
| virtual unsigned short | readChunk (DataStreamPtr &stream) |
| void | readBools (DataStreamPtr &stream, bool *pDest, size_t count) |
| void | readFloats (DataStreamPtr &stream, float *pDest, size_t count) |
| void | readFloats (DataStreamPtr &stream, double *pDest, size_t count) |
| void | readShorts (DataStreamPtr &stream, uint16 *pDest, size_t count) |
| void | readInts (DataStreamPtr &stream, uint32 *pDest, size_t count) |
| void | readObject (DataStreamPtr &stream, Vector3 &pDest) |
| void | readObject (DataStreamPtr &stream, Quaternion &pDest) |
| String | readString (DataStreamPtr &stream) |
| String | readString (DataStreamPtr &stream, size_t numChars) |
| virtual void | flipToLittleEndian (void *pData, size_t size, size_t count=1) |
| virtual void | flipFromLittleEndian (void *pData, size_t size, size_t count=1) |
| virtual void | flipEndian (void *pData, size_t size, size_t count) |
| virtual void | flipEndian (void *pData, size_t size) |
| virtual void | determineEndianness (DataStreamPtr &stream) |
| Determine the endianness of the incoming stream compared to native. | |
| virtual void | determineEndianness (Endian requestedEndian) |
| Determine the endianness to write with based on option. | |
Protected Attributes | |
| uint32 | mCurrentstreamLen |
| FILE * | mpfFile |
| String | mVersion |
| bool | mFlipEndian |
Definition at line 51 of file OgreSkeletonSerializer.h.
enum Ogre::Serializer::Endian [inherited] |
The endianness of written files.
| ENDIAN_NATIVE | Use the platform native endian. |
| ENDIAN_BIG | Use big endian (0x1000 is serialised as 0x10 0x00). |
| ENDIAN_LITTLE | Use little endian (0x1000 is serialised as 0x00 0x10). |
Definition at line 51 of file OgreSerializer.h.
| Ogre::SkeletonSerializer::SkeletonSerializer | ( | ) |
| virtual Ogre::SkeletonSerializer::~SkeletonSerializer | ( | ) | [virtual] |
| void Ogre::SkeletonSerializer::exportSkeleton | ( | const Skeleton * | pSkeleton, | |
| const String & | filename, | |||
| Endian | endianMode = ENDIAN_NATIVE | |||
| ) |
Exports a skeleton to the file specified.
| pSkeleton | Weak reference to the Skeleton to export | |
| filename | The destination filename | |
| endianMode | The endian mode to write in |
| void Ogre::SkeletonSerializer::importSkeleton | ( | DataStreamPtr & | stream, | |
| Skeleton * | pDest | |||
| ) |
Imports Skeleton and animation data from a .skeleton file DataStream.
| 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. |
| void Ogre::SkeletonSerializer::writeSkeleton | ( | const Skeleton * | pSkel | ) | [protected] |
| void Ogre::SkeletonSerializer::writeBoneParent | ( | const Skeleton * | pSkel, | |
| unsigned short | boneId, | |||
| unsigned short | parentId | |||
| ) | [protected] |
| void Ogre::SkeletonSerializer::writeAnimation | ( | const Skeleton * | pSkel, | |
| const Animation * | anim | |||
| ) | [protected] |
| void Ogre::SkeletonSerializer::writeAnimationTrack | ( | const Skeleton * | pSkel, | |
| const NodeAnimationTrack * | track | |||
| ) | [protected] |
| void Ogre::SkeletonSerializer::writeKeyFrame | ( | const Skeleton * | pSkel, | |
| const TransformKeyFrame * | key | |||
| ) | [protected] |
| void Ogre::SkeletonSerializer::writeSkeletonAnimationLink | ( | const Skeleton * | pSkel, | |
| const LinkedSkeletonAnimationSource & | link | |||
| ) | [protected] |
| void Ogre::SkeletonSerializer::readBone | ( | DataStreamPtr & | stream, | |
| Skeleton * | pSkel | |||
| ) | [protected] |
| void Ogre::SkeletonSerializer::readBoneParent | ( | DataStreamPtr & | stream, | |
| Skeleton * | pSkel | |||
| ) | [protected] |
| void Ogre::SkeletonSerializer::readAnimation | ( | DataStreamPtr & | stream, | |
| Skeleton * | pSkel | |||
| ) | [protected] |
| void Ogre::SkeletonSerializer::readAnimationTrack | ( | DataStreamPtr & | stream, | |
| Animation * | anim, | |||
| Skeleton * | pSkel | |||
| ) | [protected] |
| void Ogre::SkeletonSerializer::readKeyFrame | ( | DataStreamPtr & | stream, | |
| NodeAnimationTrack * | track, | |||
| Skeleton * | pSkel | |||
| ) | [protected] |
| void Ogre::SkeletonSerializer::readSkeletonAnimationLink | ( | DataStreamPtr & | stream, | |
| Skeleton * | pSkel | |||
| ) | [protected] |
| size_t Ogre::SkeletonSerializer::calcBoneSize | ( | const Skeleton * | pSkel, | |
| const Bone * | pBone | |||
| ) | [protected] |
| size_t Ogre::SkeletonSerializer::calcBoneSizeWithoutScale | ( | const Skeleton * | pSkel, | |
| const Bone * | pBone | |||
| ) | [protected] |
| size_t Ogre::SkeletonSerializer::calcBoneParentSize | ( | const Skeleton * | pSkel | ) | [protected] |
| size_t Ogre::SkeletonSerializer::calcAnimationSize | ( | const Skeleton * | pSkel, | |
| const Animation * | pAnim | |||
| ) | [protected] |
| size_t Ogre::SkeletonSerializer::calcAnimationTrackSize | ( | const Skeleton * | pSkel, | |
| const NodeAnimationTrack * | pTrack | |||
| ) | [protected] |
| size_t Ogre::SkeletonSerializer::calcKeyFrameSize | ( | const Skeleton * | pSkel, | |
| const TransformKeyFrame * | pKey | |||
| ) | [protected] |
| size_t Ogre::SkeletonSerializer::calcKeyFrameSizeWithoutScale | ( | const Skeleton * | pSkel, | |
| const TransformKeyFrame * | pKey | |||
| ) | [protected] |
| size_t Ogre::SkeletonSerializer::calcSkeletonAnimationLinkSize | ( | const Skeleton * | pSkel, | |
| const LinkedSkeletonAnimationSource & | link | |||
| ) | [protected] |
| virtual void Ogre::Serializer::writeFileHeader | ( | void | ) | [protected, virtual, inherited] |
| virtual void Ogre::Serializer::writeChunkHeader | ( | uint16 | id, | |
| size_t | size | |||
| ) | [protected, virtual, inherited] |
| void Ogre::Serializer::writeFloats | ( | const float *const | pfloat, | |
| size_t | count | |||
| ) | [protected, inherited] |
| void Ogre::Serializer::writeFloats | ( | const double *const | pfloat, | |
| size_t | count | |||
| ) | [protected, inherited] |
| void Ogre::Serializer::writeShorts | ( | const uint16 *const | pShort, | |
| size_t | count | |||
| ) | [protected, inherited] |
| void Ogre::Serializer::writeInts | ( | const uint32 *const | pInt, | |
| size_t | count | |||
| ) | [protected, inherited] |
| void Ogre::Serializer::writeBools | ( | const bool *const | pLong, | |
| size_t | count | |||
| ) | [protected, inherited] |
| void Ogre::Serializer::writeObject | ( | const Vector3 & | vec | ) | [protected, inherited] |
| void Ogre::Serializer::writeObject | ( | const Quaternion & | q | ) | [protected, inherited] |
| void Ogre::Serializer::writeString | ( | const String & | string | ) | [protected, inherited] |
| void Ogre::Serializer::writeData | ( | const void *const | buf, | |
| size_t | size, | |||
| size_t | count | |||
| ) | [protected, inherited] |
| virtual void Ogre::Serializer::readFileHeader | ( | DataStreamPtr & | stream | ) | [protected, virtual, inherited] |
| virtual unsigned short Ogre::Serializer::readChunk | ( | DataStreamPtr & | stream | ) | [protected, virtual, inherited] |
| void Ogre::Serializer::readBools | ( | DataStreamPtr & | stream, | |
| bool * | pDest, | |||
| size_t | count | |||
| ) | [protected, inherited] |
| void Ogre::Serializer::readFloats | ( | DataStreamPtr & | stream, | |
| float * | pDest, | |||
| size_t | count | |||
| ) | [protected, inherited] |
| void Ogre::Serializer::readFloats | ( | DataStreamPtr & | stream, | |
| double * | pDest, | |||
| size_t | count | |||
| ) | [protected, inherited] |
| void Ogre::Serializer::readShorts | ( | DataStreamPtr & | stream, | |
| uint16 * | pDest, | |||
| size_t | count | |||
| ) | [protected, inherited] |
| void Ogre::Serializer::readInts | ( | DataStreamPtr & | stream, | |
| uint32 * | pDest, | |||
| size_t | count | |||
| ) | [protected, inherited] |
| void Ogre::Serializer::readObject | ( | DataStreamPtr & | stream, | |
| Vector3 & | pDest | |||
| ) | [protected, inherited] |
| void Ogre::Serializer::readObject | ( | DataStreamPtr & | stream, | |
| Quaternion & | pDest | |||
| ) | [protected, inherited] |
| String Ogre::Serializer::readString | ( | DataStreamPtr & | stream | ) | [protected, inherited] |
| String Ogre::Serializer::readString | ( | DataStreamPtr & | stream, | |
| size_t | numChars | |||
| ) | [protected, inherited] |
| virtual void Ogre::Serializer::flipToLittleEndian | ( | void * | pData, | |
| size_t | size, | |||
| size_t | count = 1 | |||
| ) | [protected, virtual, inherited] |
| virtual void Ogre::Serializer::flipFromLittleEndian | ( | void * | pData, | |
| size_t | size, | |||
| size_t | count = 1 | |||
| ) | [protected, virtual, inherited] |
| virtual void Ogre::Serializer::flipEndian | ( | void * | pData, | |
| size_t | size, | |||
| size_t | count | |||
| ) | [protected, virtual, inherited] |
| virtual void Ogre::Serializer::flipEndian | ( | void * | pData, | |
| size_t | size | |||
| ) | [protected, virtual, inherited] |
| virtual void Ogre::Serializer::determineEndianness | ( | DataStreamPtr & | stream | ) | [protected, virtual, inherited] |
Determine the endianness of the incoming stream compared to native.
| virtual void Ogre::Serializer::determineEndianness | ( | Endian | requestedEndian | ) | [protected, virtual, inherited] |
Determine the endianness to write with based on option.
uint32 Ogre::Serializer::mCurrentstreamLen [protected, inherited] |
Definition at line 64 of file OgreSerializer.h.
FILE* Ogre::Serializer::mpfFile [protected, inherited] |
Definition at line 65 of file OgreSerializer.h.
String Ogre::Serializer::mVersion [protected, inherited] |
Definition at line 66 of file OgreSerializer.h.
bool Ogre::Serializer::mFlipEndian [protected, inherited] |
Definition at line 67 of file OgreSerializer.h.
Copyright © 2000-2005 by The OGRE Team

This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Mon Jun 16 12:54:01 2008