Class TMaterial3ds

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TMaterial3ds = class(TObject)

Description

Hierarchy

Overview

Fields

Public FName:string;
Public FInitialized:boolean;
Public AmbientCol:TVector4Single;
Public DiffuseCol:TVector4Single;
Public SpecularCol:TVector4Single;
Public TextureMap1:TMaterialMap3ds;
Public TextureMap2:TMaterialMap3ds;
Public Shininess:Single;
Public ShininessStrenth:Single;
Public Transparency:Single;
Public TransparencyFalloff:Single;
Public ReflectBlur:Single;

Methods

Public constructor Create(const AName:string);
Public procedure ReadFromStream(Stream:TStream; EndPos:Int64);

Properties

Public property Name: string read FName;
Public property Initialized: boolean read FInitialized;

Description

Fields

Public FName:string;
 
Public FInitialized:boolean;
 
Public AmbientCol:TVector4Single;

wlasciwosci materialu. Maja pewne domyslne wartosci bo nikt nie mowi ze w chunku Material sa wszystkie zdefiniowane.

Public DiffuseCol:TVector4Single;

= Default3dsMatAmbient

Public SpecularCol:TVector4Single;

= Default3dsMatDiffuse

Public TextureMap1:TMaterialMap3ds;

= Default3dsMatSpecular

Public TextureMap2:TMaterialMap3ds;

= Default3dsMatSpecular

Public Shininess:Single;

all Singles below are always read from 3ds file (they are required subchunks of material chunk). They are in range 0..1.

Public ShininessStrenth:Single;

= Default3dsShininess

Public Transparency:Single;

= Default3dsShininess

Public TransparencyFalloff:Single;

= Default3dsShininess

Public ReflectBlur:Single;

= Default3dsShininess

Methods

Public constructor Create(const AName:string);

= 0

Public procedure ReadFromStream(Stream:TStream; EndPos:Int64);

czyta CHUNK_MATERIAL inicjujac sie odpowiednio i ustawia Initialized na true

Properties

Public property Name: string read FName;
 
Public property Initialized: boolean read FInitialized;

jezeli not Initialized to znaczy ze ten material zostal napotkany podczas odczytu TTrimesh ale jeszcze nie zostal zdefiniowany w pliku .3ds. Tym samym jezeli podczas czytania pliku 3ds natkniemy sie na material o ten samej nazwie - powinnismy zainicjowac niniejszy obiekt. Jezeli w pliku 3ds napotkamy na material Initialized o tej samej nazwie to zwracamy blad (duplicate meterial spec in 3ds file). Po zaladowaniu calego pliku mamy pewnosc ze wszystkie uzyte w Trimeshach materialy sa na liscie Materials, wystarczy wiec ze sprawdzimy czy wszystkie sa Initialized aby miec pewnosc ze wszystkie materialy potrzebne do renderowania sceny zostaly odczytane z pliku 3ds.


Generated by PasDoc 0.11.0 on 2008-09-12 11:58:32