Collision-detection: Structures and enumerations
- Enumerations
- VGAG3_COLL_RETURNS
Return value of the function VG3_move_object_check_collision()VGAG3_COLL_RETURN_NOOP No collision VGAG3_COLL_RETURN_HIT Object-instance hits another object-instance VGAG3_COLL_RETURN_DEAD Object-instance hits another object-instance and is being freed VGAG3_COLL_RETURN_HALFSTOP Object-instance is being stopped at one direction VGAG3_COLL_RETURN_FULLSTOP Object-instance is being totally stopped VGAG3_COLL_RETURN_CATCHED Object-instance is catched in collision VGAG3_COLL_RETURN_CONTINUE Object-instance may go on and check next obstacle - VGAG3_COLLSIDES
At which side(s) at the destination object the collision has been occurred.VGAG3_COLLSIDE_RIGHT At the right side VGAG3_COLLSIDE_LEFT At the left side VGAG3_COLLSIDE_TOP At the top VGAG3_COLLSIDE_BOTTOM At the bottom - Structures
- struct vg3_coll
Collision structure.
struct vg3_rect rect Collision rectangle of object-instance char oid[VGAG3_OID_SIZE] Individual object-ID (or empty if unused) void *optr Pointer to object-instance (e.g. of struct vg3_ofunc_object *) struct vg3_coll_ret ret For returning collision infos - struct vg3_coll_ret
Collision-return structure.
int side At which side(s) at the destination object the collision has been occurred (VGAG3_COLLSIDES) int maxsteps Number of total steps to be done int steps Number of steps taken to the position with collision struct vg3_rect pos_nocoll Last position without collision (or equal to pos_coll) struct vg3_rect pos_coll First position with collision int tag Tag of the quadtree - struct vg3_quadtree
Structure for quadtree, only internally used.