All Frameworks  Class Hierarchy  This Framework  Indexes

SPAintr Global Function api_point_in_body


outcome api_point_in_body(SPAposition const& test_point,
BODY* target_body,
point_containment& pc,
logical use_boxes= TRUE,
AcisOptions* ao= NULL)
Determines whether the given point lies inside,outside,or on the boundary of a given body.

Role: This API tests the point (given in global body space) against the body, returning a point_containment value of point_inside, point_outside, point_boundary, or point_unknown.

A call to this API will cause boxes to be computed, causing a model change and the generation of a bulletin board.

If the logical use_boxes is TRUE, bounding boxes will be considered increasing performance when the body is not a void. If there is a chance the body is a void, set to flag to FALSE so classification is correct.

To make the process Read-only, call api_note_state before the call to api_point_in_body. Afterwards, to roll the modeler back to its state prior to api_point_in_body perform:
 DELTA_STATE *ds = NULL
 api_note_state(ds);
 api_change_state(ds);
 api_delete_ds(ds);
Errors: Pointer to body is NULL or not to a BODY.

Effect: Changes model

Journal: Available

Parameters:
test_point
point to test.
target_body
body of interest.
pc
inside, outside, boundary, unknown returned.
use_boxes
Use bounding boxes.
ao
ACIS options.

This object is included in the file: intrapi.hxx

Copyright (c) 1989-2007 by Spatial Corp. All rights reserved.