OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Ogre::Skeleton::ChunkAnimationLink Class Reference

#include <StdMeshLoaderBinaryChunks.h>

Inheritance diagram for Ogre::Skeleton::ChunkAnimationLink:
[legend]
Collaboration diagram for Ogre::Skeleton::ChunkAnimationLink:
[legend]

Public Member Functions

Type GetType () const
 
size_t GetSize () const
 

Static Public Member Functions

static std::unique_ptr< ChunkRead (DataStream *stream)
 
static Type Peek (const DataStream *stream)
 

Public Attributes

std::string file
 
StdMeshVector scale
 

Static Public Attributes

static const size_t ChunkHeaderLength
 

Protected Types

typedef ChunkID Type
 

Protected Member Functions

virtual void ReadImpl (DataStream *stream)
 

Protected Attributes

Type type
 
size_t size
 

Detailed Description

Definition at line 647 of file StdMeshLoaderBinaryChunks.h.

Member Typedef Documentation

typedef ChunkID Ogre::ChunkBase< ChunkID >::Type
protectedinherited

Definition at line 286 of file StdMeshLoaderBinaryChunks.h.

Member Function Documentation

size_t Ogre::ChunkBase< ChunkID >::GetSize ( ) const
inlineinherited

Definition at line 292 of file StdMeshLoaderBinaryChunks.h.

References Ogre::ChunkBase< _Type >::size.

Referenced by Ogre::Mesh::ChunkUnknown::ReadImpl(), Ogre::Mesh::ChunkMeshBoneAssignments::ReadImpl(), Ogre::Mesh::ChunkGeometryVertexData::ReadImpl(), Ogre::Skeleton::ChunkUnknown::ReadImpl(), Ogre::Skeleton::ChunkBone::ReadImpl(), and Ogre::Skeleton::ChunkAnimationTrackKF::ReadImpl().

Here is the caller graph for this function:

Type Ogre::ChunkBase< ChunkID >::GetType ( ) const
inlineinherited
static Type Ogre::ChunkBase< ChunkID >::Peek ( const DataStream stream)
inlinestaticinherited

Definition at line 295 of file StdMeshLoaderBinaryChunks.h.

References Ogre::DataStream::Peek().

Referenced by StdMeshSkeletonLoader::LoadSkeletonBinary(), Ogre::Mesh::ChunkMesh::ReadImpl(), Ogre::Mesh::ChunkSubmesh::ReadImpl(), Ogre::Mesh::ChunkGeometry::ReadImpl(), Ogre::Mesh::ChunkGeometryVertexDecl::ReadImpl(), Ogre::Mesh::ChunkGeometryVertexBuffer::ReadImpl(), Ogre::Skeleton::ChunkAnimation::ReadImpl(), and Ogre::Skeleton::ChunkAnimationTrack::ReadImpl().

296  {
297  return static_cast<Type>(stream->Peek<uint16_t>());
298  }

Here is the call graph for this function:

Here is the caller graph for this function:

std::unique_ptr< Chunk > Ogre::Skeleton::Chunk::Read ( DataStream stream)
staticinherited

Definition at line 326 of file StdMeshLoaderBinaryChunks.cpp.

References Ogre::ChunkBase< ChunkID >::ChunkHeaderLength, Ogre::Skeleton::CID_Animation, Ogre::Skeleton::CID_Animation_BaseInfo, Ogre::Skeleton::CID_Animation_Link, Ogre::Skeleton::CID_Animation_Track, Ogre::Skeleton::CID_Animation_Track_KF, Ogre::Skeleton::CID_BlendMode, Ogre::Skeleton::CID_Bone, Ogre::Skeleton::CID_Bone_Parent, Ogre::Skeleton::CID_Header, Ogre::Skeleton::CID_Invalid, Ogre::DataStream::GetRemainingBytes(), LogF(), Ogre::DataStream::Read(), and Ogre::ChunkBase< ChunkID >::size.

Referenced by StdMeshSkeletonLoader::LoadSkeletonBinary(), Ogre::Skeleton::ChunkAnimation::ReadImpl(), and Ogre::Skeleton::ChunkAnimationTrack::ReadImpl().

327  {
328  assert(stream->GetRemainingBytes() >= ChunkHeaderLength);
329 
330  // Read metadata
331  ChunkID id = CID_Invalid;
332  id = static_cast<ChunkID>(stream->Read<uint16_t>());
333  size_t size = 0;
334  // Special case: CID_Header doesn't have any size info.
335  if (id != CID_Header)
336  {
337  // All others are proper chunks.
338  size = stream->Read<uint32_t>();
339  size -= ChunkHeaderLength;
340  }
341 
342  // Create chunk
343  std::unique_ptr<Chunk> chunk;
344  switch (id)
345  {
346  case CID_Header: chunk.reset(new ChunkFileHeader()); break;
347  case CID_BlendMode: chunk.reset(new ChunkBlendMode()); break;
348  case CID_Bone: chunk.reset(new ChunkBone()); break;
349  case CID_Bone_Parent: chunk.reset(new ChunkBoneParent()); break;
350  case CID_Animation: chunk.reset(new ChunkAnimation()); break;
351  case CID_Animation_BaseInfo: chunk.reset(new ChunkAnimationBaseInfo()); break;
352  case CID_Animation_Track: chunk.reset(new ChunkAnimationTrack()); break;
353  case CID_Animation_Track_KF: chunk.reset(new ChunkAnimationTrackKF()); break;
354  case CID_Animation_Link: chunk.reset(new ChunkAnimationLink()); break;
355  default:
356  LogF("StdMeshLoader: I don't know what to do with a chunk of type 0x%xu", id);
357  chunk.reset(new ChunkUnknown()); break;
358  };
359  chunk->type = id;
360  chunk->size = size;
361  chunk->ReadImpl(stream);
362  return chunk;
363  }
bool LogF(const char *strMessage,...)
Definition: C4Log.cpp:253

Here is the call graph for this function:

Here is the caller graph for this function:

void Ogre::Skeleton::ChunkAnimationLink::ReadImpl ( DataStream stream)
protectedvirtual

Implements Ogre::ChunkBase< ChunkID >.

Definition at line 472 of file StdMeshLoaderBinaryChunks.cpp.

References file, Ogre::DataStream::Read(), scale, StdMeshVector::x, StdMeshVector::y, and StdMeshVector::z.

473  {
474  file = stream->Read<std::string>();
475  scale.x = stream->Read<float>();
476  scale.y = stream->Read<float>();
477  scale.z = stream->Read<float>();
478  }

Here is the call graph for this function:

Member Data Documentation

const size_t Ogre::ChunkBase< ChunkID >::ChunkHeaderLength
staticinherited
std::string Ogre::Skeleton::ChunkAnimationLink::file

Definition at line 650 of file StdMeshLoaderBinaryChunks.h.

Referenced by ReadImpl().

StdMeshVector Ogre::Skeleton::ChunkAnimationLink::scale

Definition at line 651 of file StdMeshLoaderBinaryChunks.h.

Referenced by ReadImpl().

size_t Ogre::ChunkBase< ChunkID >::size
protectedinherited
Type Ogre::ChunkBase< ChunkID >::type
protectedinherited

Definition at line 287 of file StdMeshLoaderBinaryChunks.h.


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