Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

# Keos::CMD2Loader Class Reference

MD2 Model loader. More...

`#include <KeosMD2Loader.h>`

Inheritance diagram for Keos::CMD2Loader:

List of all members.

## Public Member Functions

virtual CModel * | LoadFromFile (const String &strFilename)
| Load a model from a file.

## Static Private Attributes

static const int | ms_nMagicId = ('2' << 24) + ('P' << 16) + ('D' << 8) + 'I'
| Magic identifier "IDP2".
static const int | ms_nMD2Version = 8
| Managed number of version.
static const TVector3F | ms_NormalTable []
| Table of the calculated normals.

## Classes

struct | TFrame
struct | THeader
| MD2 Header. More...
struct | TPoint
| Struct for the vertices that are read in for the current frame. More...
struct | TTexCoord
| This stores UV coordinates. More...
struct | TTexture
struct | TTriangle
| This stores the indices into the vertex and texture coordinate arrays. More...

## Detailed Description

MD2 Model loader.

Definition at line 33 of file KeosMD2Loader.h.

## Member Function Documentation

CModel * Keos::CMD2Loader::LoadFromFile | ( | const String & | strFilename | ) | `[virtual]`

| Load a model from a file.

Parameters:

  | strFilename | Name of the file to be loaded.

Returns:
  Pointer on the created model.

Reimplemented from Keos::ILoader< CModel >.

Definition at line 33 of file KeosMD2Loader.cpp.

References Keos::CModel::TVertex::Color, int(), LOADINGFAILED_EXCEPT, ms_nMagicId, ms_nMD2Version, ms_NormalTable, Keos::CMD2Loader::TPoint::n, Keos::CModel::TVertex::Normal, Keos::CModel::TVertex::Position, Renderer, Keos::CModel::TVertex::TexCoords, Keos::CMD2Loader::TTexCoord::u, Keos::CMD2Loader::TTexCoord::v, Keos::CVector2< T >::x, Keos::CMD2Loader::TPoint::x, Keos::CVector3< T >::x, Keos::CVector2< T >::y, Keos::CMD2Loader::TPoint::y, Keos::CVector3< T >::y, Keos::CMD2Loader::TPoint::z, and Keos::CVector3< T >::z.

## Member Data Documentation

const int Keos::CMD2Loader::ms_nMagicId = ('2' << 24) + ('P' << 16) + ('D' << 8) + 'I'`[static, private]`

| Magic identifier "IDP2". Definition at line 46 of file KeosMD2Loader.h. Referenced by LoadFromFile().

const int Keos::CMD2Loader::ms_nMD2Version = 8`[static, private]`

| Managed number of version. Definition at line 48 of file KeosMD2Loader.h. Referenced by LoadFromFile().

const TVector3F Keos::CMD2Loader::ms_NormalTable`[static, private]`

| Table of the calculated normals. Definition at line 110 of file KeosMD2Loader.cpp. Referenced by LoadFromFile().

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

- KeosEngine/KeosMD2Loader.h
- KeosEngine/KeosMD2Loader.cpp