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

Public Member Functions

 Model (::Mesh mesh)
 
 Model (::Model model)
 
 Model (const std::string &fileName)
 
 ~Model ()
 
int GetBoneCount () const
 
RayHitInfo GetCollision (::Ray ray) const
 Get collision info between ray and model. More...
 
int GetMaterialCount () const
 
int GetMeshCount () const
 
inline ::Matrix GetTransform () const
 
bool IsModelAnimationValid (::ModelAnimation anim) const
 Check model animation skeleton match. More...
 
Model & operator= (const ::Model &model)
 
Model & operator= (const Model &model)
 
void SetBoneCount (int value)
 
void SetMaterialCount (int value)
 
void SetMeshCount (int value)
 
Model & SetMeshMaterial (int meshId, int materialId)
 Set material for a mesh. More...
 
void SetTransform (::Matrix value)
 
void Unload ()
 Unload model (including meshes) from memory (RAM and/or VRAM) More...
 
Model & UnloadKeepMeshes ()
 Unload model (but not meshes) from memory (RAM and/or VRAM) More...
 
Model & UpdateModelAnimation (::ModelAnimation anim, int frame)
 Update model animation pose. More...
 

Protected Member Functions

void set (::Model model)
 

Detailed Description

Definition at line 35 of file Model.hpp.

Constructor & Destructor Documentation

◆ Model() [1/3]

raylib::Model::Model ( ::Model  model)
inline

Definition at line 37 of file Model.hpp.

References set().

◆ Model() [2/3]

raylib::Model::Model ( const std::string &  fileName)
inline

Definition at line 41 of file Model.hpp.

References set().

◆ Model() [3/3]

raylib::Model::Model ( ::Mesh  mesh)
inline

Definition at line 45 of file Model.hpp.

References set().

◆ ~Model()

raylib::Model::~Model ( )
inline

Definition at line 49 of file Model.hpp.

References Unload().

Member Function Documentation

◆ GetBoneCount()

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

Definition at line 56 of file Model.hpp.

◆ GetCollision()

RayHitInfo raylib::Model::GetCollision ( ::Ray  ray) const
inline

Get collision info between ray and model.

Definition at line 94 of file Model.hpp.

◆ GetMaterialCount()

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

Definition at line 55 of file Model.hpp.

◆ GetMeshCount()

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

Definition at line 54 of file Model.hpp.

◆ GetTransform()

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

Definition at line 53 of file Model.hpp.

◆ IsModelAnimationValid()

bool raylib::Model::IsModelAnimationValid ( ::ModelAnimation  anim) const
inline

Check model animation skeleton match.

Definition at line 109 of file Model.hpp.

◆ operator=() [1/2]

Model& raylib::Model::operator= ( const ::Model &  model)
inline

Definition at line 58 of file Model.hpp.

References set().

◆ operator=() [2/2]

Model& raylib::Model::operator= ( const Model &  model)
inline

Definition at line 63 of file Model.hpp.

References set().

◆ set()

void raylib::Model::set ( ::Model  model)
inlineprotected

Definition at line 114 of file Model.hpp.

Referenced by Model(), and operator=().

◆ SetBoneCount()

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

Definition at line 56 of file Model.hpp.

◆ SetMaterialCount()

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

Definition at line 55 of file Model.hpp.

◆ SetMeshCount()

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

Definition at line 54 of file Model.hpp.

◆ SetMeshMaterial()

Model& raylib::Model::SetMeshMaterial ( int  meshId,
int  materialId 
)
inline

Set material for a mesh.

Definition at line 86 of file Model.hpp.

◆ SetTransform()

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

Definition at line 53 of file Model.hpp.

◆ Unload()

void raylib::Model::Unload ( )
inline

Unload model (including meshes) from memory (RAM and/or VRAM)

Definition at line 71 of file Model.hpp.

Referenced by ~Model().

◆ UnloadKeepMeshes()

Model& raylib::Model::UnloadKeepMeshes ( )
inline

Unload model (but not meshes) from memory (RAM and/or VRAM)

Definition at line 78 of file Model.hpp.

◆ UpdateModelAnimation()

Model& raylib::Model::UpdateModelAnimation ( ::ModelAnimation  anim,
int  frame 
)
inline

Update model animation pose.

Definition at line 101 of file Model.hpp.