FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Collision Callbacks

 
Post new topic   Reply to topic     Forum Index -> Blaze
View previous topic :: View next topic  
Author Message
zzzzrrr



Joined: 17 Feb 2007
Posts: 139
Location: Washington, DC

PostPosted: Sat May 31, 2008 10:09 pm    Post subject: Collision Callbacks Reply with quote

I've taken a first stab at implementing a collision callback system, based on Box2D, in the trunk. Look in blaze.dynamics.ContactListener for the abstract class:

Code:
abstract class ContactListener
{
   /// Method flags - enable method functionality
   bool ADD, PERSIST, REMOVE, RESULT;

   /// Called when a contact point is added. This includes the geometry
   /// and the forces.
   abstract void add(ContactPoint point);

   /// Called when a contact point persists. This includes the geometry
   /// and the forces.
   abstract void persist(ContactPoint point);

   /// Called when a contact point is removed. This includes the last
   /// computed geometry and forces.
   abstract void remove(ContactPoint point);

   /// Called after a contact point is solved.
   abstract void result(ContactResult point);
}


Also look in blaze-demos at Demo.d and CollisionCallBack.d for a VERY basic introduction.

Comments/complaints/suggestions are welcome.

Regards,
Mason
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Blaze All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group