Currently I have
struct cube - basic node of the octree
struct vtxarray - render information of the above cube which is updated on every change of the octree (only in spots needed)
I have a vector of vtxarrays which I used to derive the information for
Is there a way to link into the mesh directly, so I can manipulate it more fluidly.
Code: Select all
m_indexVertexArrays = new btTriangleIndexVertexArray(TriCount, Indices, indexStride, VertexCount,(btScalar*) &Vertices.x(),vertStride); trimeshShape = new btBvhTriangleMeshShape(m_indexVertexArrays,useQuantizedAabbCompression,aabbMin,aabbMax); btCollisionShape* groundShape = trimeshShape;
Would making every cube (non-empty) in the octree its own mesh be better for realtime manipulation, or is there a better way to build a shape in bullet where I have more control over the verticies. Or are there call backs that I can use to handle collision differently?
It works right now but its kinda slow on larger sizes (say 100k verts it takes about 1 sec to calculate).
I can post the code more fluidly if you have any question