|
MathWorx | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--Plane
The Plane class is a very useful definition of a plane. A Plane object consists of a base point and a normal vector, thus implicitly representing the infinitude of a plane.
Defined in Plane.js
Requires:
Field Summary | |
point3D |
base
The "base" point of the plane. |
point3D |
norm
The normal vector of the plane, which wholly defines the Plane along with the base point. |
<static> Plane |
XY
The XY-plane. |
<static> Plane |
XZ
Same as Plane.ZX |
<static> Plane |
YX
Same as Plane.XY |
<static> Plane |
YZ
The YZ-plane. |
<static> Plane |
ZX
The ZX-plane. |
<static> Plane |
ZY
Same as Plane.YZ |
Constructor Summary | |
Plane(<point3D> base, <point3D> v1, <point3D> v2)
The constructor function for a new Plane. |
Method Summary | |
Boolean
|
contains(<Object> obj)
Tests if a line or point lies in the plane. |
Number
|
distanceFrom(<Object> obj)
Gets the distance of a plane, line or point from the plane. |
Boolean
|
equalTo(<Plane> plane)
Tests whether two planes are equal. |
Object
|
intersection(<Object> obj)
Gets the intersection of a plane with a given Line or Plane. |
Boolean
|
intersects(<Object> obj)
Tests to see if a line or plane intersects with this plane. |
Boolean
|
isParallel(<Object> obj)
Tests to see if the plane is parallel to a given Plane or Line. |
Boolean
|
isPerpendicular(plane)
Tests to see if two planes are perpendicular to each other. |
Object
|
pointClosestTo(<point3D> point)
Finds the point in the plane closest to the given point. |
Plane
|
rotate(<Number> deg, line)
Rotates a plane through deg degrees about an arbitrary line. |
String
|
toString()
Returns a string representation of the Plane. |
Plane
|
translate(<Number> dx, <Number> dy, <Number> dz)
Translates a plane by dx, dy and dz (normal does not change, only the base) |
Field Detail |
point3D base
point3D norm
<static> Plane XY
<static> Plane XZ
<static> Plane YX
<static> Plane YZ
<static> Plane ZX
<static> Plane ZY
Constructor Detail |
Plane(<point3D> base, <point3D> v1, <point3D> v2)
base
- the base point of the plane; if a Plane object, will create a duplicate of the plane
v1
- (can also be a 3D Vector) the normal vector if only one vector is supplied
v2
- (Optional) (can also be a 3D Vector) if supplied, assume that the three parameters are base point and two vectors, so the normal becomes (v1 cross v2)
Method Detail |
Boolean contains(<Object> obj)
obj
- the line or point to test
Number distanceFrom(<Object> obj)
obj
- the plane, line, or point from which to find the distance
Boolean equalTo(<Plane> plane)
plane
- the plane to test for equality
Object intersection(<Object> obj)
obj
- the Line or Plane with which to find the intersection
Boolean intersects(<Object> obj)
obj
- the line or plane to test
Boolean isParallel(<Object> obj)
obj
- the plane or line to check to see if parallel
Boolean isPerpendicular(plane)
Object pointClosestTo(<point3D> point)
point
- (can also be a 3D Vector) the point to which to find the closest point in the plane
Plane rotate(<Number> deg, line)
deg
- the number of degrees (in radians) to rotate the plane
the
- Line about which to rotate the plane
String toString()
Plane translate(<Number> dx, <Number> dy, <Number> dz)
dx
- the x translation
dy
- the y translation
dz
- the z translation
|
MathWorx | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |