Creates a degenerate
Plane
withpoint
==normal
==origin
, anddistance
== 0.
Planes
constructed using this constructor will probably be set using the assignment operator orPath::get_plane()
immediately, or very soon after being declared. See Planes Reference; Operators, and Paths Reference; Querying.
If p is not equal to n, this constructor creates a
Plane
and setspoint
to p.normal
is set to n, and made a unit vector.distance
is calculated according to the following formula: Let n stand fornormal
, p forpoint
, and d fordistance
: d = -p \dot n. If d = 0,origin
lies in thePlane
. If d > 0,origin
lies on the side of thePlane
thatnormal
points to, considered to be “outside”. If d<0,origin
lies on the side of thePlane
thatnormal
does not point to, considered to be “inside”.However, if p == n,
point
andnormal
are both set toINVALID_POINT
, anddistance
is set toINVALID_REAL
, i.e.,*this
will be equal toINVALID_PLANE
(see Planes Reference; Global Constants).Point P(1, 1, 1); Point N(0, 1); N.rotate(-35, 30, 20); N.show("N:"); -| N: (-0.549659, 0.671664, 0.496732) Plane q(P, N); cout << q.distance; -| -0.618736
![]()
Fig. 105.