VgaGames 3 - Collision-detection man-pages

[.. upper level ..]

VG3_coll_q_tag()

[added in version 1.3]

Tag a quadtree to distinguish it from other quadtrees.
SYNTAX
int VG3_coll_q_tag(struct vg3_quadtree *qdtr, int tag)

FUNCTION PARAMETERS
qdtr Quadtree
tag Tag (arbitrary number), or -1: don't tag

RETURN VALUE
Returns previous tag.

DESCRIPTION
Tag a quadtree to distinguish it from other quadtrees. If there are e.g. one quadtree for collision and another one for a longer distance collision (just coming near to an object), the second quadtree could be tagged with a number greater 0. In the f_collision() function from struct vg3_ofunc_objobjfunc this tag will be passed in the parameter struct vg3_coll_ret *collret. If a quadtree is not tagged, the value of the tag is set to 0.

SEE ALSO
VG3_coll_q_new()