| 19 | * @see raylib::Mesh |
| 20 | */ |
| 21 | class MeshUnmanaged : public ::Mesh { |
| 22 | public: |
| 23 | /** |
| 24 | * Default texture constructor. |
| 25 | */ |
| 26 | MeshUnmanaged() { |
| 27 | vertexCount = 0; |
| 28 | triangleCount = 0; |
| 29 | vertices = nullptr; |
| 30 | texcoords = nullptr; |
| 31 | texcoords2 = nullptr; |
| 32 | normals = nullptr; |
| 33 | tangents = nullptr; |
| 34 | colors = nullptr; |
| 35 | indices = nullptr; |
| 36 | animVertices = nullptr; |
| 37 | animNormals = nullptr; |
| 38 | boneIndices = nullptr; |
| 39 | boneWeights = nullptr; |
| 40 | boneCount = 0; |
| 41 | vaoId = 0; |
| 42 | vboId = nullptr; |
| 43 | } |
| 44 | |
| 45 | MeshUnmanaged(const ::Mesh& mesh) { set(mesh); } |
| 46 | |
| 47 | MeshUnmanaged(::Mesh&& mesh) { set(mesh); } |
| 48 | |
| 49 | /** |
| 50 | * Load meshes from model file |
| 51 | */ |
| 52 | // static std::vector<Mesh> Load(const std::string& fileName) { |
| 53 | // int count = 0; |
| 54 | // ::Mesh* meshes = LoadMeshes(fileName.c_str(), &count); |
| 55 | // return std::vector<Mesh>(meshes, meshes + count); |
| 56 | // } |
| 57 | |
| 58 | /** |
| 59 | * Generate polygonal mesh |
| 60 | */ |
| 61 | static ::Mesh Poly(int sides, float radius) { return ::GenMeshPoly(sides, radius); } |
| 62 | |
| 63 | /** |
| 64 | * Generate plane mesh (with subdivisions) |
| 65 | */ |
| 66 | static ::Mesh Plane(float width, float length, int resX, int resZ) { |
| 67 | return ::GenMeshPlane(width, length, resX, resZ); |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Generate cuboid mesh |
| 72 | */ |
| 73 | static ::Mesh Cube(float width, float height, float length) { return ::GenMeshCube(width, height, length); } |
| 74 | |
| 75 | /** |
| 76 | * Generate sphere mesh (standard sphere) |
| 77 | */ |
| 78 | static ::Mesh Sphere(float radius, int rings, int slices) { return ::GenMeshSphere(radius, rings, slices); } |
nothing calls this directly
no test coverage detected