Documentation

Classes

Class Plane3d

3d plane class with lots of operators and methods

Class Overview
Plane3d()
3d plane class with lots of operators and methods.

Field Summary
Field Attributes Field Name and Description
 
D
plane distance to origin
<static>  
Plane3d.ISREL3D_BACK
back plane relation, used in Plane3d.classifyPointRelation
<static>  
Plane3d.ISREL3D_FRONT
front plane relation, used in Plane3d.classifyPointRelation
<static>  
Plane3d.ISREL3D_PLANAR
planar plane relation, used in Plane3d.classifyPointRelation
 
plane normal
Method Summary
Method Attributes Method Name and Description
 
Classifies the relation of a point to this plane.
 
Creates a clone of the plane
 
Get the distance to a point.
 
getIntersectionWithLine(lineVect, linePoint, outIntersection)
Get an intersection with a 3d line.
 
getIntersectionWithPlane(other, outLinePoint, outLineVect)
Intersects this plane with another.
 
getIntersectionWithPlanes(o1, o2, outPoint)
Get the intersection point with two other planes if there is one.
 
Gets a member point of the plane.
 
isFrontFacing(lookDirection)
Returns true if the plane is frontfacing to the look direction.
 
normalizes the plane
 
recalculateD(mpoint)
Recalculates the distance from origin by applying a new member point to the plane.
 
setPlane(point, nvector)
Sets initial values
 
setPlaneFrom3Points(point1, point2, point3)
creates a plane from 3 points
Field Detail
{Number} D
plane distance to origin

<static> Plane3d.ISREL3D_BACK
back plane relation, used in Plane3d.classifyPointRelation

<static> Plane3d.ISREL3D_FRONT
front plane relation, used in Plane3d.classifyPointRelation

<static> Plane3d.ISREL3D_PLANAR
planar plane relation, used in Plane3d.classifyPointRelation

{Vect3d} Normal
plane normal
Method Detail
classifyPointRelation(point)
Classifies the relation of a point to this plane.
Parameters:
point
Point to classify its relation.
Returns:
ISREL3D_FRONT if the point is in front of the plane, ISREL3D_BACK if the point is behind of the plane, and ISREL3D_PLANAR if the point is within the plane.

{Plane3d} clone()
Creates a clone of the plane
Returns:
{Plane3d} the cloned plane

getDistanceTo(point)
Get the distance to a point. Note that this only works if the normal is normalized.
Parameters:
point

getIntersectionWithLine(lineVect, linePoint, outIntersection)
Get an intersection with a 3d line.
Parameters:
lineVect
Vector of the line to intersect with.
linePoint
Point of the line to intersect with.
outIntersection
Place to store the intersection point, if there is one.
Returns:
True if there was an intersection, false if there was not.

getIntersectionWithPlane(other, outLinePoint, outLineVect)
Intersects this plane with another.
Parameters:
other
Other plane to intersect with.
outLinePoint
Base point of intersection line.
outLineVect
Vector of intersection.
Returns:
True if there is a intersection, false if not.

{Boolean} getIntersectionWithPlanes(o1, o2, outPoint)
Get the intersection point with two other planes if there is one.
Parameters:
o1
o2
outPoint
Returns:
{Boolean} true if intersection found, false if not

getMemberPoint()
Gets a member point of the plane.

isFrontFacing(lookDirection)
Returns true if the plane is frontfacing to the look direction.
Parameters:
lookDirection
{Vect3d} look direction

normalize()
normalizes the plane

recalculateD(mpoint)
Recalculates the distance from origin by applying a new member point to the plane.
Parameters:
mpoint

setPlane(point, nvector)
Sets initial values
Parameters:
point
nvector

setPlaneFrom3Points(point1, point2, point3)
creates a plane from 3 points
Parameters:
point1
point2
point3

© 2010 N.Gebhardt, Ambiera
Documentation generated by JsDoc Toolkit