Point

Kind of class:class
Inherits from:CoreObject
Implements:
Known subclasses:
Version:02/22/07
Author:Aaron Clinger, David Bliss
Classpath:org.casaframework.math.geom.Point
File last modified:Wednesday, 07 March 2007, 14:18:37
Stores location of a point in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.

Summary

Constructor
Instance properties
Instance properties inherited from CoreObject
Class methods

Constructor

Point

function Point (
x:Number, y:Number)
Creates point object.
Parameters:
x:
The horizontal coordinate of the point.
y:
The vertical coordinate of the point.

Class methods

angle

static function angle (
firstPoint:Point, secondPoint:Point) : Number
Determines the angle/degree between the first and second point.
Parameters:
firstPoint :
The first point.
secondPoint:
The second point.

distance

static function distance (
firstPoint:Point, secondPoint:Point) : Number
Determines the distance between the first and second points.
Parameters:
firstPoint :
The first point.
secondPoint:
The second point.

Instance methods

clone

function clone (
) : Point
Returns:
A new point object with the same values as this point.

destroy

function destroy (
) : Void
Removes any internal variables, intervals, enter frames, internal MovieClips and event observers to allow the object to be garbage collected.

Always call destroy() before deleting last object pointer.
#

equals

function equals (
pointObject:Point) : Boolean
Determines whether the point specified in the pointObject parameter is equal to this point object.
Parameters:
pointObject:
A defined Point object.
Returns:
Returns true if shape's location is identical; otherwise false.

getX

function getX (
) : Number
Returns:
The left X position.
#
Specified by:

getY

function getY (
) : Number
Returns:
The top Y position.
#
Specified by:

offset

function offset (
x:Number, y:Number) : Void
Offsets the Point object by the specified amount.
Parameters:
x:
The amount by which to offset the horizontal coordinate.
y:
The amount by which to offset the vertical coordinate.

rotate

function rotate (
pointObject:Point, angle:Number) : Void
Rotate the Point object around another point by the specified angle.
Parameters:
pointObject:
The Point to rotate this point about.
angle :
The angle (in degrees) to rotate this point.

setX

function setX (
x:Number) : Void
Sets the X coordinate.
#
Parameters:
x:
The horizontal coordinate of the point.
#
Specified by:

setY

function setY (
y:Number) : Void
Sets the Y coordinate.
#
Parameters:
y:
The vertical coordinate of the point.
#
Specified by: