VgaGames 3 - Collision-detection man-pages

[.. upper level ..]

VG3_coll_check()

Check for collision of two object-instances, where the first one is moving on a line.
SYNTAX
int VG3_coll_check(struct vg3_coll_ret *collret, struct vg3_rect *rect1from, struct vg3_rect *rect1to, struct vg3_rect *rect2)

FUNCTION PARAMETERS
collret For returning collision-return values (element tag will not be set)
rect1from Begin position of the moving object-instance
rect1to End position of the moving object-instance
rect2 Position of the second object-instance

RETURN VALUE
Returns integer: - 0: Collision detected - 1: No collision detected

DESCRIPTION
Check if an object-instance, while it is moving from a begin position to an end position, represented by two rectangles, collides with another given static object-instance. The common way to check for collsion in a quadtree is VG3_coll_q_find().

SEE ALSO
VG3_coll_q_find()