Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Jan 21, 2008 2:51 am 
Offline

Joined: Thu Jan 17, 2008 8:51 pm
Posts: 5
Below is a simple wrapper class I am making so that I can easly create objects. Currently I can Initilize bullet, create and draw box's, spheres, and triangle meshes. Before I work on this anymore ( currently it will do most of the things I need it to do ) I would like to know how my code is. Is there anything I am missing or that I might find useful to add?

Also why is it that I get a error when trying to find the local inertia for triangle meshes, also when setting the meshes's mass to anything other then 0 why does everything fall threw it.

Thanks.


Attachments:
File comment: a wrapper class
BulletWrap.tar [20 KiB]
Downloaded 109 times
Top
 Profile  
 
PostPosted: Mon Jan 21, 2008 8:18 pm 
Offline

Joined: Thu Jan 17, 2008 8:51 pm
Posts: 5
Does anyone know how to properly add to a triangle mesh that has already been added to the world. Found out that the addTrianglesToMesh and updateMesh functions dont really work :S.. I have the drawing ofcouse but the collision body isnt updated, or something...


Top
 Profile  
 
PostPosted: Wed Jan 23, 2008 12:00 am 
Offline
Site Admin
User avatar

Joined: Sun Jun 26, 2005 6:43 pm
Posts: 3744
Location: California, USA
Quote:
Also why is it that I get a error when trying to find the local inertia for triangle meshes, also when setting the meshes's mass to anything other then 0 why does everything fall threw it.

btBvhTriangleMeshShape is only for static, non-moving, non-dynamic objects with mass zero. If you want to use moving objects, you can better approximate the shape using a btConvexHullShape, or btCompoundShape with multiple simple shapes. Alternatively use btGimpactMeshShape, see MovingConcaveDemo how to use this.

Osami wrote:
Does anyone know how to properly add to a triangle mesh that has already been added to the world. Found out that the addTrianglesToMesh and updateMesh functions dont really work :S.. I have the drawing ofcouse but the collision body isnt updated, or something...


You cannot add triangles to it, after construction.

Hope this helps,
Erwin


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 4 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