Physics Simulation Forum


All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue May 30, 2017 9:14 am 

Joined: Tue May 30, 2017 8:52 am
Posts: 1
So this may get a little complex but ill try to keep it fairly simplified. (this is C++)
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
        m_indexVertexArrays = new btTriangleIndexVertexArray(TriCount,
      VertexCount,(btScalar*) &Vertices[0].x(),vertStride);
        trimeshShape  = new btBvhTriangleMeshShape(m_indexVertexArrays,useQuantizedAabbCompression,aabbMin,aabbMax);
   btCollisionShape* groundShape = trimeshShape;

Is there a way to link into the mesh directly, so I can manipulate it more fluidly.

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


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 5 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group