tec::MD5Mesh
#include <md5mesh.hpp>
Inherits from tec::MeshFile
Public Classes
Name | |
---|---|
struct | InternalMesh |
struct | Joint |
struct | Triangle |
struct | Vertex |
struct | Weight |
Public Functions
Name | |
---|---|
std::shared_ptr< MD5Mesh > | Create(const Path & fname) Returns a resource with the specified name. |
bool | Parse() Loads the MD5Mesh file from disk and parses it. |
void | CalculateVertexPositions() Calculates the final vertex positions based on the bind-pose skeleton. |
void | CalculateVertexNormals() Calculates the vertex normals based on the bind-pose skeleton and mesh tris. |
void | UpdateIndexList() Updates the meshgroups index list based from the loaded mesh groups. |
void | SetFileName(const Path & fname) Sets the mesh filename. |
Friends
Name | |
---|---|
class | MD5Anim |
Additional inherited members
Public Functions inherited from tec::MeshFile
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 inherited from tec::MeshFile
Name | |
---|---|
std::vector< Mesh * > | meshes |
std::string | name |
bool | dirty |
Public Functions Documentation
function Create
static std::shared_ptr< MD5Mesh > Create(
const Path & fname
)
Returns a resource with the specified name.
Parameters:
Return: std::shared_ptr
The only used initialization property is "filename".
function Parse
bool Parse()
Loads the MD5Mesh file from disk and parses it.
Return: bool If the mesh was valid and loaded correctly.
function CalculateVertexPositions
void CalculateVertexPositions()
Calculates the final vertex positions based on the bind-pose skeleton.
Return: void
There isn't a return as the processing will just do nothing if the parse data was default objects.
function CalculateVertexNormals
void CalculateVertexNormals()
Calculates the vertex normals based on the bind-pose skeleton and mesh tris.
Return: void
There isn't a return as the processing will just do nothing if the parse data was default objects.
function UpdateIndexList
void UpdateIndexList()
Updates the meshgroups index list based from the loaded mesh groups.
Return: void
There isn't a return as the processing will just do nothing if the parse data was default objects.
function SetFileName
inline void SetFileName(
const Path & fname
)
Sets the mesh filename.
Parameters:
- const std::string& fname The mesh filename.
Return: bool True if initialization finished with no errors.
This is just a shorthand function that can be called directly via script API.
Friends
friend MD5Anim
friend class MD5Anim(
MD5Anim
);
Updated on 2022-07-24 at 19:27:35 +0000