5#ifndef DCPP_I_MESH_CACHE_HPP_INCLUDED
6#define DCPP_I_MESH_CACHE_HPP_INCLUDED
8#include <duckcpp/core/engine/IReferenceCounted.hpp>
9#include <duckcpp/core/engine/path.hpp>
18 class IAnimatedMeshSceneNode;
Base class of most objects of the Duckcpp Engine.
Definition IReferenceCounted.hpp:46
Used in places where we identify objects by a filename, but don't actually work with the real filenam...
Definition path.hpp:24
const path & getInternalName() const
Definition path.hpp:56
Interface for an animated mesh.
Definition IAnimatedMesh.hpp:21
The mesh cache stores already loaded meshes and provides an interface to them.
Definition IMeshCache.hpp:28
DCPP_DEPRECATED const dcpp::io::path & getMeshFilename(const IMesh *const mesh) const
Get the name of a loaded mesh, if there is any. (Name is often identical to the filename).
Definition IMeshCache.hpp:100
DCPP_DEPRECATED const dcpp::io::path & getMeshFilename(dcpp::uint32_kt index) const
Get the name of a loaded mesh, based on its index. (Name is often identical to the filename).
Definition IMeshCache.hpp:92
virtual void clearUnusedMeshes()=0
Clears all meshes that are held in the mesh cache but not used anywhere else.
virtual dcpp::uint32_kt getMeshCount() const =0
Returns amount of loaded meshes in the cache.
virtual dcpp::int32_kt getMeshIndex(const IMesh *const mesh) const =0
Returns current index number of the mesh or -1 when not found.
virtual void addMesh(const dcpp::io::path &name, IAnimatedMesh *mesh)=0
Adds a mesh to the internal list of loaded meshes.
virtual IAnimatedMesh * getMeshByName(const dcpp::io::path &name)=0
Returns a mesh based on its name.
virtual ~IMeshCache()
Destructor.
Definition IMeshCache.hpp:32
virtual const dcpp::io::SNamedPath & getMeshName(const IMesh *const mesh) const =0
Get the name of the loaded mesh if there is any.
virtual IAnimatedMesh * getMeshByIndex(dcpp::uint32_kt index)=0
Returns a mesh based on its index number.
virtual const dcpp::io::SNamedPath & getMeshName(dcpp::uint32_kt index) const =0
Get the name of a loaded mesh, based on its index.
virtual void clear()=0
Clears the whole mesh cache, removing all meshes.
virtual bool renameMesh(dcpp::uint32_kt index, const dcpp::io::path &name)=0
Renames a loaded mesh.
DCPP_DEPRECATED bool setMeshFilename(const IMesh *const mesh, const dcpp::io::path &filename)
Renames a loaded mesh.
Definition IMeshCache.hpp:116
virtual bool isMeshLoaded(const dcpp::io::path &name)=0
Check if a mesh was already loaded.
DCPP_DEPRECATED IAnimatedMesh * getMeshByFilename(const dcpp::io::path &filename)
Returns a mesh based on its name (often a filename).
Definition IMeshCache.hpp:84
virtual void removeMesh(const IMesh *const mesh)=0
Removes the mesh from the cache.
virtual bool renameMesh(const IMesh *const mesh, const dcpp::io::path &name)=0
Renames the loaded mesh.
DCPP_DEPRECATED bool setMeshFilename(dcpp::uint32_kt index, const dcpp::io::path &filename)
Renames a loaded mesh.
Definition IMeshCache.hpp:108
Class which holds the geometry of an object.
Definition IMesh.hpp:72
As of Duckcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
unsigned int uint32_kt
32 bit unsigned variable.
Definition irrTypes.hpp:64
signed int int32_kt
32 bit signed variable.
Definition irrTypes.hpp:72