tec::MeshFile

#include <mesh.hpp>

Inherited by tec::MD5Mesh, tec::OBJ

Public Functions

Name
virtual ~MeshFile()
Mesh * CreateMesh()
Creates a new mesh and adds it to this file.
void AddMesh(Mesh * mesh)
Adds a mesh to this file. Ownership is transferred.
Mesh * GetMesh(const std::size_t index)
Returns a specific mesh.
std::size_t GetMeshCount() const
Returns the number of meshes in this file.
const std::string GetName() const
void SetName(const std::string & _name)
bool IsDirty() const
void Invalidate()
Mark dirty.
void Validate()
Mark not dirty.

Protected Attributes

Name
std::vector< Mesh * > meshes
std::string name
bool dirty

Public Functions Documentation

function ~MeshFile

virtual ~MeshFile()

function CreateMesh

inline Mesh * CreateMesh()

Creates a new mesh and adds it to this file.

Return: Mesh* The mesh that was added to this file.

function AddMesh

inline void AddMesh(
    Mesh * mesh
)

Adds a mesh to this file. Ownership is transferred.

Parameters:

  • Mesh* mesh The mesh to add to this file.

Return: void

function GetMesh

inline Mesh * GetMesh(
    const std::size_t index
)

Returns a specific mesh.

Parameters:

  • const unsigned size_t index The index of the mesh to retrieve.

Return: std::weak_ptr The requested mesh or null if the index is invalid.

function GetMeshCount

inline std::size_t GetMeshCount() const

Returns the number of meshes in this file.

Return: size_t The number of meshes in this file.

function GetName

inline const std::string GetName() const

function SetName

inline void SetName(
    const std::string & _name
)

function IsDirty

inline bool IsDirty() const

function Invalidate

inline void Invalidate()

Mark dirty.

function Validate

inline void Validate()

Mark not dirty.

Protected Attributes Documentation

variable meshes

std::vector< Mesh * > meshes;

variable name

std::string name {"test"};

variable dirty

bool dirty {false};

Updated on 2022-07-24 at 19:27:35 +0000