Class TMesh

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TMesh = class(TReferenceCounted)

Description

Class which holds the geometry of an object. An TMesh is nothing more than a collection of some mesh buffers (TMeshBuffer). A mesh is usually added to an TMeshSceneNode in order to be rendered.

Hierarchy

Overview

Methods

Public function GetMeshBuffer(Index: LongWord): TMeshBuffer; overload; inline;
Public function GetMeshBuffer(Material: PMaterial): TMeshBuffer; overload; inline;
Public procedure SetDirty(Buffer: TBufferType); inline;
Public procedure SetHardwareMappingHint(Hint: THardwareMappingHint; Buffer: TBufferType); inline;
Public procedure SetMaterialFlag(Flag: TMaterialFlag; NewValue: Boolean); inline;

Properties

Public property BoundingBox: TBoundingBox read GetBoundingBox Write SetBoundingBox;
Public property MeshBufferCount: LongWord read GetMeshBufferCount;

Description

Methods

Public function GetMeshBuffer(Index: LongWord): TMeshBuffer; overload; inline;

Returns a mesh buffer by index.

Parameters
Material
The Material to search for
Returns

The mesh buffer or nil if there is no such mesh buffer.

Public function GetMeshBuffer(Material: PMaterial): TMeshBuffer; overload; inline;

Returns a mesh buffer which fits a material.

Parameters
Material
The Material to search for
Returns

The mesh buffer or nil if there is no such mesh buffer.

Public procedure SetDirty(Buffer: TBufferType); inline;

Flag the meshbuffer as changed, reloads hardware buffers.
This method has to be called every time the vertices or indices have changed. Otherwise, changes won't be updated on the GPU in the next render cycle.

Public procedure SetHardwareMappingHint(Hint: THardwareMappingHint; Buffer: TBufferType); inline;

Set the hardware mapping hint. This methods allows to define optimization hints for the hardware. This enables, e.g., the use of hardware buffers on pltforms that support this feature. This can lead to noticeable performance gains.

Public procedure SetMaterialFlag(Flag: TMaterialFlag; NewValue: Boolean); inline;

Sets a flag of all contained materials to a new value.

Parameters
Flag
Flag to set in all materials.
NewValue
New value to set in all materials.

Properties

Public property BoundingBox: TBoundingBox read GetBoundingBox Write SetBoundingBox;

The axis aligned bounding box of the mesh.

Public property MeshBufferCount: LongWord read GetMeshBufferCount;

The number of buffers in the mesh.


Generated by PasDoc 0.12.1 on 2012-09-14 17:32:22