Description | Hierarchy | Fields | Methods | Properties |
type TAdMesh = class(TAdRenderingObject)
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.
![]() |
constructor Create(AParent: TAdDraw); virtual; |
![]() |
destructor Destroy; override; |
![]() |
procedure Draw(ASurface: TAdSurface; ABlendMode: TAd2dBlendMode = bmAlpha); virtual; |
![]() |
property Parent: TAdDraw read FParent write FParent; |
![]() |
property Texture: TAdCustomTexture read FTexture write SetTexture; |
![]() |
property Material: TAd2dMaterial read FMaterial write SetMaterial; |
![]() |
property UseMaterial: boolean read FUseMaterial write SetUseMaterial; |
![]() |
property X: single index 0 read FX write SetCoeff; |
![]() |
property Y: single index 1 read FY write SetCoeff; |
![]() |
property Z: single index 2 read FZ write SetCoeff; |
![]() |
property ScaleX: single index 3 read FScaleX write SetCoeff; |
![]() |
property ScaleY: single index 4 read FScaleY write SetCoeff; |
![]() |
property ScaleZ: single index 5 read FScaleZ write SetCoeff; |
![]() |
property RotationX: single index 6 read FRotX write SetCoeff; |
![]() |
property RotationY: single index 7 read FRotY write SetCoeff; |
![]() |
property RotationZ: single index 8 read FRotZ write SetCoeff; |
![]() |
property Matrix: TAdMatrix read FMatrix write SetMatrix; |
![]() |
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. |
![]() |
destructor Destroy; override; |
Destroys the instance of TAdMesh. |
![]() |
procedure Draw(ASurface: TAdSurface; ABlendMode: TAd2dBlendMode = bmAlpha); virtual; |
Draws the mesh on the specified surface. Parameters
|
![]() |
property Parent: TAdDraw read FParent write FParent; |
Pointer on the parent TAdDraw. |
![]() |
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. |
![]() |
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
|
![]() |
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
|
![]() |
property X: single index 0 read FX write SetCoeff; |
The X-value the mesh should be translated by. |
![]() |
property Y: single index 1 read FY write SetCoeff; |
The Y-value the mesh should be translated by. |
![]() |
property Z: single index 2 read FZ write SetCoeff; |
The Z-value the mesh should be translated by. |
![]() |
property ScaleX: single index 3 read FScaleX write SetCoeff; |
The scale in X direction. Relative values. |
![]() |
property ScaleY: single index 4 read FScaleY write SetCoeff; |
The scale in Y direction. Relative values. |
![]() |
property ScaleZ: single index 5 read FScaleZ write SetCoeff; |
The scale in Z direction. Relative values. |
![]() |
property RotationX: single index 6 read FRotX write SetCoeff; |
Rotation around the X-axis of the coordinate system. |
![]() |
property RotationY: single index 7 read FRotY write SetCoeff; |
Rotation around the Y-axis of the coordinate system. |
![]() |
property RotationZ: single index 8 read FRotZ write SetCoeff; |
Rotation around the Z-axis of the coordinate system. |
![]() |
property Matrix: TAdMatrix read FMatrix write SetMatrix; |
Returns the current translation matrix. |