![]() |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
Vertex data defining a mesh, not managed by C++ RAII. More...
#include <MeshUnmanaged.hpp>
Public Member Functions | |
| MeshUnmanaged () | |
| Default texture constructor. | |
| MeshUnmanaged (::Mesh &&mesh) | |
| MeshUnmanaged (const ::Mesh &mesh) | |
| raylib::BoundingBox | BoundingBox () const |
| Compute mesh bounding box limits. | |
| void | Draw (const ::Material &material, const ::Matrix &transform) const |
| Draw a 3d mesh with material and transform. | |
| void | Draw (const ::Material &material, const ::Matrix *transforms, int instances) const |
| Draw multiple mesh instances with material and different transforms. | |
| void | Export (const std::string &fileName) |
| Export mesh data to file. | |
| void | ExportCode (const std::string &fileName) |
| Export mesh as code file (.h) defining multiple arrays of vertex attributes. | |
| Mesh & | GenTangents () |
| Compute mesh tangents. | |
| float * | GetAnimNormals () const |
| Retrieves the animNormals value for the object. | |
| float * | GetAnimVertices () const |
| Retrieves the animVertices value for the object. | |
| unsigned char * | GetBoneIndices () const |
| Retrieves the boneIndices value for the object. | |
| float * | GetBoneWeights () const |
| Retrieves the boneWeights value for the object. | |
| unsigned char * | GetColors () const |
| Retrieves the colors value for the object. | |
| unsigned short * | GetIndices () const |
| Retrieves the indices value for the object. | |
| float * | GetNormals () const |
| Retrieves the normals value for the object. | |
| float * | GetTangents () const |
| Retrieves the tangents value for the object. | |
| float * | GetTexCoords () const |
| Retrieves the texcoords value for the object. | |
| float * | GetTexCoords2 () const |
| Retrieves the texcoords2 value for the object. | |
| int | GetTriangleCount () const |
| Retrieves the triangleCount value for the object. | |
| unsigned int | GetVaoId () const |
| Retrieves the vaoId value for the object. | |
| unsigned int * | GetVboId () const |
| Retrieves the vboId value for the object. | |
| int | GetVertexCount () const |
| Retrieves the vertexCount value for the object. | |
| float * | GetVertices () const |
| Retrieves the vertices value for the object. | |
| bool | IsValid () const |
| Returns whether or not the Mesh is valid. | |
| raylib::Model | LoadModelFrom () const |
| Load model from generated mesh. | |
| operator raylib::BoundingBox () const | |
| Compute mesh bounding box limits. | |
| operator raylib::Model () | |
| Load model from generated mesh. | |
| MeshUnmanaged & | operator= (const ::Mesh &mesh) |
| void | SetAnimNormals (float *value) |
| Sets the animNormals value for the object. | |
| void | SetAnimVertices (float *value) |
| Sets the animVertices value for the object. | |
| void | SetBoneIndices (unsigned char *value) |
| Sets the boneIndices value for the object. | |
| void | SetBoneWeights (float *value) |
| Sets the boneWeights value for the object. | |
| void | SetColors (unsigned char *value) |
| Sets the colors value for the object. | |
| void | SetIndices (unsigned short *value) |
| Sets the indices value for the object. | |
| void | SetNormals (float *value) |
| Sets the normals value for the object. | |
| void | SetTangents (float *value) |
| Sets the tangents value for the object. | |
| void | SetTexCoords (float *value) |
| Sets the texcoords value for the object. | |
| void | SetTexCoords2 (float *value) |
| Sets the texcoords2 value for the object. | |
| void | SetTriangleCount (int value) |
| Sets the triangleCount value for the object. | |
| void | SetVaoId (unsigned int value) |
| Sets the vaoId value for the object. | |
| void | SetVboId (unsigned int *value) |
| Sets the vboId value for the object. | |
| void | SetVertexCount (int value) |
| Sets the vertexCount value for the object. | |
| void | SetVertices (float *value) |
| Sets the vertices value for the object. | |
| void | Unload () |
| Unload mesh from memory (RAM and/or VRAM) | |
| void | UpdateBuffer (int index, void *data, int dataSize, int offset=0) |
| Upload mesh vertex data to GPU (VRAM) | |
| void | Upload (bool dynamic=false) |
| Upload mesh vertex data to GPU (VRAM) | |
Static Public Member Functions | |
| ::Mesh | Cone (float radius, float height, int slices) |
| Generate cone/pyramid mesh. | |
| ::Mesh | Cube (float width, float height, float length) |
| Generate cuboid mesh. | |
| ::Mesh | Cubicmap (const ::Image &cubicmap, ::Vector3 cubeSize) |
| Generate cubes-based map mesh from image data. | |
| ::Mesh | Cylinder (float radius, float height, int slices) |
| Generate cylinder mesh. | |
| ::Mesh | Heightmap (const ::Image &heightmap, ::Vector3 size) |
| Generate heightmap mesh from image data. | |
| ::Mesh | HemiSphere (float radius, int rings, int slices) |
| Generate half-sphere mesh (no bottom cap) | |
| ::Mesh | Knot (float radius, float size, int radSeg, int sides) |
| Generate trefoil knot mesh. | |
| ::Mesh | Plane (float width, float length, int resX, int resZ) |
| Generate plane mesh (with subdivisions) | |
| ::Mesh | Poly (int sides, float radius) |
| Load meshes from model file. | |
| ::Mesh | Sphere (float radius, int rings, int slices) |
| Generate sphere mesh (standard sphere) | |
| ::Mesh | Torus (float radius, float size, int radSeg, int sides) |
| Generate torus mesh. | |
Protected Member Functions | |
| void | set (const ::Mesh &mesh) |
Vertex data defining a mesh, not managed by C++ RAII.
Make sure to Unload() this if needed, otherwise use raylib::Mesh.
Definition at line 21 of file MeshUnmanaged.hpp.
|
inline |
Default texture constructor.
Definition at line 26 of file MeshUnmanaged.hpp.
|
inline |
Definition at line 45 of file MeshUnmanaged.hpp.
|
inline |
Definition at line 47 of file MeshUnmanaged.hpp.
|
inline |
Compute mesh bounding box limits.
Definition at line 201 of file MeshUnmanaged.hpp.
|
inlinestatic |
Generate cone/pyramid mesh.
Definition at line 93 of file MeshUnmanaged.hpp.
|
inlinestatic |
Generate cuboid mesh.
Definition at line 73 of file MeshUnmanaged.hpp.
|
inlinestatic |
Generate cubes-based map mesh from image data.
Definition at line 117 of file MeshUnmanaged.hpp.
|
inlinestatic |
Generate cylinder mesh.
Definition at line 88 of file MeshUnmanaged.hpp.
|
inline |
Draw a 3d mesh with material and transform.
Definition at line 167 of file MeshUnmanaged.hpp.
|
inline |
Draw multiple mesh instances with material and different transforms.
Definition at line 172 of file MeshUnmanaged.hpp.
|
inline |
Export mesh data to file.
| raylib::RaylibException | Throws if failed to export the Mesh. |
Definition at line 181 of file MeshUnmanaged.hpp.
|
inline |
Export mesh as code file (.h) defining multiple arrays of vertex attributes.
| raylib::RaylibException | Throws if failed to export the Mesh. |
Definition at line 192 of file MeshUnmanaged.hpp.
|
inline |
Compute mesh tangents.
Definition at line 211 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the animNormals value for the object.
Definition at line 131 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the animVertices value for the object.
Definition at line 130 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the boneIndices value for the object.
Definition at line 132 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the boneWeights value for the object.
Definition at line 133 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the colors value for the object.
Definition at line 128 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the indices value for the object.
Definition at line 129 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the normals value for the object.
Definition at line 126 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the tangents value for the object.
Definition at line 127 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the texcoords value for the object.
Definition at line 124 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the texcoords2 value for the object.
Definition at line 125 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the triangleCount value for the object.
Definition at line 122 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the vaoId value for the object.
Definition at line 134 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the vboId value for the object.
Definition at line 135 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the vertexCount value for the object.
Definition at line 121 of file MeshUnmanaged.hpp.
|
inline |
Retrieves the vertices value for the object.
Definition at line 123 of file MeshUnmanaged.hpp.
|
inlinestatic |
Generate heightmap mesh from image data.
Definition at line 112 of file MeshUnmanaged.hpp.
|
inlinestatic |
Generate half-sphere mesh (no bottom cap)
Definition at line 83 of file MeshUnmanaged.hpp.
|
inline |
Returns whether or not the Mesh is valid.
Definition at line 229 of file MeshUnmanaged.hpp.
|
inlinestatic |
Generate trefoil knot mesh.
Definition at line 105 of file MeshUnmanaged.hpp.
|
inline |
Load model from generated mesh.
Definition at line 219 of file MeshUnmanaged.hpp.
|
inline |
Compute mesh bounding box limits.
Definition at line 206 of file MeshUnmanaged.hpp.
References operator raylib::BoundingBox().
Referenced by operator raylib::BoundingBox().
|
inline |
Load model from generated mesh.
Definition at line 224 of file MeshUnmanaged.hpp.
|
inline |
Definition at line 137 of file MeshUnmanaged.hpp.
|
inlinestatic |
Generate plane mesh (with subdivisions)
Definition at line 66 of file MeshUnmanaged.hpp.
|
inlinestatic |
Load meshes from model file.
Generate polygonal mesh
Definition at line 61 of file MeshUnmanaged.hpp.
|
inlineprotected |
Definition at line 232 of file MeshUnmanaged.hpp.
|
inline |
Sets the animNormals value for the object.
| value | The value of which to set animNormals to. |
Definition at line 131 of file MeshUnmanaged.hpp.
|
inline |
Sets the animVertices value for the object.
| value | The value of which to set animVertices to. |
Definition at line 130 of file MeshUnmanaged.hpp.
|
inline |
Sets the boneIndices value for the object.
| value | The value of which to set boneIndices to. |
Definition at line 132 of file MeshUnmanaged.hpp.
|
inline |
Sets the boneWeights value for the object.
| value | The value of which to set boneWeights to. |
Definition at line 133 of file MeshUnmanaged.hpp.
|
inline |
Sets the colors value for the object.
| value | The value of which to set colors to. |
Definition at line 128 of file MeshUnmanaged.hpp.
|
inline |
Sets the indices value for the object.
| value | The value of which to set indices to. |
Definition at line 129 of file MeshUnmanaged.hpp.
|
inline |
Sets the normals value for the object.
| value | The value of which to set normals to. |
Definition at line 126 of file MeshUnmanaged.hpp.
|
inline |
Sets the tangents value for the object.
| value | The value of which to set tangents to. |
Definition at line 127 of file MeshUnmanaged.hpp.
|
inline |
Sets the texcoords value for the object.
| value | The value of which to set texcoords to. |
Definition at line 124 of file MeshUnmanaged.hpp.
|
inline |
Sets the texcoords2 value for the object.
| value | The value of which to set texcoords2 to. |
Definition at line 125 of file MeshUnmanaged.hpp.
|
inline |
Sets the triangleCount value for the object.
| value | The value of which to set triangleCount to. |
Definition at line 122 of file MeshUnmanaged.hpp.
|
inline |
Sets the vaoId value for the object.
| value | The value of which to set vaoId to. |
Definition at line 134 of file MeshUnmanaged.hpp.
|
inline |
Sets the vboId value for the object.
| value | The value of which to set vboId to. |
Definition at line 135 of file MeshUnmanaged.hpp.
|
inline |
Sets the vertexCount value for the object.
| value | The value of which to set vertexCount to. |
Definition at line 121 of file MeshUnmanaged.hpp.
|
inline |
Sets the vertices value for the object.
| value | The value of which to set vertices to. |
Definition at line 123 of file MeshUnmanaged.hpp.
|
inlinestatic |
Generate sphere mesh (standard sphere)
Definition at line 78 of file MeshUnmanaged.hpp.
|
inlinestatic |
Generate torus mesh.
Definition at line 98 of file MeshUnmanaged.hpp.
|
inline |
Unload mesh from memory (RAM and/or VRAM)
Definition at line 145 of file MeshUnmanaged.hpp.
|
inline |
Upload mesh vertex data to GPU (VRAM)
Definition at line 160 of file MeshUnmanaged.hpp.
|
inline |
Upload mesh vertex data to GPU (VRAM)
Definition at line 155 of file MeshUnmanaged.hpp.