# 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:: Plane Utility functions for planes, which are represented as a list of four real values (the A, B, C and D coeffecients). Static Actions set Return a plane with the given settings equation Get the plane coefficients in a list a Get the A plane coefficient b Get the B plane coefficient c Get the C plane coefficient d Get the D plane coefficient normal Get the normal vector of a plane constant Get the plane constant (D coefficient) inHalfSpace Check if the vector point is in the positive half space of the given plane distance Get the distance from a vector point to the given plane line Get the intersection of a line and a given plane segment Get the intersection of a segment and a given plane project Get the closest point projection of a point onto a given plane

### set

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

Return a plane with the given settings

#### Parameters

 coeffs a list of A, B, C and D coefficients normal the normal of the plane origin the origin of the plane p1 a point that the plane passes through p2 a point that the plane passes through p3 a point that the plane passes through A the A plane coefficient B the B plane coefficient C the C plane coefficient D the D plane coefficient

a plane

### equation

 pwu::Plane equation plane

Get the plane coefficients in a list

#### Parameters

 plane the plane

#### Returns

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

### a

 pwu::Plane a plane

Get the A plane coefficient

#### Parameters

 plane the plane

#### Returns

the A coefficient

### b

 pwu::Plane b plane

Get the B plane coefficient

#### Parameters

 plane the plane

#### Returns

the B coefficient

### c

 pwu::Plane c plane

Get the C plane coefficient

#### Parameters

 plane the plane

#### Returns

the C coefficient

### d

 pwu::Plane d plane

Get the D plane coefficient

#### Parameters

 plane the plane

#### Returns

the D coefficient

### normal

 pwu::Plane normal plane

Get the normal vector of a plane

#### Parameters

 plane the plane

#### Returns

the normal vector

### constant

 pwu::Plane constant plane

Get the plane constant (D coefficient)

#### Parameters

 plane the 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

 plane the plane vec the 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

 plane the plane vec the vector

the distance

### line

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

Get the intersection of a line and a given plane

#### Parameters

 plane the plane origin the origin of the line dir the direction of the line intersetVar a 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

 plane the plane pt1 the start of the segment pt2 the end of the segment intersetVar a 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

 plane the plane point the 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