Class Index | File Index

Classes


Class CAAT.Math.Point


Defined in: Point.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
x
point x coordinate.
 
y
point y coordinate.
 
z
point z coordinate.
Method Summary
Method Attributes Method Name and Description
<private>  
__init(xpos, ypos, zpos)
 
Create a new CAAT.Point equal to this one.
 
Return the angle from -Pi to Pi of this point.
 
getDistance(point)
Get the distance between two points.
 
Get the squared distance between two points.
 
Get this point's lenght.
 
Get this point's squared length.
 
limit(max)
Set this point coordinates proportinally to a maximum value.
 
multiply(factor)
Multiply this point by a scalar.
 
Normalize this point, that is, both set coordinates proportionally to values raning 0.
 
rotate(angle)
Rotate this point by an angle.
 
set(x, y, z)
Sets this point coordinates.
 
setAngle(angle)
 
setLength(length)
 
subtract(aPoint)
Substract a point from this one.
 
Get a string representation.
 
translate(x, y, z)
Translate this point to another position.
 
Translate this point to another point.
Class Detail
CAAT.Math.Point()
Field Detail
x
point x coordinate.

y
point y coordinate.

z
point z coordinate.
Method Detail
<private> __init(xpos, ypos, zpos)
Parameters:
xpos
ypos
zpos

{CAAT.Point} clone()
Create a new CAAT.Point equal to this one.
Returns:
{CAAT.Point}

{number} getAngle()
Return the angle from -Pi to Pi of this point.
Returns:
{number}

{number} getDistance(point)
Get the distance between two points.
Parameters:
point
{CAAT.Point}
Returns:
{number}

{number} getDistanceSquared(point)
Get the squared distance between two points.
Parameters:
point
{CAAT.Point}
Returns:
{number}

{number} getLength()
Get this point's lenght.
Returns:
{number}

{number} getLengthSquared()
Get this point's squared length.
Returns:
{number}

limit(max)
Set this point coordinates proportinally to a maximum value.
Parameters:
max
{number}
Returns:
this

multiply(factor)
Multiply this point by a scalar.
Parameters:
factor
{number}
Returns:
this

normalize()
Normalize this point, that is, both set coordinates proportionally to values raning 0..1
Returns:
this

rotate(angle)
Rotate this point by an angle. The rotation is held by (0,0) coordinate as center.
Parameters:
angle
{number}
Returns:
this

set(x, y, z)
Sets this point coordinates.
Parameters:
x
{number}
y
{number}
z
{number=}
Returns:
this

setAngle(angle)
Parameters:
angle
{number}
Returns:
this

setLength(length)
Parameters:
length
{number}
Returns:
this

subtract(aPoint)
Substract a point from this one.
Parameters:
aPoint
{CAAT.Point}
Returns:
this

{string} toString()
Get a string representation.
Returns:
{string}

translate(x, y, z)
Translate this point to another position. The final point will be (point.x+x, point.y+y)
Parameters:
x
{number}
y
{number}
z
Returns:
this

translatePoint(aPoint)
Translate this point to another point.
Parameters:
aPoint
{CAAT.Point}
Returns:
this

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 01 2013 04:59:19 GMT-0700 (PDT)