libmove3d
3.13.0
|
This files contains API functions of KCD. More...
#include "Util-pkg.h"
#include "Collision-pkg.h"
Classes | |
struct | kcd_scene_data |
Typedefs | |
typedef struct kcd_scene_data | kcd_scene_data |
typedef struct kcd_scene_data * | kcd_scene_data_p |
Functions | |
void | kcd_mo_moved (int kcd_obj_id, int is_moved) |
keeps track of status of a movable object since the latest call to KCD collision test | |
int | kcd_get_is_moved (int mo_id) |
returns whether or not the movable object must be tested for collision again (whether or not it moved more recently than the latest collision test) | |
int | kcd_is_initialized () |
returns the value of kcd_initialized | |
int | kcd_get_nof_mos () |
Get the number of movable objects known by KCD. | |
int | kcd_get_nof_grps () |
Get the number of groups. | |
int | kcd_get_nof_sos () |
Get the number of static objects. | |
void | deconnect_kcd_data () |
Cleans up KCD and resets the data. | |
void | kcd_remember_scene (int kcd_scene_id) |
Select a scene with the kcd_scene_id. | |
void | kcd_beg_scene (int tot_nof_prims, int nof_st_obj, int nof_mo_grps, int nof_mov_obj) |
Initializes some internal KCD data structures. | |
int | kcd_end_scene () |
builds remaining internal hierarchies necessary for KCD | |
void | kcd_clean_up () |
free-s all memory of the internal data structures used by KCD | |
void | kcd_beg_obj (int can_move) |
adding an object | |
int | kcd_end_obj () |
creates OBB-tree on all single OBBs and on all roots of OBB-trees of the primitives and polyhedrons in the object | |
int | kcd_add_prim (void *primPt) |
creates OBB's on the primitives | |
int | kcd_def_mo_grp (int *arr_kcd_ids, int nof_mo_ids) |
makes group of several given movable objects | |
void | kcd_def_mo_no_grp (void) |
makes a group (-1) with movable object without groups | |
void | kcd_act_mo (int mo_id) |
the given movable object is considered by the collision test | |
void | kcd_deact_mo (int mo_id) |
the given movable object is ignored by the collision test | |
void | kcd_act_grp (int grp_id) |
the group of links of the given robot is considered by the collision test | |
void | kcd_deact_grp (int grp_id) |
the group of links of the given robot is ignored by the collision test | |
void | kcd_act_obst (int ext_obj_id) |
void | kcd_deact_obst (int ext_obj_id) |
int | kcd_obst_is_act (int ext_obj_id) |
void | kcd_act_mo_pair (kcd_col_handle *handlePt, int kcd_id1, int kcd_id2) |
Activate the test of collision and the distance computation between two movable objects. | |
void | kcd_deact_mo_pair (kcd_col_handle *handlePt, int kcd_id1, int kcd_id2) |
Deactivate the test of collision and the distance computation between two movable objects. | |
void | kcd_act_col_mo_pair (kcd_col_handle *handlePt, int kcd_id1, int kcd_id2) |
Activate the test of collision between two movable objects. | |
void | kcd_deact_col_mo_pair (kcd_col_handle *handlePt, int kcd_id1, int kcd_id2) |
Deactivate the test of collision between two movable objects. | |
void | kcd_act_dist_mo_pair (kcd_col_handle *handlePt, int kcd_id1, int kcd_id2) |
Activate the distance computation between two movable objects. | |
void | kcd_deact_dist_mo_pair (kcd_col_handle *handlePt, int kcd_id1, int kcd_id2) |
Deactivate the distance computation between two movable objects. | |
void | kcd_act_mo_env (kcd_col_handle *handlePt, int kcd_id) |
Activate the test of collision and the distance computation between a movable object and the environment.. | |
void | kcd_deact_mo_env (kcd_col_handle *handlePt, int kcd_id) |
Deactivate the test of collision and the distance computation between a movable object and the environment.. | |
void | kcd_act_col_mo_env (kcd_col_handle *handlePt, int kcd_id) |
Activate the test of collision between a movable object and the environment.. | |
void | kcd_deact_col_mo_env (kcd_col_handle *handlePt, int kcd_id) |
Deactivate the test of collision between a movable object and the environment.. | |
void | kcd_act_dist_mo_env (kcd_col_handle *handlePt, int kcd_id) |
Activate the distance computation between a movable object and the environment.. | |
void | kcd_deact_dist_mo_env (kcd_col_handle *handlePt, int kcd_id) |
Deactivate the distance computation between a movable object and the environment.. | |
void | kcd_act_grp_pair (kcd_col_handle *handlePt, int grp_id1, int grp_id2) |
Activate the test of collision between two groups of movable object. | |
void | kcd_deact_grp_pair (kcd_col_handle *handlePt, int grp_id1, int grp_id2) |
Deactivate the test of collision between two groups of movable object. | |
void | kcd_act_grp_env (kcd_col_handle *handlePt, int grp_id) |
Activate the test of collision between a groups of movable object and the environment. | |
void | kcd_deact_grp_env (kcd_col_handle *handlePt, int grp_id) |
Deactivate the test of collision between a group of movable object and the environment. | |
void | kcd_deactivate_all_mo (kcd_col_handle *handlePt) |
Deactivate all the test of collision. | |
int | kcd_mo_is_act (int mo_id) |
Returns if given movable object is activated. | |
int | kcd_grp_is_act (int grp_id) |
Returns if given group of movable object is activated. | |
int | kcd_mo_belongs_to_group (int mobj_id) |
see id a mo belongs to a group | |
int | kcd_mo_pair_is_act (kcd_col_handle *handlePt, int kcd_id1, int kcd_id2) |
Returns if there is a test of collision or a distance computation between two movable objects. | |
int | kcd_col_mo_pair_is_act (kcd_col_handle *handlePt, int kcd_id1, int kcd_id2) |
Returns if there is a test of collision between two movable objects. | |
int | kcd_dist_mo_pair_is_act (kcd_col_handle *handlePt, int kcd_id1, int kcd_id2) |
Returns if there is a distance computation between two movable objects. | |
int | kcd_mo_env_is_act (kcd_col_handle *handlePt, int kcd_id) |
Returns if there is a test of collision or a distance computation between a movable object and the environment.. | |
int | kcd_col_mo_env_is_act (kcd_col_handle *handlePt, int kcd_id) |
Returns if there is a test of collision between a movable object and the environment.. | |
int | kcd_dist_mo_env_is_act (kcd_col_handle *handlePt, int kcd_id) |
Returns if there is a distance computation between a movable object and the environment.. | |
int | kcd_grp_pair_is_act (kcd_col_handle *handlePt, int grp_id1, int grp_id2) |
Returns if there is a test of collision between two groups of movable objects. | |
int | kcd_grp_env_is_act (kcd_col_handle *handlePt, int grp_id) |
Returns if there is a test of collision between a group of movable objects and the environment. | |
kcd_col_handle * | kcd_create_handle (void) |
Create and initialize a kcd collision handle. | |
kcd_col_handle * | kcd_copy_handle (kcd_col_handle *handlePt) |
Copy a kcd collision handle to a new structure. | |
void | kcd_copy_handle_into (kcd_col_handle *src_handlePt, kcd_col_handle *dest_handlePt) |
Copy a kcd collision handle into an other structure. | |
void | kcd_add_handle_into (kcd_col_handle *src_handlePt, kcd_col_handle *dest_handlePt) |
Merge two kcd collision handle (sum of collision tests) | |
void | kcd_sub_handle_into (kcd_col_handle *src_handlePt, kcd_col_handle *dest_handlePt) |
Merge two kcd collision handle (subtraction of collision tests) | |
void | kcd_deactivate_all_handle (kcd_col_handle *handlePt) |
Deactive all collision test between movable object and the environment. | |
void | kcd_destroy_handle (kcd_col_handle *handlePt) |
Release the memory of the kcd collisions handle. | |
kcd_col_handle * | kcd_get_cur_handle (void) |
Get the current collision handle. | |
void | kcd_set_cur_handle (kcd_col_handle *handlePt) |
Put a new collision handle as the current collision handle. | |
void | kcd_set_aabb_on_mo (int kcd_ext_o) |
user calls this function when he/she wants KCD to compute the AABB around (moved) movable object given by kcd_ext_o | |
int | kcd_robot_collides_itself (int robot_number, int with_report, double *min_dist, int *near_obs) |
Group of movable objects tests for autocollision. | |
int | kcd_robot_collides_robot (int robot_number1, int robot_number2, int with_report) |
returns TRUE if given groups of movable objects collide, | |
int | kcd_robot_vs_robot (int robot_number1, int robot_number2, int with_report, double *min_dist_estimate, int *nearest_obstacle) |
int | kcd_robot_collides (int robot_id, int with_report, double *min_dist_estimate, int *nearest_obstacle) |
looks only for collision between given robot and static objects | |
int | kcd_collision_exists (int with_report, double *min_dist_estimate) |
looks for the existance of collision for any robot or movable object. This is a general function that tests all possible collisions. | |
int | kcd_mo_collides (int mobj_id, int with_report, double *min_dist_estimate, int *nearest_obstacle) |
looks only for collision between given mo and static objects | |
int | kcd_robot_collides_mo (int robot_id, int mo_id) |
returns TRUE if given robot collides with given movable object | |
int | kcd_robot_vs_mo (int robot_id, int mo_id, int with_report, double *min_dist_estimate, int *nearest_obstacle) |
tests a group of movable objects against a movable object | |
int | kcd_mo_collides_mo (int mo1, int mo2) |
tests two movable objects for collision (NO_REPORT), returns TRUE if two movable objects collide, FALSE otherwise | |
int | kcd_mo_vs_mo (int mo1, int mo2, int with_report, double *min_dist_estimate, int *nearest_obstacle) |
tests two movable objects for collision | |
void | kcd_set_tolerance (double epsilon) |
sets tolerance value to epsilon | |
void | kcd_ignore_tolerance () |
resets tolerance value to zero (does the same as kcd_set_tolerance(0.0)) | |
void | kcd_set_relative_error (double value) |
sets the value of kcd_epsilon in kcd, only usefull for exact distances | |
double | kcd_get_relative_error () |
gets the value of kcd_epsilon in kcd | |
void | kcd_init_min_vol_of_obj_detail (double one_dim) |
sets smallest undividable volume for a bounding box before initialization of OBB(-tree)s and AABB hierarchy (to be called before definition of an environment) | |
void | kcd_set_min_vol_of_obj_detail (double one_dim) |
sets smallest undividable volume for a bounding box (must be larger than the initial value), stores original value used at initalization, uses the smallest undividable volume in collision test functions | |
void | kcd_ignore_min_vol_of_obj_detail () |
resets smallest undividable volume for a bounding box to original value used at initialization by the user (or to 0.0 by default, when the user didn't specify at initialization) | |
int | kcd_report_get_cor_mo (int kcd_obj_id) |
get for a given kcd_obj_id the corresponding mo_id or so_id | |
int | kcd_robot_collides_something (int i, int with_report, double *min_dist_estimate) |
int | kcd_robot_collides_something_except_specified_robot (int i, int deviceToIgnore, int with_report, double *min_dist_estimate) |
int | kcd_nof_obst_to_add () |
void | kcd_addObst_beg_scene (int current_scene, int tot_nof_prims, int nof_st_obj) |
void | kcd_addObst_end_scene () |
void | kcd_addObst_beg_obj () |
int | kcd_addObst_add_prim (void *primPt) |
int | kcd_addObst_end_obj () |
int | kcd_get_nof_objects () |
Variables | |
kcd_scene_data_p | kcd_scene_data_arr = NULL |
This files contains API functions of KCD.
void deconnect_kcd_data | ( | ) |
Cleans up KCD and resets the data.
void kcd_act_col_mo_env | ( | kcd_col_handle * | handlePt, |
int | kcd_id | ||
) |
Activate the test of collision between a movable object and the environment..
handlePt,: | The kcd collision handle. |
kcd_id,: | The index of the movable object. |
void kcd_act_col_mo_pair | ( | kcd_col_handle * | handlePt, |
int | kcd_id1, | ||
int | kcd_id2 | ||
) |
Activate the test of collision between two movable objects.
handlePt,: | The kcd collision handle. |
kcd_id1,: | The index of the first movable object. |
kcd_id2,: | The index of the second movable object. |
void kcd_act_dist_mo_env | ( | kcd_col_handle * | handlePt, |
int | kcd_id | ||
) |
Activate the distance computation between a movable object and the environment..
handlePt,: | The kcd collision handle. |
kcd_id,: | The index of the movable object. |
void kcd_act_dist_mo_pair | ( | kcd_col_handle * | handlePt, |
int | kcd_id1, | ||
int | kcd_id2 | ||
) |
Activate the distance computation between two movable objects.
handlePt,: | The kcd collision handle. |
kcd_id1,: | The index of the first movable object. |
kcd_id2,: | The index of the second movable object. |
void kcd_act_grp | ( | int | grp_id | ) |
the group of links of the given robot is considered by the collision test
void kcd_act_grp_env | ( | kcd_col_handle * | handlePt, |
int | grp_id | ||
) |
Activate the test of collision between a groups of movable object and the environment.
handlePt,: | The kcd collision handle. |
grp_id,: | The index of the movable objects group. |
void kcd_act_grp_pair | ( | kcd_col_handle * | handlePt, |
int | grp_id1, | ||
int | grp_id2 | ||
) |
Activate the test of collision between two groups of movable object.
handlePt,: | The kcd collision handle. |
grp_id1,: | The index of the first movable objects group. |
grp_id2,: | The index of the second movable objects group. |
void kcd_act_mo_env | ( | kcd_col_handle * | handlePt, |
int | kcd_id | ||
) |
Activate the test of collision and the distance computation between a movable object and the environment..
handlePt,: | The kcd collision handle. |
kcd_id,: | The index of the movable object. |
void kcd_act_mo_pair | ( | kcd_col_handle * | handlePt, |
int | kcd_id1, | ||
int | kcd_id2 | ||
) |
Activate the test of collision and the distance computation between two movable objects.
handlePt,: | The kcd collision handle. |
kcd_id1,: | The index of the first movable object. |
kcd_id2,: | The index of the second movable object. |
void kcd_add_handle_into | ( | kcd_col_handle * | src_handlePt, |
kcd_col_handle * | dest_handlePt | ||
) |
Merge two kcd collision handle (sum of collision tests)
Note: It is an "or" opperation between all flags.
src_handlePt,: | The source kcd collision handle. |
dest_handlePt,: | The kcd collision handle that must store the sum. |
int kcd_add_prim | ( | void * | primPt | ) |
creates OBB's on the primitives
void kcd_beg_obj | ( | int | can_move | ) |
adding an object
can_move | if can_move is FALSE, the object will be considered as a static obstacle. |
void kcd_beg_scene | ( | int | tot_nof_prims, |
int | nof_st_obj, | ||
int | nof_mo_grps, | ||
int | nof_mov_obj | ||
) |
Initializes some internal KCD data structures.
tot_nof_prims | the number of primitives in the scene (polyhedrons + Solids) |
nof_st_obj | the number of static objects in data structure of the user |
nof_mo_grps | the number of groups of movable objects the user will define |
nof_mov_obj | the number of movable objects in data structure of the user |
int kcd_col_mo_env_is_act | ( | kcd_col_handle * | handlePt, |
int | kcd_id | ||
) |
Returns if there is a test of collision between a movable object and the environment..
handlePt,: | The kcd collision handle. |
kcd_id,: | The index of the movable object. |
int kcd_col_mo_pair_is_act | ( | kcd_col_handle * | handlePt, |
int | kcd_id1, | ||
int | kcd_id2 | ||
) |
Returns if there is a test of collision between two movable objects.
handlePt,: | The kcd collision handle. |
kcd_id1,: | The index of the first movable object. |
kcd_id2,: | The index of the second movable object. |
int kcd_collision_exists | ( | int | with_report, |
double * | min_dist_estimate | ||
) |
looks for the existance of collision for any robot or movable object. This is a general function that tests all possible collisions.
int kcd_collision_exists(int with_report, double *min_dist_estimate)
with_report | This parameter determines how the collision checker tests |
kcd_col_handle* kcd_copy_handle | ( | kcd_col_handle * | handlePt | ) |
Copy a kcd collision handle to a new structure.
handlePt,: | The kcd collision handle that must be copied. |
void kcd_copy_handle_into | ( | kcd_col_handle * | src_handlePt, |
kcd_col_handle * | dest_handlePt | ||
) |
Copy a kcd collision handle into an other structure.
src_handlePt,: | The kcd collision handle that must be copied. |
dest_handlePt,: | The kcd collision handle that must store the copy. |
kcd_col_handle* kcd_create_handle | ( | void | ) |
Create and initialize a kcd collision handle.
Note: this function deactivate all tesst of collisions.
nof_mos,: | The number of movable object. |
void kcd_deact_col_mo_env | ( | kcd_col_handle * | handlePt, |
int | kcd_id | ||
) |
Deactivate the test of collision between a movable object and the environment..
handlePt,: | The kcd collision handle. |
kcd_id,: | The index of the movable object. |
void kcd_deact_col_mo_pair | ( | kcd_col_handle * | handlePt, |
int | kcd_id1, | ||
int | kcd_id2 | ||
) |
Deactivate the test of collision between two movable objects.
handlePt,: | The kcd collision handle. |
kcd_id1,: | The index of the first movable object. |
kcd_id2,: | The index of the second movable object. |
void kcd_deact_dist_mo_env | ( | kcd_col_handle * | handlePt, |
int | kcd_id | ||
) |
Deactivate the distance computation between a movable object and the environment..
handlePt,: | The kcd collision handle. |
kcd_id,: | The index of the movable object. |
void kcd_deact_dist_mo_pair | ( | kcd_col_handle * | handlePt, |
int | kcd_id1, | ||
int | kcd_id2 | ||
) |
Deactivate the distance computation between two movable objects.
handlePt,: | The kcd collision handle. |
kcd_id1,: | The index of the first movable object. |
kcd_id2,: | The index of the second movable object. |
void kcd_deact_grp | ( | int | grp_id | ) |
the group of links of the given robot is ignored by the collision test
void kcd_deact_grp_env | ( | kcd_col_handle * | handlePt, |
int | grp_id | ||
) |
Deactivate the test of collision between a group of movable object and the environment.
handlePt,: | The kcd collision handle. |
grp_id,: | The index of the movable objects group. |
void kcd_deact_grp_pair | ( | kcd_col_handle * | handlePt, |
int | grp_id1, | ||
int | grp_id2 | ||
) |
Deactivate the test of collision between two groups of movable object.
handlePt,: | The kcd collision handle. |
grp_id1,: | The index of the first movable objects group. |
grp_id2,: | The index of the second movable objects group. |
void kcd_deact_mo_env | ( | kcd_col_handle * | handlePt, |
int | kcd_id | ||
) |
Deactivate the test of collision and the distance computation between a movable object and the environment..
handlePt,: | The kcd collision handle. |
kcd_id,: | The index of the movable object. |
void kcd_deact_mo_pair | ( | kcd_col_handle * | handlePt, |
int | kcd_id1, | ||
int | kcd_id2 | ||
) |
Deactivate the test of collision and the distance computation between two movable objects.
handlePt,: | The kcd collision handle. |
kcd_id1,: | The index of the first movable object. |
kcd_id2,: | The index of the second movable object. |
void kcd_deactivate_all_handle | ( | kcd_col_handle * | handlePt | ) |
Deactive all collision test between movable object and the environment.
handlePt,: | The kcd collision handle. |
void kcd_deactivate_all_mo | ( | kcd_col_handle * | handlePt | ) |
Deactivate all the test of collision.
handlePt,: | The kcd collision handle. |
int kcd_def_mo_grp | ( | int * | arr_kcd_ids, |
int | nof_mo_ids | ||
) |
makes group of several given movable objects
arr_mo_ids | an array of kcd-ids of objects |
nof_mo_ids | number of entries in array arr_mo_ids |
void kcd_destroy_handle | ( | kcd_col_handle * | handlePt | ) |
Release the memory of the kcd collisions handle.
handlePt,: | The kcd collision handle. |
int kcd_dist_mo_env_is_act | ( | kcd_col_handle * | handlePt, |
int | kcd_id | ||
) |
Returns if there is a distance computation between a movable object and the environment..
handlePt,: | The kcd collision handle. |
kcd_id,: | The index of the movable object. |
int kcd_dist_mo_pair_is_act | ( | kcd_col_handle * | handlePt, |
int | kcd_id1, | ||
int | kcd_id2 | ||
) |
Returns if there is a distance computation between two movable objects.
handlePt,: | The kcd collision handle. |
kcd_id1,: | The index of the first movable object. |
kcd_id2,: | The index of the second movable object. |
int kcd_end_obj | ( | ) |
creates OBB-tree on all single OBBs and on all roots of OBB-trees of the primitives and polyhedrons in the object
int kcd_end_scene | ( | ) |
builds remaining internal hierarchies necessary for KCD
modifies remaining internal hierarchies necessary for KCD
kcd_col_handle* kcd_get_cur_handle | ( | void | ) |
Get the current collision handle.
int kcd_get_is_moved | ( | int | mo_id | ) |
returns whether or not the movable object must be tested for collision again (whether or not it moved more recently than the latest collision test)
mo_id | mo_id-th movable (!) object |
int kcd_get_nof_mos | ( | ) |
Get the number of movable objects known by KCD.
int kcd_grp_env_is_act | ( | kcd_col_handle * | handlePt, |
int | grp_id | ||
) |
Returns if there is a test of collision between a group of movable objects and the environment.
handlePt,: | The kcd collision handle. |
grp_id,: | The index of the movable objects group. |
int kcd_grp_is_act | ( | int | grp_id | ) |
Returns if given group of movable object is activated.
int kcd_grp_pair_is_act | ( | kcd_col_handle * | handlePt, |
int | grp_id1, | ||
int | grp_id2 | ||
) |
Returns if there is a test of collision between two groups of movable objects.
handlePt,: | The kcd collision handle. |
grp_id1,: | The index of the first movable objects group. |
grp_id2,: | The index of the second movable objects group. |
kcd_init_min_vol_of_obj_detail | ( | double | one_dim | ) |
sets smallest undividable volume for a bounding box before initialization of OBB(-tree)s and AABB hierarchy (to be called before definition of an environment)
one_dim | the smalllest undividable volume is a cube or a square with sizes of length one_dim |
int kcd_mo_belongs_to_group | ( | int | mobj_id | ) |
see id a mo belongs to a group
mobj_id | id of the movable object |
int kcd_mo_collides | ( | int | mobj_id, |
int | with_report, | ||
double * | min_dist_estimate, | ||
int * | nearest_obstacle | ||
) |
looks only for collision between given mo and static objects
int kcd_mo_collides_mo | ( | int | mov_obj_id1, |
int | mov_obj_id2 | ||
) |
tests two movable objects for collision (NO_REPORT), returns TRUE if two movable objects collide, FALSE otherwise
Does not verify for definition of collision pair between given movable objects, it just calls kcd_mo_vs_mo with with_report set to NO_REPORT
int kcd_mo_env_is_act | ( | kcd_col_handle * | handlePt, |
int | kcd_id | ||
) |
Returns if there is a test of collision or a distance computation between a movable object and the environment..
handlePt,: | The kcd collision handle. |
kcd_id,: | The index of the movable object. |
int kcd_mo_is_act | ( | int | mo_id | ) |
Returns if given movable object is activated.
void kcd_mo_moved | ( | int | kcd_obj_id, |
int | is_moved | ||
) |
keeps track of status of a movable object since the latest call to KCD collision test
kcd_obj_id | kcd_obj_id-th object (static or movable) given by user in the current scene |
is_moved | TRUE if object moved since last call to a collision test ( FALSE if not ) |
int kcd_mo_pair_is_act | ( | kcd_col_handle * | handlePt, |
int | kcd_id1, | ||
int | kcd_id2 | ||
) |
Returns if there is a test of collision or a distance computation between two movable objects.
handlePt,: | The kcd collision handle. |
kcd_id1,: | The index of the first movable object. |
kcd_id2,: | The index of the second movable object. |
int kcd_mo_vs_mo | ( | int | mo1, |
int | mo2, | ||
int | with_report, | ||
double * | min_dist_estimate, | ||
int * | nearest_obstacle | ||
) |
tests two movable objects for collision
This function has a different functionality depending on the with_report parameter (see also kcd_api.h)
mo1 | id of the first movable object |
mo1 | id of the second movable object |
with_report | will decide how the mo's are tested |
*min_dist_estimate | depending on with_report this returns nothing, an exact or estimated distance |
*nearest_obstacle |
void kcd_remember_scene | ( | int | kcd_scene_id | ) |
Select a scene with the kcd_scene_id.
kcd_scene_id | when the user defined several scenes, this function selects the data created by KCD for the scene for which kcd_end_scene() has returned the kcd_env_id identifier |
int kcd_report_get_cor_mo | ( | int | kcd_obj_id | ) |
get for a given kcd_obj_id the corresponding mo_id or so_id
kcd_obj_id | is the id of the object in the list of all the KCD objects |
int kcd_robot_collides | ( | int | robot_id, |
int | with_report, | ||
double * | min_dist_estimate, | ||
int * | nearest_obstacle | ||
) |
looks only for collision between given robot and static objects
with_report | see documentation |
int kcd_robot_collides_itself | ( | int | robot_number, |
int | with_report, | ||
double * | min_dist, | ||
int * | near_obs | ||
) |
Group of movable objects tests for autocollision.
int kcd_robot_collides_mo | ( | int | robot_id, |
int | mo_id | ||
) |
returns TRUE if given robot collides with given movable object
int kcd_robot_collides_robot | ( | int | robot_number1, |
int | robot_number2, | ||
int | with_report | ||
) |
returns TRUE if given groups of movable objects collide,
int kcd_robot_vs_mo | ( | int | robot_id, |
int | mo_id, | ||
int | with_report, | ||
double * | min_dist_estimate, | ||
int * | nearest_obstacle | ||
) |
tests a group of movable objects against a movable object
This function has a different functionality depending on the with_report parameter (see also kcd_api.h)
robot_id | the group_id of the movable objects |
mo_id | id of the other movable object |
with_report | will decide how the mo's are tested |
*min_dist_estimate | depending on with_report this returns nothing, an exact or estimated distance |
*nearest_obstacle |
void kcd_set_cur_handle | ( | kcd_col_handle * | handlePt | ) |
Put a new collision handle as the current collision handle.
handlePt,: | The kcd collision handle. |
void kcd_set_min_vol_of_obj_detail | ( | double | one_dim | ) |
sets smallest undividable volume for a bounding box (must be larger than the initial value), stores original value used at initalization, uses the smallest undividable volume in collision test functions
one_dim | the smalllest undividable volume is a cube or a square with sizes of length one_dim |
void kcd_set_relative_error | ( | double | value | ) |
sets the value of kcd_epsilon in kcd, only usefull for exact distances
kcd_set_relative_error(double epsilon)
epsilon | a value that has to be an percentage (0 <= epsilon < 100) |
void kcd_set_tolerance | ( | double | epsilon | ) |
sets tolerance value to epsilon
epsilon | the size of the security distance |
void kcd_sub_handle_into | ( | kcd_col_handle * | src_handlePt, |
kcd_col_handle * | dest_handlePt | ||
) |
Merge two kcd collision handle (subtraction of collision tests)
Note: It is an "dest and not src" opperation between all flags.
src_handlePt,: | The source kcd collision handle. |
dest_handlePt,: | The kcd collision handle that must store the sum. |