* Vertex data defining a mesh * * The Mesh will be unloaded on object destruction. * * @see raylib::MeshUnmanaged */
| 18 | * @see raylib::MeshUnmanaged |
| 19 | */ |
| 20 | class Mesh : public MeshUnmanaged { |
| 21 | public: |
| 22 | using MeshUnmanaged::MeshUnmanaged; |
| 23 | |
| 24 | /** |
| 25 | * Explicitly forbid the copy constructor. |
| 26 | */ |
| 27 | Mesh(const Mesh&) = delete; |
| 28 | |
| 29 | /** |
| 30 | * Explicitly forbid copy assignment. |
| 31 | */ |
| 32 | Mesh& operator=(const Mesh&) = delete; |
| 33 | |
| 34 | /** |
| 35 | * Move constructor. |
| 36 | */ |
| 37 | Mesh(Mesh&& other) noexcept { |
| 38 | set(other); |
| 39 | |
| 40 | other.vertexCount = 0; |
| 41 | other.triangleCount = 0; |
| 42 | other.vertices = nullptr; |
| 43 | other.texcoords = nullptr; |
| 44 | other.texcoords2 = nullptr; |
| 45 | other.normals = nullptr; |
| 46 | other.tangents = nullptr; |
| 47 | other.colors = nullptr; |
| 48 | other.indices = nullptr; |
| 49 | other.animVertices = nullptr; |
| 50 | other.animNormals = nullptr; |
| 51 | other.boneIndices = nullptr; |
| 52 | other.boneWeights = nullptr; |
| 53 | other.boneCount = 0; |
| 54 | other.vaoId = 0; |
| 55 | other.vboId = nullptr; |
| 56 | } |
| 57 | |
| 58 | Mesh& operator=(Mesh&& other) noexcept { |
| 59 | if (this == &other) { |
| 60 | return *this; |
| 61 | } |
| 62 | |
| 63 | Unload(); |
| 64 | set(other); |
| 65 | |
| 66 | other.vertexCount = 0; |
| 67 | other.triangleCount = 0; |
| 68 | other.vertices = nullptr; |
| 69 | other.texcoords = nullptr; |
| 70 | other.texcoords2 = nullptr; |
| 71 | other.normals = nullptr; |
| 72 | other.tangents = nullptr; |
| 73 | other.colors = nullptr; |
| 74 | other.indices = nullptr; |
| 75 | other.animVertices = nullptr; |
| 76 | other.animNormals = nullptr; |
| 77 | other.boneIndices = nullptr; |
nothing calls this directly
no outgoing calls
no test coverage detected