Class TObject3dMD3

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TObject3dMD3 = class(TObject)

Description

MD3 (Quake3 engine model format) reader.

Hierarchy

Overview

Fields

Public Surfaces: TMd3SurfacesList;
Public FramesCount: Cardinal;
Public TextureFileName: string;

Methods

Public constructor Create(const FileName: string);
Public constructor Create(Stream: TStream; const ATextureFileName: string);
Public destructor Destroy; override; Name : string;
Public class function ReadSkinFile(const Md3FileName: string; out ATextureFileName: string): boolean;

Description

Fields

Public Surfaces: TMd3SurfacesList;
 
Public FramesCount: Cardinal;
 
Public TextureFileName: string;

Texture filename to use for this object. This is not read from md3 file (it's not recorded there), it's read (if available) from accompanying xxx_default.skin file. It's empty '' if no skin file was found, or it didn't specify any texture filename.

Methods

Public constructor Create(const FileName: string);

Reads MD3 from a file.

Associated skin file is also read, to get texture filename: for xxx.md3, we will try to read xxx_default.skin file, looking there for a texture filename. Texture filename found there will be trimmed to a name (i.e. without directory part, as it usually specifies directory within quake/tremulous/etc. data dir, not relative to md3 model dir).

Public constructor Create(Stream: TStream; const ATextureFileName: string);

Reads MD3 from a stream. The stream must be freely seekable (i.e. setting Position to any value must be supported) — if unsure, you can wrap your stream in something like TMemoryStream.

The Stream instance is not owned by this object — which means that if you created it, you should also free it, this class will not do it for you. You can free Stream right after constructor finished it's work.

Public destructor Destroy; override; Name : string;
 
Public class function ReadSkinFile(const Md3FileName: string; out ATextureFileName: string): boolean;

Searches for a skin file accompanying given MD3 model filename, and reads it. Returns True and sets TextureFileName if skin file found and some texture filename was recorded there.


Generated by PasDoc 0.10.0 on 2008-02-25 00:00:37