Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

ModelLoader Class Reference

#include <modelloader.h>

List of all members.

Static Public Member Functions

static Model *const Load (const string &rcsFileName)
static Model *const LoadOCM (const string &rcsFileName)
static Model *const LoadAC3D (const string &rcsFileName)
static Vertex GetNormal (Vertex &vO, Vertex &vA, Vertex &vB)

Static Private Member Functions

static void _AC3DTextureToGL (const string &strPath, const AC3D::AC3DObject *const pObject, map< string, GLuint > &mapTexture)
static void _AC3DVertexToGL (const string &strPath, const vector< AC3D::AC3DMaterial > &vMaterial, const AC3D::AC3DObject *const pObject, const bool bProcessTranslucent=false)

Detailed Description

The purpose of this class is simple: read the given file, then return an object of type Model.

Definition at line 43 of file modelloader.h.

Member Function Documentation

Vertex ModelLoader::GetNormal Vertex vO,
Vertex vA,
Vertex vB

Calculate the result vector of OA ^ OB

Definition at line 330 of file modelloader.cpp.

References AC3D::Vertex::x, AC3D::Vertex::y, and AC3D::Vertex::z.

Model *const ModelLoader::Load const string &  rcsFileName  )  [static]

Detect the file type according to its extension. Currently, it checks for ".ocm" and ".ac"

Definition at line 56 of file modelloader.cpp.

References LoadAC3D(), and LoadOCM().

Model *const ModelLoader::LoadAC3D const string &  rcsFileName  )  [static]

AC3D file loader

Definition at line 201 of file modelloader.cpp.

References AC3D::AC3DModel::GetPObject(), AC3D::AC3DModel::GetVMaterial(), and AC3D::AC3DModel::IsGood().

Referenced by Load().

Model *const ModelLoader::LoadOCM const string &  rcsFileName  )  [static]

OCM file loader

Definition at line 77 of file modelloader.cpp.

References Texture::Load().

Referenced by Load().

The documentation for this class was generated from the following files:
Generated on Sat Nov 11 10:21:11 2006 for OpenCity by  doxygen 1.4.2