Unit a3dge.Model3D
Description
Implements common models for games.
It also implements the core for loading models from files.
Overview
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Description
Functions and Procedures
procedure RegisterModelLoader ( const aExtension: AnsiString; aLoader: TModelLoader ); |
Register a 3D model loader.
You can register your custom loaders using this function so they're available to be used by LoadModel.
You can replace or remove a loader by registering the same extension.
Some units, as a3dge.Wavefront and a3dge.Pol3D, will register their own loaders just by including them in the uses clause and no furgher action is needed.
Parameters
- aExtension
- The file extension with dot. You can register the same loader for different extensions.
- aLoader
- The function that loads the model. It should return the loaded model reference or
Nil if none was loaded.
See also
- LoadModel
- Load 3D model.
|
function LoadModel (const aFilename: AnsiString): TModel3D; |
Load 3D model.
This function uses the file extension ot find a loader registered by RegisterModelLoader and load the model.
This function will catch any exception raised by the loader, log the and then will return a Nil pointer.
Parameters
- aFilename
- File to load.
Returns
A reference to the model or Nil if it cannot load it. See also
- RegisterModelLoader
- Register a 3D model loader.
|
Types
TPolygonList = array of TPolygon; |
List of polygons.
|
TTexCoordList = array of TTexCoord; |
List of texture coordinates.
|
Generated by PasDoc 0.15.0. Generated on 2025-07-31 11:41:01.
|