My Project
|
Para mesh XML file is a reference file for properly loading static mesh or parax mesh file. More...
#include <ParaMeshXMLFile.h>
Classes | |
class | CSubMesh |
sub LOD meshes. More... | |
Public Types | |
enum | ParaMeshXMLType { TYPE_MESH_LOD, TYPE_CHARACTER_LOD, TYPE_MESH_BSP, TYPE_MESH_GROUP } |
type of the mesh that this file represents. More... | |
Public Member Functions | |
bool | LoadFromFile (const string &filename) |
load data from file to class data structure. More... | |
bool | LoadFromFile (const string &filename, const string &parentDir) |
same as above, except that parent directory is specified. More... | |
bool | LoadFromBuffer (const char *pData, int nSize) |
load data from file to class data structure. More... | |
void | SetParentDirectory (const string &parentDir) |
set such as "model/", relative path will be appended with this one. More... | |
const string & | GetParentDirectory () |
get such as "model/", relative path will be appended with this one. More... | |
bool | SaveToFile (const string &filename) |
save the content of this file to a given file. More... | |
ParaMeshXMLType | GetType () |
get the type of the mesh that this file represents. More... | |
int | GetPrimaryShaderIndex () |
see ParaEngine::TechniqueHandle. More... | |
int | GetSubMeshCount () |
get the number of sub meshes | |
CSubMesh * | GetSubMesh (int nIndex) |
get the sub mesh info at the given index. More... | |
Public Attributes | |
ParaMeshXMLType | m_nType |
type of the mesh file. More... | |
int | m_nPrimaryShader |
see ParaEngine::TechniqueHandle. More... | |
int | m_nVersion |
file version | |
vector< CSubMesh > | m_SubMeshes |
sub meshes info. More... | |
string | m_sParentDirectory |
such as "model/", relative path will be appended with this one. More... | |
bool | m_bHasBoundingBox |
bounding box of the mesh: whether contains bounding box info | |
Vector3 | m_vMinPos |
bounding box of the mesh: min point | |
Vector3 | m_vMaxPos |
bounding box of the mesh: max point | |
CParameterBlock | m_paramBlock |
effect parameter block with this asset. More... | |
Para mesh XML file is a reference file for properly loading static mesh or parax mesh file.
It may contain LOD information, shader information (shader index is shader handle, params are all per asset effect parameters.), bounding box info, etc. sample ParaEngine mesh xml file: <mesh version="1" type="0"> <boundingbox minx="0" miny="0" minz="0" maxx="1" maxy="1" maxz="1/"> <shader index="3">
0 | Texture/whitedot.dds |
a | 10 |
b | 1 |
d | 0.1 |
e | 1,1 |
f | 1,1,1 |
g | 1,1,1 |
h | 1,0,0,0,1,0,0,0,1,0,0,0, |
</shader> <submesh loddist="10" filename="LOD_10.x"> <submesh loddist="50" filename="LOD_50.x"> </mesh>
type of the mesh that this file represents.
|
inline |
get such as "model/", relative path will be appended with this one.
|
inline |
see ParaEngine::TechniqueHandle.
some common values are: -1: UNSPECIFIED. default from mesh. TECH_SIMPLE_MESH_NORMAL = 3 TECH_CHARACTER = 12
|
inline |
get the sub mesh info at the given index.
|
inline |
get the type of the mesh that this file represents.
bool ParaEngine::CParaMeshXMLFile::LoadFromBuffer | ( | const char * | pData, |
int | nSize | ||
) |
load data from file to class data structure.
sample ParaEngine mesh xml file <mesh version="1" type="0"> <boundingbox minx="0" miny="0" minz="0" maxx="1" maxy="1" maxz="1/"> <shader index="3/"> <submesh loddist="10" filename="LOD_10.x"> <submesh loddist="50" filename="LOD_50.x"> </mesh>
bool ParaEngine::CParaMeshXMLFile::LoadFromFile | ( | const string & | filename | ) |
load data from file to class data structure.
Parent directory is automatically set to parent directory of filename.
bool ParaEngine::CParaMeshXMLFile::LoadFromFile | ( | const string & | filename, |
const string & | parentDir | ||
) |
same as above, except that parent directory is specified.
bool ParaEngine::CParaMeshXMLFile::SaveToFile | ( | const string & | filename | ) |
save the content of this file to a given file.
|
inline |
set such as "model/", relative path will be appended with this one.
int ParaEngine::CParaMeshXMLFile::m_nPrimaryShader |
see ParaEngine::TechniqueHandle.
some common values are: -1: UNSPECIFIED. default from mesh. TECH_SIMPLE_MESH_NORMAL = 3 TECH_CHARACTER = 12
ParaMeshXMLType ParaEngine::CParaMeshXMLFile::m_nType |
type of the mesh file.
CParameterBlock ParaEngine::CParaMeshXMLFile::m_paramBlock |
effect parameter block with this asset.
string ParaEngine::CParaMeshXMLFile::m_sParentDirectory |
such as "model/", relative path will be appended with this one.
vector<CSubMesh> ParaEngine::CParaMeshXMLFile::m_SubMeshes |
sub meshes info.
Usually for different LOD information.