the loaded mesh
debug draw
And I save the indices and vertices in vector<> format.
Code: Select all
auto meshInterface = new btTriangleIndexVertexArray(
static_cast<int>(mpObjLoader->getIdxNums()),
reinterpret_cast<int*>(mpObjLoader->getTriIndices()),
sizeof(int)*3,
static_cast<int>(mpObjLoader->getVertNums()),
mpObjLoader->getVertices(),
sizeof(float)*3
);
bool useQuantizedAabbCompression = true;
auto trimeshShape = new btBvhTriangleMeshShape(meshInterface,useQuantizedAabbCompression);
Code: Select all
float *PlyLoader::getVertices() const {
return mvVertices->data();
}