Brief Index      Full Index      Events Index      I.M. Reference

Compute_Points_Inside_Shell


Functions

void Compute_Points_Inside_Shell (int test_point_count, const HC_POINT *test_points, const HC_POINT *test_points_vectors, int point_count, const HC_POINT *points, int face_list_length, const int *face_list, const char *options, int *results)

Function Documentation

void Compute_Points_Inside_Shell ( int  test_point_count,
const HC_POINT *  test_points,
const HC_POINT *  test_points_vectors,
int  point_count,
const HC_POINT *  points,
int  face_list_length,
const int *  face_list,
const char *  options,
int *  results 
)

Tests whether a given set of points reside within, on, or outside the volume defined by a shell.

Parameters:
test_point_count - Number of points in the point cloud.
test_points - Array of x-y-z triplets defining the points to be tested.
test_points_vectors - Array of x-y-z triplets, one for each test point. These are the surface normals of the parametric surface that the points belong to (if applicable). If not applicable, pass null.
point_count - Number of points in the shell that may enclose the points defined in test_points
points - Vector of x-y-z triplets for the coordinates of the vertices to be used to build the shell. (A simple N x 3 array may also be used). Passed by reference always.
face_list_length - Size of the array of integers which define the faces in face_list.
face_list - Encoded description of how to connect the points to build the faces of the shell (see Insert_Shell() ).
options - A quoted string or a string variable containing a list of desired options. Passed by reference always.
results - Array of size test_point_count that specifies whether the point contained at that index within test_points is inside, on, or outside the given shell. Passed by reference. Returned to user.

DETAILS

Compute_Points_Inside_Shell can be used to determine whether the points within a point cloud are inside, on, or outside the volume defined by a Shell. The results array returned to the user is a series of integer values. If the value is -1 then the point at that given index within the point cloud is inside, if -2 then the point is outside, and if >=0 then that point is on the surface of the shell within the supplied tolerance with the actual number representing the closest face.

The supported options are:

  • [no] tolerance [= xxx]
The distance from shell (in object space) within which a point will still be regarded as "on" the shell. The default is "no tolerance".

  • [no] identify face
If set the closest face to a given point will be returned in the "results" array. The default is "no identify face".

  • [no] vertex vector
Indicates whether the array of vectors has been supplied. This is for the benefit of calls from languages that cannot pass null. Has the same effect as assigning the test_vector value to null. The default is "vertex vector" (but will be ignored if test_points_vectors is null).

NOTES

This function is designed for Shells that define a closed volumetric region. If used on a non-closed region, it may return incorrect in/out results (i.e. -1 where it ought to be -2 and vice versa), though it should still correctly identify the "on" case, with correct id's if the "identify face" option is active.

Models that use non-planar faces may cause this function to generate incorrect results.

See also:
Compute_Point_On_Shell, Compute_Point_Inside_Shell, Compute_Points_Inside_Shell

Brief Index      Full Index      Events Index      I.M. Reference