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

# Keos::CMDLQ1Loader Class Reference

MDL (Quake 1) Model loader. More...

`#include <KeosMDLQ1Loader.h>`

Inheritance diagram for Keos::CMDLQ1Loader:

List of all members.

## Public Member Functions

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

## Private Types

enum | TSyncType { ST_SYNC = 0, ST_RAND }
enum | TSkinType { ALIAS_SKIN_SINGLE = 0, ALIAS_SKIN_GROUP }

## Private Member Functions

void | LoadColorMap (const String &strFilename, uchar *ColorMap)
| Load color map from a file.

## Static Private Attributes

static const int | ms_nMagicId = (('O' << 24) + ('P' << 16) + ('D' << 8) + 'I')
| Magic identifier "IDPO".
static const int | ms_nMDLQ1Version = 6
| Managed number of version.
static const TVector3F | ms_NormalTable []
| Table of the calculated normals.
static const uchar | ms_DefaultColorMap []
| Table of the default colr map.

## Classes

struct | TFrame
struct | THeader
| MDL Header. More...
struct | TPoint
struct | TTexCoord
| This stores texture UV coordinates. More...
struct | TTexture
struct | TTriangle

## Detailed Description

MDL (Quake 1) Model loader.

Definition at line 33 of file KeosMDLQ1Loader.h.

## Member Enumeration Documentation

enum Keos::CMDLQ1Loader::TSkinType`[private]`

Enumeration values:

  ALIAS_SKIN_SINGLE |
  ALIAS_SKIN_GROUP |

Definition at line 63 of file KeosMDLQ1Loader.h.

enum Keos::CMDLQ1Loader::TSyncType`[private]`

Enumeration values:

  ST_SYNC |
  ST_RAND |

Definition at line 62 of file KeosMDLQ1Loader.h.

## Member Function Documentation

void Keos::CMDLQ1Loader::LoadColorMap | ( | const String & | strFilename,
|  | uchar * | ColorMap
| ) | `[private]`

| Load color map from a file.

Parameters:

  | strFilename | Name of the file to be loaded.
  | ColorMap | Array which will contain the color map

Definition at line 142 of file KeosMDLQ1Loader.cpp.

References LOADINGFAILED_EXCEPT.

CModel * Keos::CMDLQ1Loader::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 36 of file KeosMDLQ1Loader.cpp.

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

## Member Data Documentation

const uchar Keos::CMDLQ1Loader::ms_DefaultColorMap`[static, private]`

| Table of the default colr map. Definition at line 331 of file KeosMDLQ1Loader.cpp. Referenced by LoadFromFile().

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

| Magic identifier "IDPO". Definition at line 52 of file KeosMDLQ1Loader.h. Referenced by LoadFromFile().

const int Keos::CMDLQ1Loader::ms_nMDLQ1Version = 6`[static, private]`

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

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

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

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

- KeosEngine/KeosMDLQ1Loader.h
- KeosEngine/KeosMDLQ1Loader.cpp