pwu::Plane

Utility functions for planes, which are represented as a list of four real values (the A, B, C and D coeffecients).

Note

This interface does not create database planes.  Use the pw::Plane interface to create a database plane.

Summary
pwu::PlaneUtility functions for planes, which are represented as a list of four real values (the A, B, C and D coeffecients).
Static Actions
setReturn a plane with the given settings
equationGet the plane coefficients in a list
aGet the A plane coefficient
bGet the B plane coefficient
cGet the C plane coefficient
dGet the D plane coefficient
normalGet the normal vector of a plane
constantGet the plane constant (D coefficient)
inHalfSpaceCheck if the vector point is in the positive half space of the given plane
distanceGet the distance from a vector point to the given plane
lineGet the intersection of a line and a given plane
segmentGet the intersection of a segment and a given plane
projectGet the closest point projection of a point onto a given plane

Static Actions

set

pwu::Plane set < coeffs | normal origin | p1 p2 p3 | A B C D >

Return a plane with the given settings

Parameters

coeffsa list of A, B, C and D coefficients
normalthe normal of the plane
originthe origin of the plane
p1a point that the plane passes through
p2a point that the plane passes through
p3a point that the plane passes through
Athe A plane coefficient
Bthe B plane coefficient
Cthe C plane coefficient
Dthe D plane coefficient

Returns

a plane

equation

pwu::Plane equation plane

Get the plane coefficients in a list

Parameters

planethe plane

Returns

a list of the A, B, C and D plane coeffiecients

a

pwu::Plane a plane

Get the A plane coefficient

Parameters

planethe plane

Returns

the A coefficient

b

pwu::Plane b plane

Get the B plane coefficient

Parameters

planethe plane

Returns

the B coefficient

c

pwu::Plane c plane

Get the C plane coefficient

Parameters

planethe plane

Returns

the C coefficient

d

pwu::Plane d plane

Get the D plane coefficient

Parameters

planethe plane

Returns

the D coefficient

normal

pwu::Plane normal plane

Get the normal vector of a plane

Parameters

planethe plane

Returns

the normal vector

constant

pwu::Plane constant plane

Get the plane constant (D coefficient)

Parameters

planethe plane

Returns

the plane constant

inHalfSpace

pwu::Plane inHalfSpace plane vec

Check if the vector point is in the positive half space of the given plane

Parameters

planethe plane
vecthe vector

Returns

true if in the positive half space of the plane

distance

pwu::Plane distance plane vec

Get the distance from a vector point to the given plane

Parameters

planethe plane
vecthe vector

Returns

the distance

line

pwu::Plane line ?-intersect intersectVar? plane origin dir

Get the intersection of a line and a given plane

Parameters

planethe plane
originthe origin of the line
dirthe direction of the line
intersetVara variable name to receive a boolean value if the intersection actually occured

Returns

the intersection point, or zero vector if failure

segment

pwu::Plane segment ?-intersect intersectVar? plane pt1 pt2

Get the intersection of a segment and a given plane

Parameters

planethe plane
pt1the start of the segment
pt2the end of the segment
intersetVara variable name to receive a boolean value if the intersection actually occured

Returns

the intersection point

project

pwu::Plane project point

Get the closest point projection of a point onto a given plane

Parameters

planethe plane
pointthe point to project

Returns

the projected point

pwu::Plane set < coeffs | normal origin | p1 p2 p3 | A B C D >
Return a plane with the given settings
pwu::Plane equation plane
Get the plane coefficients in a list
pwu::Plane a plane
Get the A plane coefficient
pwu::Plane b plane
Get the B plane coefficient
pwu::Plane c plane
Get the C plane coefficient
pwu::Plane d plane
Get the D plane coefficient
pwu::Plane normal plane
Get the normal vector of a plane
pwu::Plane constant plane
Get the plane constant (D coefficient)
pwu::Plane inHalfSpace plane vec
Check if the vector point is in the positive half space of the given plane
pwu::Plane distance plane vec
Get the distance from a vector point to the given plane
pwu::Plane line ?-intersect intersectVar? plane origin dir
Get the intersection of a line and a given plane
pwu::Plane segment ?-intersect intersectVar? plane pt1 pt2
Get the intersection of a segment and a given plane
pwu::Plane project point
Get the closest point projection of a point onto a given plane
Close