Brief Index      Full Index      Events Index      I.M. Reference

Compute_Shell_Enclosure

Functions

void Compute_Shell_Enclosure (int point_count1, const HC_POINT *points1, int face_list_length1, const int *face_list1, int point_count2, const HC_POINT *points2, int face_list_length2, const int *face_list2, char *result)
 

Detailed Description

Function Documentation

void Compute_Shell_Enclosure ( int  point_count1,
const HC_POINT points1,
int  face_list_length1,
const int *  face_list1,
int  point_count2,
const HC_POINT points2,
int  face_list_length2,
const int *  face_list2,
char *  result 
)

Classifies the relationship between the first shell and the second: "in", "out", and "clash".

Parameters
point_count1- number of points in the test shell
points1- Vector of x-y-z triplets for the coordinates of the vertices to be used to build the shells. (A simple N x 3 array may also be used). Passed by reference always.
face_list_length1- total number of integers in face_list1
face_list1- Encoded description of how to connect the points in points1
point_count2- number of points in the enclosing shell
points2- Vector of x-y-z triplets for the coordinates of the vertices to be used to build the shells. (A simple N x 3 array may also be used). Passed by reference always.
face_list_length2- total number of integers in face_list2
face_list2- Encoded description of how to connect the points in points2
result- a buffer with which to receive the results

DETAILS

Upon completion, this function fills in the result string to indicate what relationship shell1 has with shell2. The three possibilities are "in", "out", and "clash".

This function could be replicated with a call to Compute_Intersect_Polyline() to discover the "clash" case, followed (if the polyline length is 0) by a call to Test_Point_Inside_Shell() to determine "in" or "out".

If the result is "out", shell 1 may or may not enclose shell 2. In other words, this function looks for enclosure by shell 2, but not of shell 2.

NOTES

This function assumes that both shells are contiguous, closed surfaces. Results are undefined if either of the shells is not a surface (has a disconnected face_list), not contiguous (e.g. 2 spheres represented as one) or not closed (e.g. a hemisphere). Additionally, the function assumes that all faces are planar. If this assumption is violated, the results are undefined.

RESTRICTIONS

It is invalid to call this function with point_count1 == 0, point_count2 == 0 or face_list_length2 == 0.

See Also
Compute_Selection_By_Shell, Begin_Shell_Selection, Insert_Shell

Brief Index      Full Index      Events Index      I.M. Reference