The Plane3D class represents a plane in 3D space.
public var eps:Number = 0.01
protected static var flipPlane:Plane3D
public var normal:Number3D
The plane normal (A, B, C).
public function Plane3D(normal:Number3D = null, ptOnPlane:Number3D = null)
Constructor.
Parameters
| normal:Number3D (default = null) — The plane normal.
|
| |
| ptOnPlane:Number3D (default = null) — A point on the plane.
|
public function closestPointOnPlane(point:Number3D, ptOnPlane:Number3D):Number3D
Get the closest point on the plane.
Parameters
| point:Number3D — The point to 'project'.
|
| |
| ptOnPlane:Number3D — ptOnPlane A known point on the plane.
|
Returns
public function distance(pt:*):Number
distance of point to plane.
Parameters
Returns
public static function fromCoefficients(a:Number, b:Number, c:Number, d:Number):Plane3D
Creates a plane from coefficients.
Parameters
| a:Number |
| |
| b:Number |
| |
| c:Number |
| |
| d:Number |
Returns
public static function fromNormalAndPoint(normal:*, point:*):Plane3D
Creates a plane from a normal and a point.
Parameters
Returns
public static function fromThreePoints(p0:*, p1:*, p2:*):Plane3D
Creates a plane from three points.
Parameters
| p0:* — First point.
|
| |
| p1:* — Second point.
|
| |
| p2:* — Third point.
|
Returns
public function getFlip():Plane3D
Returns
public function getIntersectionLine(v0:Vertex3D, v1:Vertex3D):Vertex3DParameters
Returns
public function getIntersectionLineNumbers(v0:Number3D, v1:Number3D):Number3DParameters
Returns
public function getTempFlip():Plane3D
Returns
public function isCoplanar(plane:Plane3D):BooleanParameters
Returns
public function isCoplanarOpposite(plane:Plane3D):BooleanParameters
Returns
public function normalize():void
normalize.
public function pointOnSide(num:Number3D):int
Gets the side a vertex is on.
Parameters
Returns
public function projectPoints(points:Array, origin:Number3D = null):void
Projects points onto this plane.
Passed points should be in the XY-plane. If the points have Z=0 then the points are
projected exactly on the plane. When however Z is greater then zero, the points are
moved 'out of the plane' by a distance Z. Negative values for Z move the points 'into the plane'.
Parameters
| points:Array — Array of points (any object with x, y, z props).
|
| |
| origin:Number3D (default = null) — Where to move the points.
|
public function setCoefficients(a:Number, b:Number, c:Number, d:Number):void
Sets this plane from ABCD coefficients.
Parameters
| a:Number |
| |
| b:Number |
| |
| c:Number |
| |
| d:Number |
public function setNormalAndPoint(normal:Number3D, pt:Number3D):void
Sets this plane from a normal and a point.
Parameters
public function setThreePoints(p0:Number3D, p1:Number3D, p2:Number3D):void
Sets this plane from three points.
Parameters
public function toString():String
Returns
public function vertDistance(pt:Vertex3D):Number
distance of vertex to plane, optimized.
Parameters
Returns