Description | Hierarchy | Fields | Methods | Properties |
type TMeshCache = class(TReferenceCounted)
The mesh cache stores already loaded meshes and provides an interface to them.
You can access it using TSceneManager.GetMeshCache. All existing scene managers will return a pointer to the same mesh cache, because it is shared between them. With this interface, it is possible to manually add new loaded meshes (if TSceneManager.GetMesh() is not sufficient), to remove them and to iterate through already loaded meshes.
![]() |
function GetMeshByIndex(Index: LongWord): TAnimatedMesh; inline; |
![]() |
function GetMeshByName(const Name: StringType): TAnimatedMesh; inline; |
![]() |
function GetMeshIndex(Mesh: TMesh): LongInt; overload; inline; |
![]() |
function GetMeshIndex(Mesh: TAnimatedMesh): LongInt; overload; inline; |
![]() |
function GetMeshName(Mesh: TAnimatedMesh): StringType; overload; inline; |
![]() |
function GetMeshName(Mesh: TMesh): StringType; overload; inline; |
![]() |
function GetMeshName(Index: LongWord): StringType; overload; inline; |
![]() |
function IsMeshLoaded(const Name: StringType): Boolean; inline; |
![]() |
procedure AddMesh(const Name: StringType; Mesh: TAnimatedMesh); inline; |
![]() |
procedure Clear; inline; |
![]() |
procedure ClearUnusedMeshes; inline; |
![]() |
procedure RemoveMesh(Mesh: TAnimatedMesh); overload; inline; |
![]() |
procedure RemoveMesh(Mesh: TMesh); overload; inline; |
![]() |
procedure RenameMesh(Index: LongWord; const Name: StringType); overload; inline; |
![]() |
procedure RenameMesh(Mesh: TAnimatedMesh; const Name: StringType); overload; inline; |
![]() |
procedure RenameMesh(Mesh: TMesh; const Name: StringType); overload; inline; |
![]() |
property MeshCount: LongWord read GetMeshCount; |
![]() |
function GetMeshByIndex(Index: LongWord): TAnimatedMesh; inline; |
Returns a mesh based on its index number. Parameters
ReturnsThe mesh or nil if there is none with this number. |
![]() |
function GetMeshByName(const Name: StringType): TAnimatedMesh; inline; |
Returns a mesh based on its name. Parameters
ReturnsThe mesh or nil if there is no such mesh. |
![]() |
function GetMeshIndex(Mesh: TMesh): LongInt; overload; inline; |
Returns current index number of the mesh, and -1 if it is not in the cache. Parameters
ReturnsIndex of the mesh in the cache, or -1 if not found. |
![]() |
function GetMeshIndex(Mesh: TAnimatedMesh): LongInt; overload; inline; |
Returns current index number of the mesh, and -1 if it is not in the cache. Parameters
ReturnsIndex of the mesh in the cache, or -1 if not found. |
![]() |
function GetMeshName(Mesh: TAnimatedMesh): StringType; overload; inline; |
Get the name of a loaded mesh, if there is any. Parameters
ReturnsThe name if mesh was found and has a name, else the path is empty. |
![]() |
function GetMeshName(Mesh: TMesh): StringType; overload; inline; |
Get the name of a loaded mesh, if there is any. Parameters
ReturnsThe name if mesh was found and has a name, else the path is empty. |
![]() |
function GetMeshName(Index: LongWord): StringType; overload; inline; |
Get the name of a loaded mesh by index. Parameters
ReturnsThe name if mesh was found and has a name, else the path is empty. |
![]() |
function IsMeshLoaded(const Name: StringType): Boolean; inline; |
Check if a mesh was already loaded. Parameters
ReturnsTrue if the mesh has been loaded, else false. |
![]() |
procedure AddMesh(const Name: StringType; Mesh: TAnimatedMesh); inline; |
Adds a mesh to the internal list of loaded meshes. Parameters
|
![]() |
procedure Clear; inline; |
Clears the whole mesh cache, removing all meshes. |
![]() |
procedure ClearUnusedMeshes; inline; |
Clears all meshes that are held in the mesh cache but not used anywhere else. |
![]() |
procedure RemoveMesh(Mesh: TAnimatedMesh); overload; inline; |
Removes a mesh from the cache. Parameters
|
![]() |
procedure RemoveMesh(Mesh: TMesh); overload; inline; |
Removes a mesh from the cache. Parameters
|
![]() |
procedure RenameMesh(Index: LongWord; const Name: StringType); overload; inline; |
Renames a loaded mesh. Parameters
ReturnsTrue if mesh was renamed. |
![]() |
procedure RenameMesh(Mesh: TAnimatedMesh; const Name: StringType); overload; inline; |
Renames a loaded mesh. Parameters
ReturnsTrue if mesh was renamed. |
![]() |
procedure RenameMesh(Mesh: TMesh; const Name: StringType); overload; inline; |
Renames a loaded mesh. Parameters
ReturnsTrue if mesh was renamed. |
![]() |
property MeshCount: LongWord read GetMeshCount; |
The number of loaded meshes in the cache. |