Previous | Up | Next |
M3testColl
Collision test between sub-trees A and B.Parameters
If A (resp B) is a sub-tree of B (resp A), the test is performed between sub-tree A (resp B) and sub-tree B (resp A) less sub-tree A (resp B).
The collision test is performed on the displacement of A indicated by the given vector (expressed in the global space)..
Returns nil if there is no collision, otherwise returns the two objects which collide as well as the two vectors (integer values):
- the first is collinear with the displacement vector and gives the displacement up to the point of collision.
- the second equals :
- nil if A and B already intersect prior to the displacement
- otherwise, a vector which is perpendicular to the collision plane, such that when added to the displacement vector given as a parameter, a vector proposing the collision resolution is obtained.
[H3d H3d [I I I] [I I I]] M3testColl ( S3d _session_ H3d _A_ H3d _B_ [I I I] _translation_ I _distance_ )
Return value
_session_ 3D Session _A_ A Object _B_ B Object _translation_ Translation vector of A _distance_ distance of collision (the system will keep this distance between objects)
Two objects in collision with the associated vectors, otherwise nil