Unit Object3ds

DescriptionusesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

Read 3d object description from 3DS files.

Struktura klas w tym module stara sie oddac funkcjonalna strukture modelu 3ds a nie dokladna strukture pliku 3ds. Dlatego mniej wiecej mamy tutaj pewien szkielet hierarchii chunkow 3ds ale w pewnych miejscach splaszczony i dostosowany do szczegolnych wlasciwosci roznych rzeczy.

TScene3ds odpowiada calemu plikowi 3ds czyli chunkowi MAIN a jednoczesnie (poniewaz w ogole nie odczytujemy KeyFramera) chunkowi OBJMESH. TScene3ds zawiera trzy listy obiektow : liste Trimesh'ow, kamer i swiatel. Wszystkie te trzy obiekty odpowiadaja chunkowi OBJBLOCK ktory zawiera jeden z trzech chunkow (odpowiednio) TRIMESH, CAMERA lub LIGHT. Wszystkie te trzy klasy wywodza sie z klasy TObject3ds ktora reprezentuje dowolny chunk OBJBLOCK i ktora tym samym obejmuje rzeczy ktore sa wspolne dla trimeshow, kamer i swiatel.

Dodatkowo TScene3ds ma liste obiektow TMaterial3ds ktore reprezentuja chunki MATERIAL.

Based on [http://www.martinreddy.net/gfx/3d/3DS.spec] (or some earlier version of this, I don't remember...).

uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class TObject3ds This is an abstract class that wraps OBJBLOCK chunk of 3DS file: trimesh, camera or light source.
record TFace3ds  
packed record TVertex3ds TVertex3ds reprezentuje cala informacje o vertexach jaka zgromadzilismy czytajac chunk danego trimesha.
Class TTrimesh3ds This class wraps OBJBLOCK chunk of 3DS file with VERTLIST subchunk. Putting it simpler, this represents a set of triangles.
Class TCamera3ds  
Class TLight3ds  
Class TObjectsList_1  
Class TObjectsList_2  
Class TObjectsList_3  
Class TScene3ds  

Functions and Procedures

function CreateObject3ds(AScene: Tscene3ds; Stream: TStream; ObjectEndPos: Int64): TObject3ds;

Types

TObject3dsClass = class of TObject3ds;
TArray_Face3ds = packed array[0..MaxInt div SizeOf(TFace3ds)-1]of TFace3ds;
PArray_Face3ds = ˆTArray_Face3ds;
TArray_Vertex3ds = packed array[0..MaxInt div SizeOf(TVertex3ds)-1]of TVertex3ds;
PArray_Vertex3ds = ˆTArray_Vertex3ds;
TObjectsListItem_1 = TTrimesh3ds;
TObjectsListIsSmallerFunction_1 = function (const A, B: TObjectsListItem_1): boolean of object;
TTrimesh3dsList = TObjectsList_1;
TObjectsListItem_2 = TCamera3ds;
TObjectsListIsSmallerFunction_2 = function (const A, B: TObjectsListItem_2): boolean of object;
TCamera3dsList = TObjectsList_2;
TObjectsListItem_3 = TLight3ds;
TObjectsListIsSmallerFunction_3 = function (const A, B: TObjectsListItem_3): boolean of object;
TLight3dsList = TObjectsList_3;

Description

Functions and Procedures

function CreateObject3ds(AScene: Tscene3ds; Stream: TStream; ObjectEndPos: Int64): TObject3ds;
 

Types

TObject3dsClass = class of TObject3ds;
 
TArray_Face3ds = packed array[0..MaxInt div SizeOf(TFace3ds)-1]of TFace3ds;

ten rekord moze byc rozszerzany aby objac wiecej wlasciwosci Face z 3ds

PArray_Face3ds = ˆTArray_Face3ds;
 
TArray_Vertex3ds = packed array[0..MaxInt div SizeOf(TVertex3ds)-1]of TVertex3ds;

ten rekord moze byc rozszerzany aby objac wiecej wlasciwosci Vertexa z 3ds

PArray_Vertex3ds = ˆTArray_Vertex3ds;
 
TObjectsListItem_1 = TTrimesh3ds;
 
TObjectsListIsSmallerFunction_1 = function (const A, B: TObjectsListItem_1): boolean of object;
 
TTrimesh3dsList = TObjectsList_1;
 
TObjectsListItem_2 = TCamera3ds;
 
TObjectsListIsSmallerFunction_2 = function (const A, B: TObjectsListItem_2): boolean of object;
 
TCamera3dsList = TObjectsList_2;
 
TObjectsListItem_3 = TLight3ds;
 
TObjectsListIsSmallerFunction_3 = function (const A, B: TObjectsListItem_3): boolean of object;
 
TLight3dsList = TObjectsList_3;
 

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