amino  1.0-beta2
Lightweight Robot Utility Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
scene_collision.h File Reference

Collision checking. More...

Go to the source code of this file.

Functions

AA_API void aa_rx_cl_init ()
 Initialize collision handling.
 
AA_API struct aa_rx_cl_set * aa_rx_cl_set_create (const struct aa_rx_sg *sg)
 Create a collision set.
 
AA_API void aa_rx_cl_set_destroy (struct aa_rx_cl_set *cl_set)
 Destroy a collision set.
 
AA_API void aa_rx_cl_set_set (struct aa_rx_cl_set *cl_set, aa_rx_frame_id i, aa_rx_frame_id j, int is_colliding)
 Set the value of collision between frames i and j.
 
AA_API void aa_rx_cl_set_fill (struct aa_rx_cl_set *dst, const struct aa_rx_cl_set *src)
 Fill dst with all true entries in src. More...
 
AA_API int aa_rx_cl_set_get (const struct aa_rx_cl_set *cl_set, aa_rx_frame_id i, aa_rx_frame_id j)
 Return the value of collision between frames i and j.
 
AA_API void aa_rx_cl_set_merge (struct aa_rx_cl_set *into, const struct aa_rx_cl_set *from)
 Fill set `into' with all elements in set `from'. More...
 
AA_API void aa_rx_cl_set_clear (struct aa_rx_cl_set *cl_set)
 Clear all collisions stored in the set.
 
AA_API void aa_rx_sg_cl_init (struct aa_rx_sg *scene_graph)
 Initialize the collision structures within scene_graph.
 
AA_API struct aa_rx_cl * aa_rx_cl_create (const struct aa_rx_sg *scene_graph)
 Create a new collision detection context for scene_graph.
 
AA_API void aa_rx_cl_destroy (struct aa_rx_cl *cl)
 Destroy a collision detection context.
 
AA_API void aa_rx_cl_allow (struct aa_rx_cl *cl, aa_rx_frame_id i, aa_rx_frame_id j, int allowed)
 Allow (ignore) collisions between frames i and j if allowed is true.
 
AA_API void aa_rx_cl_allow_set (struct aa_rx_cl *cl, const struct aa_rx_cl_set *set)
 Allow collisions between all frame pairs in set.
 
AA_API void aa_rx_cl_allow_name (struct aa_rx_cl *cl, const char *frame0, const char *frame1, int allowed)
 Allow (ignore) collisions between frames0 and frame1 if allowed is true.
 
AA_API int aa_rx_cl_check (struct aa_rx_cl *cl, size_t n_tf, const double *TF, size_t ldTF, struct aa_rx_cl_set *cl_set)
 Detect collisions. More...
 
AA_API void aa_rx_sg_allow_config (struct aa_rx_sg *scene_graph, size_t n_q, const double *q)
 Allow all collisions at configuration q.
 
AA_API void aa_rx_sg_cl_set_copy (const struct aa_rx_sg *sg, struct aa_rx_cl_set *cl_set)
 Retrieve the set of allowed collisions.
 
AA_API void aa_rx_sg_get_collision (const struct aa_rx_sg *scene_graph, size_t n_q, const double *q, struct aa_rx_cl_set *cl_set)
 Check the collisions at q.
 

Detailed Description

Collision checking.

Definition in file scene_collision.h.

Function Documentation

AA_API int aa_rx_cl_check ( struct aa_rx_cl *  cl,
size_t  n_tf,
const double *  TF,
size_t  ldTF,
struct aa_rx_cl_set *  cl_set 
)

Detect collisions.

If cl_set is non-NULL, it will be filled in with all detected collisions. If cl_set is NULL, collision checking may short-circuit after the first collision is detected.

Returns
0 if no collisions are detected and non-zero if any collisions are detected.
AA_API void aa_rx_cl_set_fill ( struct aa_rx_cl_set *  dst,
const struct aa_rx_cl_set *  src 
)

Fill dst with all true entries in src.

False entries in src have no effect corresponding entries in dst.

AA_API void aa_rx_cl_set_merge ( struct aa_rx_cl_set *  into,
const struct aa_rx_cl_set *  from 
)

Fill set `into' with all elements in set `from'.

This is a union operation, with the result stored in `into'.