Class sandy.math.PlaneMath

Description

Math functions for planes.

Field Index

NEGATIVE, ON_PLANE, POSITIVE

Method Index

classifyPoint(), computePlaneFromPoints(), createFromNormalAndPoint(), distanceToPoint(), normalizePlane()

Field Detail

NEGATIVE

static public NEGATIVE:Number [Read Only]

ON_PLANE

static public ON_PLANE:Number [Read Only]

POSITIVE

static public POSITIVE:Number [Read Only]

Method Detail

normalizePlane

static public function normalizePlane(plane:Plane):Void

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

Parameters

planePlane The plane that we want to normalize.

distanceToPoint

static public function distanceToPoint(plane:Plane, pt:Vector):Number

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

Parameters

planePlane The plane we want to compute the distance from
ptVector The vector in the 3D space

Return

Number The distance between the point and the plane.

classifyPoint

static public function classifyPoint(plane:Plane, pt:Vector):Number

Returns a constant PlaneMath.NEGATIVE PlaneMath.POSITIVE PlaneMath.ON_PLANE depending of the position of the point compared to the plane

Parameters

planePlane The reference plane
ptVector The point we want to classify

Return

Number The classification of the point PlaneMath.NEGATIVE or PlaneMath.POSITIVE or PlaneMath.ON_PLANE

computePlaneFromPoints

static public function computePlaneFromPoints(pA:Vector, pB:Vector, pC:Vector):Plane

createFromNormalAndPoint

static public function createFromNormalAndPoint(pNormal:Vector, pD:Number):Plane