My Project
|
parsing character parax model: binary file only. More...
#include <XFileCharModelParser.h>
Public Member Functions | |
XFileCharModelParser (const char *pBuffer, int32 nSize) | |
Constructor. More... | |
CParaXModel * | ParseParaXModel () |
parse parax model | |
bool | LoadParaX_Header () |
Load through a ParaXParser object. More... | |
CParaXModel * | LoadParaX_Body () |
processing the body data according to file type. More... | |
void | LoadParaX_Finalize () |
Finalize parser object. More... | |
const char * | GetRawData (int nOffset) const |
get the raw data pointer at the specified offset. More... | |
bool | ReadParaXHeader (ParaXHeaderDef &xheader, XFileDataObjectPtr pFileData) |
bool | ReadXGlobalSequences (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
read all sub data | |
bool | ReadXVertices (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXTextures (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXAttachments (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXColors (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXTransparency (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXViews (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXIndices0 (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXGeosets (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXRenderPass (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXBones (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXTexAnims (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXParticleEmitters (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXRibbonEmitters (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXCameras (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXLights (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadXAnimations (CParaXModel &xmesh, XFileDataObjectPtr pFileData) |
bool | ReadAnimationBlock (const AnimationBlock *b, Animated< Vector3 > &anims, int *gs) |
read animation block to Animated<> struct More... | |
bool | ReadAnimationBlock (const AnimationBlock *b, AnimatedShort &anims, int *gs) |
bool | ReadAnimationBlock (const AnimationBlock *b, Animated< float > &anims, int *gs) |
bool | ReadAnimationBlock (const AnimationBlock *b, Animated< Quaternion > &anims, int *gs) |
![]() | |
XFileParser (const char *pBuffer, int32 nSize) | |
Constructor. More... | |
~XFileParser () | |
Destructor. More... | |
XFile::Scene * | GetImportedData (bool bGiveupDataOwnerhip=false) |
Returns the temporary representation of the imported data. More... | |
XFileDataObjectPtr | CreateEnumObject () |
Protected Attributes | |
ParaXHeaderDef | m_xheader |
const char * | m_pRaw |
XFileDataObjectPtr | m_pRoot |
XFileDataObjectPtr | m_pParaXBody |
XFileDataObjectPtr | m_pParaXRawData |
XFileDataObjectPtr | m_pParaXRef |
XFileDataObjectPtr | m_pD3DMesh |
XFileDataObjectPtr | m_pD3DRootFrame |
bool | m_bHeaderLoaded |
![]() | |
uint32 | mMajorVersion |
uint32 | mMinorVersion |
version numbers | |
bool | mIsBinaryFormat |
true if the file is in binary, false if it's in text form | |
uint32 | mBinaryFloatSize |
float size in bytes, either 4 or 8 | |
uint32 | mBinaryNumCount |
const char * | P |
const char * | End |
uint32 | mLineNumber |
Line number when reading in text format. | |
XFile::Scene * | mScene |
Imported data. | |
Additional Inherited Members | |
![]() | |
void | ParseHeader () |
void | ParseFile () |
void | ParseDataObjectTemplate () |
void | ParseDataObjectFrame (XFile::Node *pParent) |
void | ParseDataObjectTransformationMatrix (Matrix4 &pMatrix) |
void | ParseDataObjectMesh (XFile::Mesh *pMesh) |
void | ParseDataObjectMeshNormals (XFile::Mesh *pMesh) |
void | ParseDataObjectMeshTextureCoords (XFile::Mesh *pMesh) |
void | ParseDataObjectMeshVertexColors (XFile::Mesh *pMesh) |
void | ParseDataObjectMeshMaterialList (XFile::Mesh *pMesh) |
void | ParseDataObjectMaterial (XFile::Material *pMaterial) |
void | ParseDataObjectTextureFilename (std::string &pName) |
void | ParseDataObjectParaXHeader (ParaXHeaderDef &pName) |
bool | ParseUnknownDataObject () |
void | FindNextNoneWhiteSpace () |
places pointer to next begin of a token, and ignores comments | |
std::string | GetNextToken () |
returns next parseable token. Returns empty string if no token there | |
bool | IsEndOfFile () |
void | readHeadOfDataObject (std::string *poName=NULL) |
reads header of dataobject including the opening brace. More... | |
void | CheckForClosingBrace () |
checks for closing curly brace, throws exception if not there More... | |
void | CheckForSemicolon () |
checks for one following semicolon, throws exception if not there More... | |
void | CheckForSeparator () |
checks for a separator char, either a ',' or a ';' | |
void | TestForSeparator () |
tests and possibly consumes a separator char, but does nothing if there was no separator | |
void | GetNextTokenAsString (std::string &poString) |
reads a x file style string | |
void | ReadUntilEndOfLine () |
void | ReadToEndOfDataObject () |
uint16 | ReadBinWord () |
uint32 | ReadBinDWord () |
uint32 | ReadInt () |
float | ReadFloat () |
Vector2 | ReadVector2 () |
Vector3 | ReadVector3 () |
Vector3 | ReadRGB () |
LinearColor | ReadRGBA () |
void | ReadCharArray (char *sOutput, int nCount) |
void | ThrowException (const std::string &pText) |
Throws an exception with a line number and the given text. More... | |
void | FilterHierarchy (XFile::Node *pNode) |
Filters the imported hierarchy for some degenerated cases that some exporters produce. More... | |
parsing character parax model: binary file only.
ParaEngine::XFileCharModelParser::XFileCharModelParser | ( | const char * | pBuffer, |
int32 | nSize | ||
) |
Constructor.
Creates a data structure out of the XFile given in the memory block.
pBuffer | Null-terminated memory buffer containing the XFile |
|
inline |
get the raw data pointer at the specified offset.
return NULL if raw data is not available
CParaXModel * ParaEngine::XFileCharModelParser::LoadParaX_Body | ( | ) |
processing the body data according to file type.
LoadParaX_Header() will be called automatically if not called before.
void ParaEngine::XFileCharModelParser::LoadParaX_Finalize | ( | ) |
Finalize parser object.
when the Parser will also be finalized in its destructor.
bool ParaEngine::XFileCharModelParser::LoadParaX_Header | ( | ) |
Load through a ParaXParser object.
enumerate all top-level nodes, and save ParaX header struct and nodes data pointers.
bool ParaEngine::XFileCharModelParser::ReadAnimationBlock | ( | const AnimationBlock * | b, |
Animated< Vector3 > & | anims, | ||
int * | gs | ||
) |
read animation block to Animated<> struct
b | animation block. |
anims | [out] animations |
bool XFileCharModelParser::ReadXRenderPass | ( | CParaXModel & | xmesh, |
XFileDataObjectPtr | pFileData | ||
) |
fix 2009.1.14 by LiXizhi, use 32 bits index offset