Packagesandy.math
Classpublic class PlaneMath

Math functions for planes.



Public Methods
 MethodDefined by
  
classifyPoint(p_oPlane:Plane, p_oVector:Vector):Number
[static] Returns a classification constant depending on a vector's position relative to a plane.
PlaneMath
  
computePlaneFromPoints(p_oVectorA:Vector, p_oVectorB:Vector, p_oVectorC:Vector):Plane
[static] Computes a plane from three vectors.
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_oVector:Vector):Number
[static] Computes the distance between a plane and a vector.
PlaneMath
  
normalizePlane(p_oPlane:Plane):void
[static] Normalizes the plane.
PlaneMath
Public Constants
 ConstantDefined by
  NEGATIVE : int = -1
[static] Specifies a negative distance from a vector to a plane.
PlaneMath
  ON_PLANE : int = 0
[static] Specifies a vector is on a plane.
PlaneMath
  POSITIVE : int = 1
[static] Specifies a positive distance from a vector to a plane.
PlaneMath
Method detail
classifyPoint()method
public static function classifyPoint(p_oPlane:Plane, p_oVector:Vector):Number

Returns a classification constant depending on a vector's position relative to a plane.

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

Parameters
p_oPlane:Plane — The reference plane.
 
p_oVector:Vector — The vector we want to classify.

Returns
Number — The classification of the vector.
computePlaneFromPoints()method 
public static function computePlaneFromPoints(p_oVectorA:Vector, p_oVectorB:Vector, p_oVectorC:Vector):Plane

Computes a plane from three vectors.

Parameters
p_oVectorA:Vector — The first vector.
 
p_oVectorB:Vector — The second vector.
 
p_oVectorC:Vector — The third vector.

Returns
Plane — The computed plane.
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 computed plane.
distanceToPoint()method 
public static function distanceToPoint(p_oPlane:Plane, p_oVector:Vector):Number

Computes the distance between a plane and a vector.

Parameters
p_oPlane:Plane — The plane.
 
p_oVector:Vector — The vector.

Returns
Number — The distance between the vector 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

Specifies a negative distance from a vector to a plane.

ON_PLANEconstant 
public static const ON_PLANE:int = 0

Specifies a vector is on a plane.

POSITIVEconstant 
public static const POSITIVE:int = 1

Specifies a positive distance from a vector to a plane.