![]() |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
Vertex data defining a mesh. More...
#include <Mesh.hpp>
Public Member Functions | |
Mesh (const Mesh &)=delete | |
Explicitly forbid the copy constructor. | |
Mesh (Mesh &&other) | |
Move constructor. More... | |
MeshUnmanaged () | |
Default texture constructor. More... | |
MeshUnmanaged (::Mesh &&mesh) | |
MeshUnmanaged (const ::Mesh &mesh) | |
Mesh & | operator= (const Mesh &)=delete |
Explicitly forbid copy assignment. | |
Mesh & | operator= (Mesh &&other) noexcept |
![]() | |
MeshUnmanaged () | |
Default texture constructor. More... | |
MeshUnmanaged (::Mesh &&mesh) | |
MeshUnmanaged (const ::Mesh &mesh) | |
raylib::BoundingBox | BoundingBox () const |
Compute mesh bounding box limits. More... | |
void | Draw (const ::Material &material, ::Matrix *transforms, int instances) const |
Draw multiple mesh instances with material and different transforms. More... | |
void | Draw (const ::Material &material, const ::Matrix &transform) const |
Draw a 3d mesh with material and transform. More... | |
void | Export (std::string_view fileName) |
Export mesh data to file. More... | |
Mesh & | GenTangents () |
Compute mesh tangents. More... | |
float * | GetAnimNormals () const |
Retrieves the animNormals value for the object. More... | |
float * | GetAnimVertices () const |
Retrieves the animVertices value for the object. More... | |
unsigned char * | GetBoneIds () const |
Retrieves the boneIds value for the object. More... | |
float * | GetBoneWeights () const |
Retrieves the boneWeights value for the object. More... | |
unsigned char * | GetColors () const |
Retrieves the colors value for the object. More... | |
unsigned short * | GetIndices () const |
Retrieves the indices value for the object. More... | |
float * | GetNormals () const |
Retrieves the normals value for the object. More... | |
float * | GetTangents () const |
Retrieves the tangents value for the object. More... | |
float * | GetTexCoords () const |
Retrieves the texcoords value for the object. More... | |
float * | GetTexCoords2 () const |
Retrieves the texcoords2 value for the object. More... | |
raylib::BoundingBox | GetTransformedBoundingBox (::Matrix transform) const |
Compute mesh bounding box limits with respect to the given transformation. More... | |
int | GetTriangleCount () const |
Retrieves the triangleCount value for the object. More... | |
unsigned int | GetVaoId () const |
Retrieves the vaoId value for the object. More... | |
unsigned int * | GetVboId () const |
Retrieves the vboId value for the object. More... | |
int | GetVertexCount () const |
Retrieves the vertexCount value for the object. More... | |
float * | GetVertices () const |
Retrieves the vertices value for the object. More... | |
raylib::Model | LoadModelFrom () const |
Load model from generated mesh. More... | |
operator raylib::BoundingBox () | |
Compute mesh bounding box limits. More... | |
operator raylib::Model () | |
Load model from generated mesh. More... | |
MeshUnmanaged & | operator= (const ::Mesh &mesh) |
void | SetAnimNormals (float *value) |
Sets the animNormals value for the object. More... | |
void | SetAnimVertices (float *value) |
Sets the animVertices value for the object. More... | |
void | SetBoneIds (unsigned char *value) |
Sets the boneIds value for the object. More... | |
void | SetBoneWeights (float *value) |
Sets the boneWeights value for the object. More... | |
void | SetColors (unsigned char *value) |
Sets the colors value for the object. More... | |
void | SetIndices (unsigned short *value) |
Sets the indices value for the object. More... | |
void | SetNormals (float *value) |
Sets the normals value for the object. More... | |
void | SetTangents (float *value) |
Sets the tangents value for the object. More... | |
void | SetTexCoords (float *value) |
Sets the texcoords value for the object. More... | |
void | SetTexCoords2 (float *value) |
Sets the texcoords2 value for the object. More... | |
void | SetTriangleCount (int value) |
Sets the triangleCount value for the object. More... | |
void | SetVaoId (unsigned int value) |
Sets the vaoId value for the object. More... | |
void | SetVboId (unsigned int *value) |
Sets the vboId value for the object. More... | |
void | SetVertexCount (int value) |
Sets the vertexCount value for the object. More... | |
void | SetVertices (float *value) |
Sets the vertices value for the object. More... | |
void | Unload () |
Unload mesh from memory (RAM and/or VRAM) More... | |
void | UpdateBuffer (int index, void *data, int dataSize, int offset=0) |
Upload mesh vertex data to GPU (VRAM) More... | |
void | Upload (bool dynamic=false) |
Upload mesh vertex data to GPU (VRAM) More... | |
Additional Inherited Members | |
![]() | |
static MeshUnmanaged | Cone (float radius, float height, int slices) |
Generate cone/pyramid mesh. More... | |
static MeshUnmanaged | Cube (float width, float height, float length) |
Generate cuboid mesh. More... | |
static MeshUnmanaged | Cubicmap (const ::Image &cubicmap, ::Vector3 cubeSize) |
Generate cubes-based map mesh from image data. More... | |
static MeshUnmanaged | Cylinder (float radius, float height, int slices) |
Generate cylinder mesh. More... | |
static MeshUnmanaged | Heightmap (const ::Image &heightmap, ::Vector3 size) |
Generate heightmap mesh from image data. More... | |
static MeshUnmanaged | HemiSphere (float radius, int rings, int slices) |
Generate half-sphere mesh (no bottom cap) More... | |
static MeshUnmanaged | Knot (float radius, float size, int radSeg, int sides) |
Generate trefoil knot mesh. More... | |
static MeshUnmanaged | Plane (float width, float length, int resX, int resZ) |
Generate plane mesh (with subdivisions) More... | |
static MeshUnmanaged | Plane (float width, float length, int resX, int resZ, float textureScale) |
static MeshUnmanaged | Poly (int sides, float radius) |
Load meshes from model file. More... | |
static MeshUnmanaged | Sphere (float radius, int rings, int slices) |
Generate sphere mesh (standard sphere) More... | |
static MeshUnmanaged | Torus (float radius, float size, int radSeg, int sides) |
Generate torus mesh. More... | |
![]() | |
void | set (const ::Mesh &mesh) |
Vertex data defining a mesh.
The Mesh will be unloaded on object destruction.
|
inline |
|
inline |
Default texture constructor.
Definition at line 26 of file MeshUnmanaged.hpp.
|
inline |
Definition at line 48 of file MeshUnmanaged.hpp.
|
inline |
Definition at line 44 of file MeshUnmanaged.hpp.