btBroadphaseInterface::rayTest specification

Motherbrain
Posts: 1
Joined: Tue Sep 11, 2012 12:26 pm

btBroadphaseInterface::rayTest specification

Post by Motherbrain »

I'm new to Bullet Physics and I'm trying to understand the following function:

Code: Select all

virtual void btBroadphaseInterface::rayTest(
	const btVector3 & rayFrom,
	const btVector3 & rayTo,
	btBroadphaseRayCallback & rayCallback,
	const btVector3 & aabbMin = btVector3(0, 0, 0),
	const btVector3 & aabbMax = btVector3(0, 0, 0)
)
How are the last two parameters, aabbMin and aabbMax, used?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: btBroadphaseInterface::rayTest specification

Post by Erwin Coumans »

The rayTest can optionally perform a swept AABB test (rather than just sweeping a point).
This can be useful to accelerate linearly swept volume queries, for example the btCollisionWorld::convexSweepTest uses this interface.

Note that most users don't need to worry about this internal interface, unless you (re) implement your own broadphase and you want to support swept queries.