Packagegraphics.geom
Classpublic class Vertex
InheritanceVertex Inheritance Vector3 Inheritance Object

A Vertex is a point which can be represented in differents coordinates (local, world, screen).



Public Properties
 PropertyDefined By
 Inheritedlength : Number
[read-only] Indicates the length of the vector.
Vector3
  sx : Number
Defined the x coordinates in the screen World.
Vertex
  sy : Number
Defined the y coordinates in the screen World.
Vertex
  tx : Number
Defined the x coordinates in the local coordinates.
Vertex
  ty : Number
Defined the y coordinates in the local coordinates.
Vertex
  tz : Number
Defined the z coordinates in the local coordinates.
Vertex
  wx : Number
Defined the x coordinates in the World coordinates.
Vertex
  wy : Number
Defined the y coordinates in the World coordinates.
Vertex
  wz : Number
Defined the z coordinates in the World coordinates.
Vertex
 Inheritedx : Number
Defines the x coordinate.
Vector3
 Inheritedy : Number
Defines the y coordinate.
Vector3
 Inheritedz : Number
Defined the z coordinate.
Vector3
  ZERO : Vertex
[static] Defines the Vertex object with the x, y, z properties set to zero.
Vertex
Public Methods
 MethodDefined By
  
Vertex(x:Number = 0, y:Number = 0, z:Number = 0, tx:Number, ty:Number, tz:Number)
Creates a new Vertex instance.
Vertex
 Inherited
add(v:Vector3):void
Computes the addition of two vectors.
Vector3
 Inherited
[static] Computes the addition of two Vector3.
Vector3
 Inherited
angle(v1:Vector3, v2:Vector3):Number
[static] Returns the angle in radian between the two 3D vectors.
Vector3
  
clone():*
[override] Returns a shallow copy of this instance.
Vertex
 Inherited
Computes the cross product of two Vector3s.
Vector3
 Inherited
dot(vector:Vector3):Number
Returns the dot value of the passed-in Vector3 with the current Vector3 object.
Vector3
  
equals(o:*):Boolean
[override] Compares the specified object with this object for equality.
Vertex
  
Returns the Vector3 representation of the transformed coordinate system of this Vertex.
Vertex
  
Returns the Vector3 representation of this Vertex in the world coordinate.
Vertex
 Inherited
negate():void
Sets this Vector2 with negate coordinates.
Vector3
 Inherited
[static] Returns the new negate Vector2 of the specified Vector2 objet.
Vector3
 Inherited
normalize():Boolean
Normalize the vector.
Vector3
 Inherited
perspective(distance:Number = 300):Number
Calculates and returns the perspective ratio needed to scale an object correctly.
Vector3
 Inherited
pow(value:Number):void
Computes the power of the vector.
Vector3
 Inherited
pow(vector:Vector3, value:Number):Vector3
[static] Computes the power of the specified Vector3.
Vector3
 Inherited
project(perspective:Number):void
Performs a perspective projection on a 3d point.
Vector3
 Inherited
project(v:Vector3, perspective:Number):Vector3
[static] Performs a perspective projection on a 3d point.
Vector3
 Inherited
rotateX(angle:Number):void
Rotates the current vector object around the x-axis by a certain amount of degrees.
Vector3
 Inherited
rotateXTrig(ca:Number, sa:Number):void
Rotates the current vector object around the x-axis by the cosine and sine of an angle.
Vector3
 Inherited
rotateXY(a:Number, b:Number):void
Rotates the current vector object around the x and y axes by a certain amount of degrees.
Vector3
 Inherited
rotateXYTrig(ca:Number, sa:Number, cb:Number, sb:Number):void
Rotates the current vector object around the x and y axes by the cosine and sine of an angle.
Vector3
 Inherited
rotateXYZ(v:Vector3, a:Number, b:Number, c:Number):void
Rotates the current vector object around the x, y and z axes by a certain amount of degrees.
Vector3
 Inherited
rotateXYZTrig(ca:Number, sa:Number, cb:Number, sb:Number, cc:Number, sc:Number):void
Rotates the current vector object around the x, y and z axes by the cosine and sine of an angle.
Vector3
 Inherited
rotateY(angle:Number):void
Rotates the current vector object around the y-axis by a certain amount of degrees.
Vector3
 Inherited
rotateYTrig(ca:Number, sa:Number):void
Rotates the current vector object around the y-axis by the cosine and sine of an angle.
Vector3
 Inherited
rotateZ(angle:Number):void
Rotates the current vector object around the z-axis by a certain amount of degrees.
Vector3
 Inherited
rotateZTrig(ca:Number, sa:Number):void
Rotates the current vector object around the z-axis by the cosine and sine of an angle.
Vector3
 Inherited
scale(value:Number):void
Scales the vector object with the input value.
Vector3
 Inherited
scale(v:Vector3, value:Number):Vector3
[static] Scales a new Vector3 object with the input value.
Vector3
 Inherited
set(vector:Vector3):void
Sets the specified Vector3 object with the second Vector3 object passed in argument.
Vector3
 Inherited
squaredLength():Number
Returns the squared length of this vector.
Vector3
 Inherited
Computes the substraction of the current vector object with an other.
Vector3
 Inherited
[static] Computes the substraction of two Vector3 and creates a new Vector3.
Vector3
 Inherited
swap(vector:Vector3):void
Swap the horizontal and vertical coordinates of two Vector2 objects.
Vector3
  
toObject():Object
[override] Returns the Object representation of this object.
Vertex
  
toSource(indent:int = 0):String
[override] Returns the source code string representation of the object.
Vertex
  
toString():String
[override] Returns the string representation of the object.
Vertex
Public Constants
 ConstantDefined By
 InheritedBACKWARD : Vector3
[static] Indicates the relative "backward" direction.
Vector3
 InheritedDOWN : Vector3
[static] Indicates the relative "down" direction.
Vector3
 InheritedFORWARD : Vector3
[static] Indicates the relative "forward" direction.
Vector3
 InheritedLEFT : Vector3
[static] Indicates the relative "left" direction.
Vector3
 InheritedRIGHT : Vector3
[static] Indicates the relative "right" direction.
Vector3
 InheritedUP : Vector3
[static] Indicates the relative "up" direction.
Vector3
Property Detail
sxproperty
public var sx:Number

Defined the x coordinates in the screen World.

syproperty 
public var sy:Number

Defined the y coordinates in the screen World.

txproperty 
public var tx:Number

Defined the x coordinates in the local coordinates.

typroperty 
public var ty:Number

Defined the y coordinates in the local coordinates.

tzproperty 
public var tz:Number

Defined the z coordinates in the local coordinates.

wxproperty 
public var wx:Number

Defined the x coordinates in the World coordinates.

wyproperty 
public var wy:Number

Defined the y coordinates in the World coordinates.

wzproperty 
public var wz:Number

Defined the z coordinates in the World coordinates.

ZEROproperty 
public static var ZERO:Vertex

Defines the Vertex object with the x, y, z properties set to zero.

Constructor Detail
Vertex()Constructor
public function Vertex(x:Number = 0, y:Number = 0, z:Number = 0, tx:Number, ty:Number, tz:Number)

Creates a new Vertex instance.

Parameters
x:Number (default = 0) — the x coordinate.
 
y:Number (default = 0) — the y coordinate.
 
z:Number (default = 0) — the z coordinate.
 
tx:Number (default = NaN) — (optional) the transformed x position number. If this argument is 'null' or 'undefined' the default value is x.
 
ty:Number (default = NaN) — (optional) the transformed y position number. If this argument is 'null' or 'undefined' the default value is y.
 
tz:Number (default = NaN) — (optional) the transformed z position number. If this argument is 'null' or 'undefined' the default value is z.
Method Detail
clone()method
override public function clone():*

Returns a shallow copy of this instance.

Returns
* — a shallow copy of this instance.
equals()method 
override public function equals(o:*):Boolean

Compares the specified object with this object for equality.

Parameters

o:*

Returns
Booleantrue if the the specified object is equal with this object.
getTransform()method 
public function getTransform():Vector3

Returns the Vector3 representation of the transformed coordinate system of this Vertex.

Returns
Vector3 — the Vector3 representation of the transformed coordinate system of this Vertex.
getWorld()method 
public function getWorld():Vector3

Returns the Vector3 representation of this Vertex in the world coordinate.

Returns
Vector3 — the Vector3 representation of this Vertex in the world coordinate.
toObject()method 
override public function toObject():Object

Returns the Object representation of this object.

Returns
Object — the Object representation of this object.
toSource()method 
override public function toSource(indent:int = 0):String

Returns the source code string representation of the object.

Parameters

indent:int (default = 0)

Returns
String — the source code string representation of the object.
toString()method 
override public function toString():String

Returns the string representation of the object.

Returns
String — the string representation of the object.