Gorilla.DefTypes

Unit Gorilla.DefTypes.pas
The following XML-Tag notation shows the internal structure of the definition types used inside of Gorilla3D. @ - is a reference to a specific instance List - represents an object list of a specific classtype -TModelDef // holds a list of TMeshDef instances -List::Meshes -TMeshDef -@Model::TModelDef -/TMeshDef -/List::Meshes // holds a list of THumanoidDef instances -List::Humanoids -THumanoidDef -@Model::TModelDef // holds a list of TControllerDef references -@List::Controllers // represents a tree of TJointDef nodes -Root::TJointDef -TJointDef -TJointDef -TJointDef -TJointDef -/TJointDef -/TJointDef -/Root::TJointDef -/THumanoidDef -THumanoidDef [...] -/THumanoidDef -/List::Humanoids // holds a list of TControllerDef instances -List::Controllers -TControllerDef -@Mesh::TMeshDef // is a sub component of TSkinDef -Skin::TSkinDef -TSkinDef -@Controller::TControllerDef // holds a list of TJointRefDef instances - these // are referenced objects to TJointDef instances -List::LinkedJoint -TJointRefDef -TJointRefDef -TJointRefDef -TJointRefDef -TJointRefDef [...] -/List::LinkedJoints // contains the root joint of the skeleton -@Skeleton::TJointRefDef -/TSkinDef -/Skin::TSkinDef -/TControllerDef -TControllerDef [...] -/TControllerDef -/List::Controllers // holds a list of TAnimationDef instances -List::Animations -TAnimationDef -@Model::TModelDef // holds a list of TAnimationStageDef instances -List::Stages -TAnimationStageDef -List::Interpolators -TInterpolatorDef -TInterpolatorDef -TInterpolatorDef [...] -/List::Interpolators -/TAnimationStageDef -TAnimationStageDef [...] -/TAnimationStageDef -/List::Stages -/TAnimationDef -TAnimationDef [...] -/TAnimationDef -/List::Animations -/TModelDef

Classes

Records

Enumerations

Constants

  • const GORILLA_POLYGON_MAXSIZE : Integer = $C;
  • const GORILLA_ARRAY_TEXTURE_MAX : Integer = $20;
  • const GORILLA_ARRAY_COLOR_MAX : Integer = $4;
  • const GORILLA_ANIMATION_CACHE_FRAMERATE_24 : Integer = $18;
  • const GORILLA_ANIMATION_CACHE_FRAMERATE_30 : Integer = $1E;
  • const GORILLA_ANIMATION_CACHE_FRAMERATE_60 : Integer = $3C;
  • const GORILLA_ANIMATION_CACHE_FRAMERATE : Integer = $18;
  • const GORILLA_INDEX_FORMAT : TIndexFormat = UInt16;
  • const GORILLA_ANIMATION_CACHING_DEFAULT : TAnimationCachingFlags = ;
  • const GORILLA_ANIMATION_CACHING_COMPRESSEDEX : TAnimationCachingFlags = ;
  • const NullVertexID : TVertexID = ;

Mics. types

  • type TFloatType = Float;
  • type TIndexType = word;
  • type TTriangleID = array  [0..2]  of TVertexID;
  • type TPolygonID = array  of TVertexID;
  • type TTriangleIndex = array  [0..2]  of Word;
  • type PVertexData = pointer to TVertexData;
  • type TVertexTriangle = array  [0..2]  of TVertexData;
  • type PPolygon3D = pointer to TPolygon3D;
  • type TCustomDefClass = class of TCustomDef;
  • type TAnimationKeyInterpolationDynArray = array  of TInterpolationType;
  • type TJointRefDefClass = class of TJointRefDef;
  • type PVertexJoints = pointer to TVertexJoints;

Functions / Procedures

TAnimationCachingFlag

enum TAnimationCachingFlag = ( AllAttributes, Compressed, VertexPosition ) ;

Configuring caching mechanism. By these flags you can define the kind of caching used.

By default it's recommend to use TAnimationCachingFlag.VertexPosition only. This will only cache the vertex position in every frame directly inside of your GPU. This method is the fastest cache mechanism and will later only need a framebuffer switch while rendering. When having a lot of large animations this will stress GPU memory a lot. So its recommend for small animations which need fast switching and playback.

Compressed caching is recommend for large models and long animations, but will not create a framebuffer directly in GPU memory! Instead, on rendering time the cache will be decompressed and pushes afterwards data to the GPU memory. This is still much faster than animate a skin on runtime.

Remarks

AllAttributes - Caching all attributes of each vertex. This may be the fastest method, but memory usage is enormous! If possible use TAnimationCachingFlag.VertexPosition instead.

Compressed - Cached frames will be compressed inside the application memory. On MSWINDOWS x86 we use LZ4 compression for enourmous performance boost. On all other platforms we use ZLib compression algorithms by default.

VertexPosition - Cached frames will ONLY contain the vertex position. The other vertex data components will come from the static mesh buffer. This is the recommend setting for caching, because in 95%% of all cases you only need to transform vertex position on animation skin.

If "TAnimationCachingFlag.VertexPosition" option is set, the caching mechanism will create temporary mesh-vertexbuffers only with position data, instead of using the meshdata itself. So caching can push vertexbuffer directly to GPU memory, instead of extracting the VertexPosition from each vertex.

TColorChannelDef

enum TColorChannelDef = ( Diffuse, Ambient, Emissive, Specular, Normal ) ;

Color Channel definition diffuse, ambient, emissive, specular, normal

TAnimationBufferingState

enum TAnimationBufferingState = ( None, Started, Caching, Cached, Ready ) ;

frame buffering states: "Started" - Framebuffer recording was started "Recording" - at least one frame was recorded "Buffered" - the framerate was reached and buffering is complete "Stopped" - recording process was stopped

TImageDef

Not implemented yet! This should be used in future to define texture images abstractly.

Ancestors

Members

TSamplerDef

Not implemented yet! This should be used in future to set texture formats, wrapping and so on...

Ancestors

Members

Fields

Methods

Properties

TTextureDef

Ancestors

Members

Fields

Methods

Properties

TShaderDef

internal shader definition type by this type shader information can be stored

Ancestors

Members

TMaterialRefDef

internal material reference definition type by this type a reference to a specific material is handled

Ancestors

Members

TMaterialDef

internal material definition type by this type material information can be stored

Ancestors

Members

Fields

Methods

Properties

TAnimationDef

internal animation definition type by this type animation information can be stored an animation represents a group of stages (TAnimationStageDef) and can be seen as a grouping object for easy access

Ancestors

Members

Fields

Methods

Properties

TJointRefDef

Ancestors

Members

Fields

Methods

Properties

TSkinDef

skin definition type

Ancestors

Members

Fields

Methods

Properties

TCustomMeshDef

custom mesh definition type defines the basic information for a mesh or model

Ancestors

Members

Fields

Methods

Properties

TMeshDef

internal mesh definition type by this type we can store vertex information, materials and shaders

Ancestors

Members

Fields

Methods

Properties

TModelDef

internal model definition type by this type we can group mesh definitions

Ancestors

Members

Fields

Methods

Properties

TVertexCache

Ancestors

Members

Fields

Methods

Properties