Search found 16 matches

by Sly
Sun Jul 06, 2008 10:53 pm
Forum: General Bullet Physics Support and Feedback
Topic: collision shape binary format
Replies: 13
Views: 9474

Re: collision shape binary format

A lot of work, yes. Besides, to share vertex and index buffers we still need to tell Bullet where those buffers are, so "cooking" would not be able to include those buffers. It's a nice thought, but the costs may outweigh the benefits.
by Sly
Sun Jul 06, 2008 2:23 am
Forum: General Bullet Physics Support and Feedback
Topic: collision shape binary format
Replies: 13
Views: 9474

Re: collision shape binary format

Bullet allows you to serialize the BVH data to disk (the equivalent of PhysX cooking). An example can be seen in the ConcaveDemo (ConcavePhysicsDemo.cpp ~line 185). Enjoy :) - Alex If I read the sample code correctly though, we still need to add the vertex and index buffers to the triangle mesh sha...
by Sly
Fri Jul 04, 2008 12:17 pm
Forum: General Bullet Physics Support and Feedback
Topic: collision shape binary format
Replies: 13
Views: 9474

Re: collision shape binary format

Generating the BVH can take some time. I have a 320,000 triangle height map mesh that takes approximately five seconds to generate the BVH. PhysX can "cook" the same mesh in about two seconds, and not require the vertex and index buffers to be reloaded into the shape like Bullet. This is p...
by Sly
Fri Jul 04, 2008 12:10 pm
Forum: General Bullet Physics Support and Feedback
Topic: Getting user data into InternalTickCallback
Replies: 13
Views: 10642

Re: Getting user data into InternalTickCallback

Why hack the code? Derive your own world class with the info you want. class MyPhysicsWorld : public btDiscreteDynamicsWorld { public: MyPhysicsWorld(MyPhysicsManager *manager, btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* co...
by Sly
Fri Jul 04, 2008 11:46 am
Forum: General Bullet Physics Support and Feedback
Topic: Correct way to set a ContactProcessed callback?
Replies: 3
Views: 3996

Re: Correct way to set a ContactProcessed callback?

Aside from the debatable semantics of passing a pointer to a function, that is the correct way?
by Sly
Thu Jul 03, 2008 6:51 am
Forum: General Bullet Physics Support and Feedback
Topic: Correct way to set a ContactProcessed callback?
Replies: 3
Views: 3996

Correct way to set a ContactProcessed callback?

Is this the correct way to set a contact processed callback, or is there a proper function to set it?

extern ContactProcessedCallback gContactProcessedCallback;
gContactProcessedCallback = MyContactProcessedCallback;
by Sly
Tue Jul 01, 2008 10:08 pm
Forum: General Bullet Physics Support and Feedback
Topic: collision shape binary format
Replies: 13
Views: 9474

Re: collision shape binary format

There is a binary format for storing a generated BVH, but it does not store the shapes.
by Sly
Mon Jun 16, 2008 12:44 am
Forum: General Bullet Physics Support and Feedback
Topic: Making Bullet more portable
Replies: 1
Views: 2572

Re: Making Bullet more portable

You mean similar to the header already in Extras\BulletMultiThreaded\PlatformDefinitions.h?
by Sly
Sat May 24, 2008 11:08 pm
Forum: General Bullet Physics Support and Feedback
Topic: Custom memory management
Replies: 8
Views: 7194

Re: Custom memory management

Thanks for that. Will the SPU-optimized version be available as well, or will that wait for the final release of 2.69?
by Sly
Mon May 12, 2008 4:40 am
Forum: General Bullet Physics Support and Feedback
Topic: Custom memory management
Replies: 8
Views: 7194

Re: Custom memory management

I have revised the custom memory management callbacks to provide two sets of callbacks: aligned and unaligned. I also had to disable profiling (btQuickprof.h) in my local copy. There is a static declaration of CProfileNode that has two pointers to memory that get allocated during runtime using the c...
by Sly
Sat May 10, 2008 10:56 pm
Forum: General Bullet Physics Support and Feedback
Topic: Custom memory management
Replies: 8
Views: 7194

Re: Custom memory management

I will revisit the changes taking your comments into account.
by Sly
Fri May 09, 2008 5:16 am
Forum: General Bullet Physics Support and Feedback
Topic: Custom memory management
Replies: 8
Views: 7194

Re: Custom memory management

I also have another fix. We override new and delete in our game code, so including btAlignedObjectArray.h (via btDynamicsCommon.h) causes a redefinition error of the new operator. Commenting out BT_USE_PLACEMENT_NEW causes compile errors in Bullet (placement new is required), so I have the following...
by Sly
Fri May 09, 2008 2:15 am
Forum: General Bullet Physics Support and Feedback
Topic: Custom memory management
Replies: 8
Views: 7194

Re: Custom memory management

I've now implemented functionality to allow the game to optionally provide their own custom memory allocation functions. It retains previous behaviour unless btAlignedAllocSetCustom() is called to provide new functions. You will want to call btAlignedAllocSetCustom() before any other Bullet code is ...
by Sly
Thu May 08, 2008 11:15 pm
Forum: General Bullet Physics Support and Feedback
Topic: Custom memory management
Replies: 8
Views: 7194

Custom memory management

Is there a proper way to override the btAlignedAlloc/btAlignedFree with our own memory management? I've seen mentioned in other posts about providing our own stack and pool allocators, but those classes just use btAlignedAlloc anyway.