const
function: bool is_on_free_store (void)Returns
true
if memory for thePoint
has been dynamically allocated on the free store, i.e., if thePoint
has been created usingcreate_new<Point>()
. See Point Reference; Constructors and Setting Functions.
const
function: bool is_on_plane (const Plane& p)Returns
true
, if thePoint
lies on thePlane
p, otherwisefalse
.Planes are conceived of as having infinite extension, so while the
Point
C in [next figure] does not lie within theRectangle
r, it does lie on q, soC.is_on_plane(q)
returnstrue
.1Point P(1, 1, 1); Rectangle r(P, 4, 4, 20, 45, 35); Plane q = r.get_plane(); Point A(2, 0, 2); Point B(2, 1.64143, 2); Point C(0.355028, 2.2185, 6.48628); cout << A.is_on_plane(q); -| 0 cout << B.is_on_plane(q); -| 1 cout << "C.is_on_plane(q)"; -| 1
![]()
Fig. 80.
const
function: bool is_in_triangle (const Point& p0, const Point& p1, const Point& p2, [bool verbose = false
, [bool test_points = true
]])Returns
true
, if*this
lies within the triangle determined by the threePoint
arguments, otherwisefalse
.If the code calling
is_in_triangle()
has ensured that p_0, p_1, and p_2 determine a plane, i.e., that they are not colinear, and that*this
lies in that plane, thenfalse
can be passed tois_in_triangle()
as its test_points argument.If the verbose argument is
true
, information resulting from the execution of the function are printed to standard output or standard error.This function is needed for determining whether a line intersects with a polygon.
[1] It's unlikely that Points
will lie on a Plane
,
unless the user constructs the case specially.
In [next figure]
, the coordinates for B and C were found by using
Plane::intersection_point()
.
See Planes; Intersections.