Class TAdMesh

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TAdMesh = class(TAdRenderingObject)

Description

TAdMesh is the base class for 3D objects in Andorra 2D. It wraps around the TAd2dMesh interface and allows classes derived from TAdMesh to load their own mesh data. It also provides properties that may be used to set the position, scaling and the rotation of the object. Textures and materials may be applied to the mesh.

Hierarchy

Overview

Methods

Public constructor Create(AParent: TAdDraw); virtual;
Public destructor Destroy; override;
Public procedure Draw(ASurface: TAdSurface; ABlendMode: TAd2dBlendMode = bmAlpha); virtual;

Properties

Public property Parent: TAdDraw read FParent write FParent;
Public property Texture: TAdCustomTexture read FTexture write SetTexture;
Public property Material: TAd2dMaterial read FMaterial write SetMaterial;
Public property UseMaterial: boolean read FUseMaterial write SetUseMaterial;
Public property X: single index 0 read FX write SetCoeff;
Public property Y: single index 1 read FY write SetCoeff;
Public property Z: single index 2 read FZ write SetCoeff;
Public property ScaleX: single index 3 read FScaleX write SetCoeff;
Public property ScaleY: single index 4 read FScaleY write SetCoeff;
Public property ScaleZ: single index 5 read FScaleZ write SetCoeff;
Public property RotationX: single index 6 read FRotX write SetCoeff;
Public property RotationY: single index 7 read FRotY write SetCoeff;
Public property RotationZ: single index 8 read FRotZ write SetCoeff;
Public property Matrix: TAdMatrix read FMatrix write SetMatrix;

Description

Methods

Public constructor Create(AParent: TAdDraw); virtual;

Creates a new instance of TAdMesh. The underlying TAd2dMesh structure is created and filled with data by calling the "LoadMeshData" function that has to be implemented by classes derived from TAdMesh.

Public destructor Destroy; override;

Destroys the instance of TAdMesh.

Public procedure Draw(ASurface: TAdSurface; ABlendMode: TAd2dBlendMode = bmAlpha); virtual;

Draws the mesh on the specified surface.

Parameters
ASurface
specifies the target surface. May be nil, if you want to draw on the surface that is currently active.
ABlendMode
specifies the blend mode the mesh should be drawn in.

Properties

Public property Parent: TAdDraw read FParent write FParent;

Pointer on the parent TAdDraw.

Public property Texture: TAdCustomTexture read FTexture write SetTexture;

The texture the loaded mesh should be texurized with. Please keep in mind that TAdMesh is not capable of figuring out the texture coordinates that match to your texture.

Public property Material: TAd2dMaterial read FMaterial write SetMaterial;

Material represents the material of the mesh. "UseMaterial" is set to true when storing data in "Material". Do not use the Pascal "with" operation when writing data to material. It won't be properly stored. Use a temporary variable instead.

See also
Material
Material represents the material of the mesh.
Public property UseMaterial: boolean read FUseMaterial write SetUseMaterial;

Set this to true if you want to use materials with this mesh. "UseMaterial" is automatically set to true, when setting the "Material" property.

See also
UseMaterial
Set this to true if you want to use materials with this mesh.
Public property X: single index 0 read FX write SetCoeff;

The X-value the mesh should be translated by.

Public property Y: single index 1 read FY write SetCoeff;

The Y-value the mesh should be translated by.

Public property Z: single index 2 read FZ write SetCoeff;

The Z-value the mesh should be translated by.

Public property ScaleX: single index 3 read FScaleX write SetCoeff;

The scale in X direction. Relative values.

Public property ScaleY: single index 4 read FScaleY write SetCoeff;

The scale in Y direction. Relative values.

Public property ScaleZ: single index 5 read FScaleZ write SetCoeff;

The scale in Z direction. Relative values.

Public property RotationX: single index 6 read FRotX write SetCoeff;

Rotation around the X-axis of the coordinate system.

Public property RotationY: single index 7 read FRotY write SetCoeff;

Rotation around the Y-axis of the coordinate system.

Public property RotationZ: single index 8 read FRotZ write SetCoeff;

Rotation around the Z-axis of the coordinate system.

Public property Matrix: TAdMatrix read FMatrix write SetMatrix;

Returns the current translation matrix.

SourceForge.net Logo


Generated by PasDoc 0.11.0 on 2008-12-31 14:31:58