VgaGames 3 - Collision-detection man-pages

[.. upper level ..]

VG3_coll_q_insert()

Insert an object-instance into a quadtree.
SYNTAX
int VG3_coll_q_insert(struct vg3_quadtree *qdtr, struct vg3_coll *coll)

FUNCTION PARAMETERS
qdtr Quadtree
coll Collision values for object-instance to insert

RETURN VALUE
Returns 0 if OK or -1 on failure.

ERRORS
On error VG3_errmsg() returns: EINVAL - error in argument ENOMEM - cannot get memory

DESCRIPTION
Insert an object-instance into a quadtree. The parameter coll must have been at least filled out with - rect: contains the collision rectangle of the object-instance - optr: contains the pointer to the object-instance optional: - oid: may contain a string for recognizing the object of the instance unused: - ret: ignored (Note that the object-instance may be inserted repeatedly with different positions).

SEE ALSO
VG3_coll_q_remove() VG3_coll_q_getobj() VG3_coll_q_getobjs() VG3_coll_q_mark()