MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / TriangleVertexArray

Method TriangleVertexArray

src/collision/TriangleVertexArray.cpp:51–66  ·  view source on GitHub ↗

Constructor without vertices normals Note that your data will not be copied into the TriangleVertexArray and therefore, you need to make sure that those data are always valid during the lifetime of the TriangleVertexArray. With this constructor, you do not need to provide vertices normals for smooth mesh collision. Therefore, the vertices normals will be computed automatically. The vertices normal

Source from the content-addressed store, hash-verified

49 * @param indexDataType Type of data for the indices (short, int)
50 */
51TriangleVertexArray::TriangleVertexArray(uint32 nbVertices, const void* verticesStart, uint32 verticesStride,
52 uint32 nbTriangles, const void* indexesStart, uint32 indexesStride,
53 VertexDataType vertexDataType, IndexDataType indexDataType) {
54 mNbVertices = nbVertices;
55 mVerticesStart = static_cast<const uchar*>(verticesStart);
56 mVerticesStride = verticesStride;
57 mVerticesNormalsStart = nullptr;
58 mVerticesNormalsStride = 3 * sizeof(float);
59 mNbTriangles = nbTriangles;
60 mIndicesStart = static_cast<const uchar*>(indexesStart);
61 mIndicesStride = indexesStride;
62 mVertexDataType = vertexDataType;
63 mVertexNormaldDataType = NormalDataType::NORMAL_FLOAT_TYPE;
64 mIndexDataType = indexDataType;
65 mHasNormals = false;
66}
67
68// Constructor with vertices normals
69/// Note that your data will not be copied into the TriangleVertexArray and

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected