Raylib C++  1.0.0
Encapsulates the raylib library
Public Member Functions | List of all members
raylib::model::RlMesh Class Reference

Encapsulation of the raylib Mesh. More...

#include <RlMesh.hpp>

Collaboration diagram for raylib::model::RlMesh:
Collaboration graph

Public Member Functions

 RlMesh (const Mesh &mesh)
 Creates a new RlMesh. More...
 
 RlMesh (const RlMesh &mesh)
 Copy constructor (create a copy of the raylib Mesh) More...
 
RlMeshoperator= (const RlMesh &mesh)
 Assignment operator (Create a copy of the raylib Mesh) More...
 
 ~RlMesh ()
 Destroys the RlMesh. More...
 
void uploadInGPU (const bool &dynamic)
 Upload mesh vertex data in GPU and provide VAO/VBO ids. More...
 
void updateBuffer (const int &index, void *data, const int &dataSize, const int &offset)
 Update mesh vertex data in GPU for a specific buffer index. More...
 
bool exportMesh (const std::string &fileName)
 Export mesh data to file, returns true on success. More...
 
BoundingBox getBoundingBox ()
 Compute mesh bounding box limits. More...
 
void genTangents ()
 Compute mesh tangents. More...
 
void genBinormals ()
 Compute mesh binormals. More...
 
const Mesh & getMesh () const
 Get the mesh. More...
 
const std::shared_ptr< Mesh > & getMeshSharedPtr () const
 Get the mesh shared ptr. More...
 

Detailed Description

Encapsulation of the raylib Mesh.

Constructor & Destructor Documentation

◆ RlMesh() [1/2]

raylib::model::RlMesh::RlMesh ( const Mesh &  mesh)
explicit

Creates a new RlMesh.

Parameters
meshthe mesh to use
Attention
Don't use this, use the RlMeshBuilder instead

◆ RlMesh() [2/2]

raylib::model::RlMesh::RlMesh ( const RlMesh mesh)

Copy constructor (create a copy of the raylib Mesh)

Parameters
meshthe mesh

◆ ~RlMesh()

raylib::model::RlMesh::~RlMesh ( )

Destroys the RlMesh.

Member Function Documentation

◆ exportMesh()

bool raylib::model::RlMesh::exportMesh ( const std::string &  fileName)

Export mesh data to file, returns true on success.

Parameters
fileNamethe file name to export the mesh in
Returns
true on success

◆ genBinormals()

void raylib::model::RlMesh::genBinormals ( )

Compute mesh binormals.

◆ genTangents()

void raylib::model::RlMesh::genTangents ( )

Compute mesh tangents.

◆ getBoundingBox()

BoundingBox raylib::model::RlMesh::getBoundingBox ( )

Compute mesh bounding box limits.

Parameters
meshthe mesh to compute the bounding box from
Returns
the bounding box of the mesh

◆ getMesh()

const Mesh & raylib::model::RlMesh::getMesh ( ) const

Get the mesh.

Returns
the mesh
Here is the caller graph for this function:

◆ getMeshSharedPtr()

const std::shared_ptr< Mesh > & raylib::model::RlMesh::getMeshSharedPtr ( ) const

Get the mesh shared ptr.

Returns
the mesh shared ptr

◆ operator=()

raylib::model::RlMesh & raylib::model::RlMesh::operator= ( const RlMesh mesh)

Assignment operator (Create a copy of the raylib Mesh)

Parameters
meshthe Mesh
Returns
the RlMesh

◆ updateBuffer()

void raylib::model::RlMesh::updateBuffer ( const int &  index,
void *  data,
const int &  dataSize,
const int &  offset 
)

Update mesh vertex data in GPU for a specific buffer index.

Parameters
indexthe buffer index to update
datathe new data to upload
dataSizethe size of the data to upload
offsetthe offset to update

◆ uploadInGPU()

void raylib::model::RlMesh::uploadInGPU ( const bool &  dynamic)

Upload mesh vertex data in GPU and provide VAO/VBO ids.

Parameters
dynamictrue if the mesh is dynamic

The documentation for this class was generated from the following files: