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
| 49 | * @param indexDataType Type of data for the indices (short, int) |
| 50 | */ |
| 51 | TriangleVertexArray::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 |
nothing calls this directly
no outgoing calls
no test coverage detected