Packagegraphics.geom
Classpublic class Vector4
InheritanceVector4 Inheritance Object
Implements Geometry

Represents a vector in a 3D world with the coordinates x, y, z and w.



Public Properties
 PropertyDefined By
  w : Number
Defined the w coordinate.
Vector4
  x : Number
Defines the x coordinate.
Vector4
  y : Number
Defines the y coordinate.
Vector4
  z : Number
Defined the z coordinate.
Vector4
  ZERO : Vector4
[static] Defines the Vector4 object with the x, y, z and w properties set to zero.
Vector4
Public Methods
 MethodDefined By
  
Vector4(x:Number = 0, y:Number = 0, z:Number = 0, w:Number = 0)
Creates a new Vector4 instance.
Vector4
  
add(v:Vector4):void
Computes the addition of two Vector4 object.
Vector4
  
clone():*
Returns a shallow copy of this instance.
Vector4
  
equals(o:*):Boolean
Compares the specified object with this object for equality.
Vector4
  
scale(value:Number):void
Scales the vector object with the input value.
Vector4
  
Computes the substraction of the current Vector3 object with an other.
Vector4
  
toObject():Object
Returns the Object representation of this object.
Vector4
  
toSource(indent:int = 0):String
Returns the source code string representation of the object.
Vector4
  
toString():String
Returns the string representation of the object.
Vector4
Property Detail
wproperty
public var w:Number

Defined the w coordinate.

xproperty 
public var x:Number

Defines the x coordinate.

yproperty 
public var y:Number

Defines the y coordinate.

zproperty 
public var z:Number

Defined the z coordinate.

ZEROproperty 
public static var ZERO:Vector4

Defines the Vector4 object with the x, y, z and w properties set to zero.

Constructor Detail
Vector4()Constructor
public function Vector4(x:Number = 0, y:Number = 0, z:Number = 0, w:Number = 0)

Creates a new Vector4 instance.

Parameters
x:Number (default = 0) — the x coordinate.
 
y:Number (default = 0) — the y coordinate.
 
z:Number (default = 0) — the z coordinate.
 
w:Number (default = 0) — the w coordinate.
Method Detail
add()method
public function add(v:Vector4):void

Computes the addition of two Vector4 object.

Parameters

v:Vector4 — the vector object to add.

clone()method 
public function clone():*

Returns a shallow copy of this instance.

Returns
* — a shallow copy of this instance.
equals()method 
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.
scale()method 
public function scale(value:Number):void

Scales the vector object with the input value.

Parameters

value:Number — a real number to scale the current vector object.

substract()method 
public function substract(v:Vector4):void

Computes the substraction of the current Vector3 object with an other.

Parameters

v:Vector4 — the vector to substract.

toObject()method 
public function toObject():Object

Returns the Object representation of this object.

Returns
Object — the Object representation of this object.
toSource()method 
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 
public function toString():String

Returns the string representation of the object.

Returns
String — the string representation of the object.