Packagesandy.math
Classpublic class PlaneMath

Math functions for planes.



Public Methods
 MethodDefined by
  
classifyPoint(p_oPlane:Plane, p_oPoint:Vector):Number
[static] Returns a classification constant depending on a points position relative to a plane.
PlaneMath
  
computePlaneFromPoints(p_oPointA:Vector, p_oPointB:Vector, p_oPointC:Vector):Plane
[static] Computes a plane from three specified points.
PlaneMath
  
createFromNormalAndPoint(p_oNormal:Vector, p_nPoint:Number):Plane
[static] Computes a plane from a normal vector and a specified point.
PlaneMath
  
distanceToPoint(p_oPlane:Plane, p_oPoint:Vector):Number
[static] Computes the distance between a plane and a 3D point (a vector here).
PlaneMath
  
normalizePlane(p_oPlane:Plane):void
[static] Normalizes the plane.
PlaneMath
Public Constants
 ConstantDefined by
  NEGATIVE : int = -1
[static] Defines the numeric value -1
PlaneMath
  ON_PLANE : int = 0
[static] Defines the numeric value 0
PlaneMath
  POSITIVE : int = 1
[static] Defines the numeric value 1
PlaneMath
Method detail
classifyPoint()method
public static function classifyPoint(p_oPlane:Plane, p_oPoint:Vector):Number

Returns a classification constant depending on a points position relative to a plane.

The classification is one of PlaneMath.NEGATIVE PlaneMath.POSITIVE PlaneMath.ON_PLANE

Parameters
p_oPlane:Plane — The reference plane
 
p_oPoint:Vector — The point we want to classify

Returns
Number — The classification of the point
computePlaneFromPoints()method 
public static function computePlaneFromPoints(p_oPointA:Vector, p_oPointB:Vector, p_oPointC:Vector):Plane

Computes a plane from three specified points.

Parameters
p_oPointA:Vector — The first point
 
p_oPointB:Vector — The second point
 
p_oPointC:Vector — The third point

Returns
Plane — The Plane object
createFromNormalAndPoint()method 
public static function createFromNormalAndPoint(p_oNormal:Vector, p_nPoint:Number):Plane

Computes a plane from a normal vector and a specified point.

Parameters
p_oNormal:Vector — The normal vector
 
p_nPoint:Number — The point

Returns
Plane — The Plane object
distanceToPoint()method 
public static function distanceToPoint(p_oPlane:Plane, p_oPoint:Vector):Number

Computes the distance between a plane and a 3D point (a vector here).

Parameters
p_oPlane:Plane — The plane we want to compute the distance from
 
p_oPoint:Vector — The point in space

Returns
Number — The distance between the point and the plane.
normalizePlane()method 
public static function normalizePlane(p_oPlane:Plane):void

Normalizes the plane.

Often before making some calculations with a plane you have to normalize it.

Parameters
p_oPlane:Plane — The plane to normalize.
Constant detail
NEGATIVEconstant
public static const NEGATIVE:int = -1

Defines the numeric value -1

ON_PLANEconstant 
public static const ON_PLANE:int = 0

Defines the numeric value 0

POSITIVEconstant 
public static const POSITIVE:int = 1

Defines the numeric value 1