blaze.collision.nbody.broadPhase
- struct
SPHContact
;
- Shape contact
- Shape
shape1
;
- The first shape
- Shape
shape2
;
- The second shape
- class
BroadPhase
;
- Broad-phase collison detection
- Contact[int]
contactPool
;
- Contact pair list
- Shape[]
shapes
;
- World shape list
- SPHContact []
sphList
;
- Particle/shape contact list
- this(World world);
- Constructor
Params:
World world |
the world that the collision detection will be done for |
- protected void
resetContactPool
();
- Reset the contact pool.
- protected void
updatePool
(int i1, int i2);
- Add new contacts to the contact pool, and update existing contacts
Params:
int i1 |
index of the first shape |
int i2 |
index of the second shape |
- protected void
scrubContactPool
();
- Remove contacts who's bounding boxes are no longer overlaping. All keys
left in the arbiter pool are no longer valid.
- void
addShape
(Shape s);
- Add shape to the shape list
Parmas:
s = the shape to add
- void
removeShape
(Shape s);
- Remove shape from the shape list
Params:
Shape s |
the shape to remove |
- void
removeBodyContacts
(Body b);
- Removes all contacts for a given body
Params:
Body b |
the body whose contacts sholud be removed |
- void
query
(AABB aabb, ref Shape[] results);
- Brute force
query
for overlapping AABB
Params:
AABB aabb |
The box that shapes are being tested for |
Shape[] results |
The shapes that intersect the box |
BUGS:
does not perform contact filtering
- void
processFluidContacts
();
- Process the fluid/shape contacts
- abstract void
search
();
- Update broadphase
- uint
hash
(uint ID1, uint ID2);
- Thomas Wang's
hash
.
This assumes Id1 and Id2 are 16-bit.
See Also:
www.concentric.net/~Ttwang/tech/inthash.htm
|