Functions | |
int | Compute_Selection_By_Ray (const char *action, const char *start_seg, const HC_POINT *start_point, const HC_VECTOR *direction) |
Forces a selection event between a supplied ray and all polyhedron-based objects within a specified portion of a segment tree. More... | |
int | DCompute_Selection_By_Ray (const char *action, const char *start_seg, const HC_DPOINT *start_point, const HC_DVECTOR *direction) |
Similar to Compute_Selection_By_Ray(), but operates on double-precision data. More... | |
Detailed Description
Function Documentation
◆ Compute_Selection_By_Ray()
int Compute_Selection_By_Ray | ( | const char * | action, |
const char * | start_seg, | ||
const HC_POINT * | start_point, | ||
const HC_VECTOR * | direction | ||
) |
Forces a selection event between a supplied ray and all polyhedron-based objects within a specified portion of a segment tree.
- Parameters
-
action - One of "v", "^", "*", or "O". Action is compared against the Selectability attribute settings as testing proceeds. See Set_Selectability() for a detailed explanation. start_seg - A segment somewhere in the tree at which to begin testing. start_point - Point defining the base of the ray direction - Point defining the direction of the ray
- Returns
- count
DETAILS
The selection ray is defined by start_point and direction. This function is to be used in a similar fashion to the other Compute_Selection routines.
NOTES
This calculation is done in the object space of the start segment (i.e. world space but without considering any of the modelling matrices that come above the start segment).
When doing a sequence of many successive calls to this routine with different rays but a static environment (i.e. no changes to the geometry), performance can be significantly improved with Begin_Shell_Selection() before the first computation and End_Shell_Selection() after the last.
RESTRICTIONS
Since this is not a screen space operation, the "pick point" as returned by Show_Selection_Element() is not valid
(it will always be set to <-1,-1,-1>). The "world space" point returned by that routine, however, will actually be the object-space x,y,z intersection point of the ray with the closest face.
Show_Selection_Element() does not currently return the index if the intersected face.
There is a maximum of one selection per geometry intersected by the ray. As such, it is not currently possible to use this routine to get all of the intersection points within a single piece of geometry – only the first.
Only geometries which are stored internally as polyhedrons can be selected with this routine. Geometries which are represented by polyhedrons include shells, meshes, polycylinders, cylinders, spheres and NURBS surfaces. Polygons, circles and ellipses are not represented internally as polyhedrons and consequently are not selectable by this routine.
◆ DCompute_Selection_By_Ray()
int DCompute_Selection_By_Ray | ( | const char * | action, |
const char * | start_seg, | ||
const HC_DPOINT * | start_point, | ||
const HC_DVECTOR * | direction | ||
) |
Similar to Compute_Selection_By_Ray(), but operates on double-precision data.
- Parameters
-
action - One of "v", "^", "*", or "O". Action is compared against the Selectability attribute settings as testing proceeds. See Set_Selectability() for a detailed explanation. start_seg - A segment somewhere in the tree at which to begin testing. start_point - Point defining the base of the ray direction - Point defining the direction of the ray
- Returns
- count