Gorilla.OBJ.Model
Unit Gorilla.OBJ.Model.pasClasses
- TOBJCache = class ( TVertexCache )
- TOBJSegment = class ( TObject )
- TOBJModel = class ( TModelDef )
Records
- record TOBJVertexID
- record TOBJPolygonID
- record TOBJPolygonIDList
Enumerations
- enum TOBJDataType = ( None, ObjectName, Coord, TexCoord, Normal, SmoothGroup, Group, MatLib, UseMat, Face, Line, Polygon ) ;
Constants
- const GORILLA_OBJ_POLYGON_MAXSIZE : Integer = $C;
TOBJCache
Ancestors
Members
Fields
Methods
- public constructor Create ( ) ;
- public destructor Destroy ( ) ;
- public function DoOnCreateDefaultMaterial ( AMesh : TMeshDef ) : TMaterialDef ; override;
- public function DoOnCreateMaterialRef ( AMesh : TMeshDef; AMaterial : TMaterialDef ) : TMaterialRefDef ; override;
- public function AddPolygon ( const AIndexOffset : Integer; const APolygon : TOBJPolygonID; const AVertices : TList<Gorilla.DefTypes.TVertexData>; const AIndices : TList<Gorilla.DefTypes.TTriangleIndex> ) : Integer ; overload;
- public function GetVertex ( const AVertex : TOBJVertexID ) : TVertexData ; overload;
TOBJSegment
Ancestors
Members
Fields
- protected FName :
string
- protected FParent :
TOBJSegment
- protected FSegments :
TObjectList<Gorilla.OBJ.Model.TOBJSegment>
- protected FVertexOffset :
Integer
- protected FMaterial :
TMaterialDef
- protected FFaceVertices :
TOBJPolygonIDList
Methods
- public constructor Create ( AParent : TOBJSegment; AName : string ) ;
- public destructor Destroy ( ) ;
- public function FindSegmentByName ( const AName : string ) : TOBJSegment ;
- public procedure AddPolygon ( const APolygon : TOBJPolygonID ) ;
- public function GetMesh ( AParent : TMeshDef; ACache : TOBJCache ) : TMeshDef ;
Properties
TOBJModel
Ancestors
Members
Fields
- private FSmoothGroup :
Integer
- private FMainSegment :
TOBJSegment
- private FCurrentSegment :
TOBJSegment
- private FSegmentCounter :
Integer
- private FCurrentName :
string
- private FCurrentMaterial :
TMaterialDef
- private FDefaultMaterial :
TMaterialDef
Methods
- public constructor Create ( const AOwner : TMeshDef; const APackage : TObject ) ;
- public destructor Destroy ( ) ;
- private function ReadMaterials ( const ALine : string ) : string ;
- private function ReadUseMaterial ( const ACache : TOBJCache; const ALine : string ) : TMaterialDef ;
- private procedure ReadSources ( const ACache : TOBJCache; const ALine : string ) ;
- private function ReadGroup ( const AParent : TOBJSegment; const ALine : string ) : TOBJSegment ;
- private procedure ReadSmoothGroup ( const ALine : string ) ;
- private procedure ReadFaces ( AReader : TStreamReader; ACache : TOBJCache; ALine : string ) ;
- private procedure ReadFace ( const ACache : TOBJCache; const ASegment : TOBJSegment; const ALine : string ) ;
- private function GetDataType ( const ALine : string ) : TOBJDataType ; class;
- private procedure ParseDataType ( AReader : TStreamReader; ACache : TOBJCache; ALine : string ) ;
- private procedure LoadMaterialLibraryFromFile ( const AFileName : string ) ;
- private procedure LoadMaterialLibraryFromStream ( const AStream : TStream; const AFileName : string ) ;
- public procedure LoadFromFile ( const AFileName : string ) ; virtual;
- public procedure LoadFromStream ( const AStream : TStream; const APath : string ) ; virtual;