raylib-cpp
C++ object-oriented wrapper library for raylib.
Public Member Functions | List of all members
raylib::Model Class Reference

Model type. More...

Public Member Functions

 Model (const ::Mesh &mesh)
 
 Model (const ::Model &model)
 
 Model (const std::string &fileName)
 
Model & Draw (::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})
 Draw a model with extended parameters.
 
Model & Draw (::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})
 Draw a model (with texture if set)
 
Model & DrawWires (::Vector3 position, ::Vector3 rotationAxis, float rotationAngle=0.0f, ::Vector3 scale={1.0f, 1.0f, 1.0f}, ::Color tint={255, 255, 255, 255})
 Draw a model wires (with texture if set) with extended parameters.
 
Model & DrawWires (::Vector3 position, float scale=1.0f, ::Color tint={255, 255, 255, 255})
 Draw a model wires (with texture if set)
 
::Transform * GetBindPoe () const
 Retrieves the bindPose value for the object. More...
 
int GetBoneCount () const
 Retrieves the boneCount value for the object. More...
 
::BoneInfo * GetBones () const
 Retrieves the bones value for the object. More...
 
RayHitInfo GetCollision (const ::Ray &ray) const
 Get collision info between ray and model.
 
int GetMaterialCount () const
 Retrieves the materialCount value for the object. More...
 
::Material * GetMaterials () const
 Retrieves the materials value for the object. More...
 
int GetMeshCount () const
 Retrieves the meshCount value for the object. More...
 
::Mesh * GetMeshes () const
 Retrieves the meshes value for the object. More...
 
int * GetMeshMaterial () const
 Retrieves the meshMaterial value for the object. More...
 
::Matrix GetTransform () const
 Retrieves the transform value for the object. More...
 
bool IsModelAnimationValid (const ::ModelAnimation &anim) const
 Check model animation skeleton match.
 
Model & operator= (const ::Model &model)
 
void SetBindPoe (::Transform *value)
 Sets the bindPose value for the object. More...
 
void SetBoneCount (int value)
 Sets the boneCount value for the object. More...
 
void SetBones (::BoneInfo *value)
 Sets the bones value for the object. More...
 
void SetMaterialCount (int value)
 Sets the materialCount value for the object. More...
 
void SetMaterials (::Material *value)
 Sets the materials value for the object. More...
 
void SetMeshCount (int value)
 Sets the meshCount value for the object. More...
 
void SetMeshes (::Mesh *value)
 Sets the meshes value for the object. More...
 
void SetMeshMaterial (int *value)
 Sets the meshMaterial value for the object. More...
 
Model & SetMeshMaterial (int meshId, int materialId)
 Set material for a mesh.
 
void SetTransform (::Matrix value)
 Sets the transform value for the object. More...
 
void Unload ()
 Unload model (including meshes) from memory (RAM and/or VRAM)
 
Model & UnloadKeepMeshes ()
 Unload model (but not meshes) from memory (RAM and/or VRAM)
 
Model & UpdateAnimation (const ::ModelAnimation &anim, int frame)
 Update model animation pose.
 

Detailed Description

Model type.

Definition at line 14 of file Model.hpp.

Member Function Documentation

◆ GetBindPoe()

::Transform* raylib::Model::GetBindPoe ( ) const
inline

Retrieves the bindPose value for the object.

Returns
The bindPose value of the object.

Definition at line 40 of file Model.hpp.

◆ GetBoneCount()

int raylib::Model::GetBoneCount ( ) const
inline

Retrieves the boneCount value for the object.

Returns
The boneCount value of the object.

Definition at line 38 of file Model.hpp.

◆ GetBones()

::BoneInfo* raylib::Model::GetBones ( ) const
inline

Retrieves the bones value for the object.

Returns
The bones value of the object.

Definition at line 39 of file Model.hpp.

◆ GetMaterialCount()

int raylib::Model::GetMaterialCount ( ) const
inline

Retrieves the materialCount value for the object.

Returns
The materialCount value of the object.

Definition at line 34 of file Model.hpp.

◆ GetMaterials()

::Material* raylib::Model::GetMaterials ( ) const
inline

Retrieves the materials value for the object.

Returns
The materials value of the object.

Definition at line 36 of file Model.hpp.

◆ GetMeshCount()

int raylib::Model::GetMeshCount ( ) const
inline

Retrieves the meshCount value for the object.

Returns
The meshCount value of the object.

Definition at line 33 of file Model.hpp.

◆ GetMeshes()

::Mesh* raylib::Model::GetMeshes ( ) const
inline

Retrieves the meshes value for the object.

Returns
The meshes value of the object.

Definition at line 35 of file Model.hpp.

◆ GetMeshMaterial()

int* raylib::Model::GetMeshMaterial ( ) const
inline

Retrieves the meshMaterial value for the object.

Returns
The meshMaterial value of the object.

Definition at line 37 of file Model.hpp.

◆ GetTransform()

::Matrix raylib::Model::GetTransform ( ) const
inline

Retrieves the transform value for the object.

Returns
The transform value of the object.

Definition at line 32 of file Model.hpp.

◆ SetBindPoe()

void raylib::Model::SetBindPoe ( ::Transform *  value)
inline

Sets the bindPose value for the object.

Parameters
valueThe value of which to set bindPose to.

Definition at line 40 of file Model.hpp.

◆ SetBoneCount()

void raylib::Model::SetBoneCount ( int  value)
inline

Sets the boneCount value for the object.

Parameters
valueThe value of which to set boneCount to.

Definition at line 38 of file Model.hpp.

◆ SetBones()

void raylib::Model::SetBones ( ::BoneInfo *  value)
inline

Sets the bones value for the object.

Parameters
valueThe value of which to set bones to.

Definition at line 39 of file Model.hpp.

◆ SetMaterialCount()

void raylib::Model::SetMaterialCount ( int  value)
inline

Sets the materialCount value for the object.

Parameters
valueThe value of which to set materialCount to.

Definition at line 34 of file Model.hpp.

◆ SetMaterials()

void raylib::Model::SetMaterials ( ::Material *  value)
inline

Sets the materials value for the object.

Parameters
valueThe value of which to set materials to.

Definition at line 36 of file Model.hpp.

◆ SetMeshCount()

void raylib::Model::SetMeshCount ( int  value)
inline

Sets the meshCount value for the object.

Parameters
valueThe value of which to set meshCount to.

Definition at line 33 of file Model.hpp.

◆ SetMeshes()

void raylib::Model::SetMeshes ( ::Mesh *  value)
inline

Sets the meshes value for the object.

Parameters
valueThe value of which to set meshes to.

Definition at line 35 of file Model.hpp.

◆ SetMeshMaterial()

void raylib::Model::SetMeshMaterial ( int *  value)
inline

Sets the meshMaterial value for the object.

Parameters
valueThe value of which to set meshMaterial to.

Definition at line 37 of file Model.hpp.

◆ SetTransform()

void raylib::Model::SetTransform ( ::Matrix  value)
inline

Sets the transform value for the object.

Parameters
valueThe value of which to set transform to.

Definition at line 32 of file Model.hpp.