Packageaway3d.core.base
Classpublic class Vertex
InheritanceVertex Inheritance ValueObject Inheritance flash.events.EventDispatcher

A vertex coordinate value object. Properties x, y and z represent a 3d point in space.

Public Properties
 PropertyDefined by
  extra : Object
An object that contains user defined properties.
Vertex
  geometry : Geometry
Vertex
  parents : Array
Vertex
  position : Number3D
[read-only] Represents the vertex position vector
Vertex
  skinVertex : SkinVertex
Vertex
  x : Number
Defines the x coordinate of the vertex relative to the local coordinates of the parent mesh object.
Vertex
  y : Number
Represents the y coordinate of the vertex relative to the local coordinates of the parent mesh object.
Vertex
  z : Number
Represents the z coordinate of the vertex relative to the local coordinates of the parent mesh object.
Vertex
Public Methods
 MethodDefined by
  
Vertex
(x:Number = 0, y:Number = 0, z:Number = 0)
Creates a new Vertex object.
Vertex
  
add(value:Number3D):void
Adjusts the position of the vertex object by Number3D.
Vertex
 Inherited
addOnChange(listener:Function):void
ValueObject
  
adjust(x:Number, y:Number, z:Number, k:Number = 1):void
Adjusts the position of the vertex object incrementally.
Vertex
  
Duplicates the vertex properties to another Vertex object
Vertex
  
distanceSqr(a:Vertex, b:Vertex):Number
[static] Get the middle-point of two vertices
Vertex
  
[static] private Returns the middle-point of two vertices
Vertex
  
perspective(focus:Number):ScreenVertex
Applies perspective distortion
Vertex
 Inherited
removeOnChange(listener:Function):void
ValueObject
  
reset():void
Reset the position of the vertex object by Number3D.
Vertex
  
setValue(x:Number, y:Number, z:Number):void
Sets the vertex coordinates
Vertex
  
toString():String
Used to trace the values of a vertex object.
Vertex
  
Vertex
  
weighted(a:Vertex, b:Vertex, aw:Number, bw:Number):Vertex
[static] Get the weighted average of two vertices
Vertex
Protected Methods
 MethodDefined by
 Inherited
notifyChange():void
ValueObject
Property detail
extraproperty
public var extra:Object

An object that contains user defined properties. Defaults to null.

geometryproperty 
public var geometry:Geometry
parentsproperty 
public var parents:Array
positionproperty 
position:Number3D  [read-only]

Represents the vertex position vector

Implementation
    public function get position():Number3D
skinVertexproperty 
public var skinVertex:SkinVertex
xproperty 
x:Number  [read-write]

Defines the x coordinate of the vertex relative to the local coordinates of the parent mesh object.

Implementation
    public function get x():Number
    public function set x(value:Number):void
yproperty 
y:Number  [read-write]

Represents the y coordinate of the vertex relative to the local coordinates of the parent mesh object.

Implementation
    public function get y():Number
    public function set y(value:Number):void
zproperty 
z:Number  [read-write]

Represents the z coordinate of the vertex relative to the local coordinates of the parent mesh object.

Implementation
    public function get z():Number
    public function set z(value:Number):void
Constructor detail
Vertex()constructor
public function Vertex(x:Number = 0, y:Number = 0, z:Number = 0)Parameters
x:Number (default = 0) — [optional] The local x position of the vertex. Defaults to 0.
 
y:Number (default = 0) — [optional] The local y position of the vertex. Defaults to 0.
 
z:Number (default = 0) — [optional] The local z position of the vertex. Defaults to 0.
Init Parameters
Method detail
add()method
public function add(value:Number3D):void

Adjusts the position of the vertex object by Number3D.

Parameters
value:Number3D — Amount to add in Number3D format.
adjust()method 
public function adjust(x:Number, y:Number, z:Number, k:Number = 1):void

Adjusts the position of the vertex object incrementally.

Parameters
x:Number — The x position used for adjustment.
 
y:Number — The x position used for adjustment.
 
z:Number — The x position used for adjustment.
 
k:Number (default = 1) — The fraction by which to adjust the vertex values.
clone()method 
public function clone():Vertex

Duplicates the vertex properties to another Vertex object

Returns
Vertex — The new vertex instance with duplicated properties applied
distanceSqr()method 
public static function distanceSqr(a:Vertex, b:Vertex):Number

Get the middle-point of two vertices

Parameters
a:Vertex
 
b:Vertex

Returns
Number
median()method 
public static function median(a:Vertex, b:Vertex):Vertex

private Returns the middle-point of two vertices

Parameters
a:Vertex
 
b:Vertex

Returns
Vertex
perspective()method 
public function perspective(focus:Number):ScreenVertex

Applies perspective distortion

Parameters
focus:Number

Returns
ScreenVertex
reset()method 
public function reset():void

Reset the position of the vertex object by Number3D.

setValue()method 
public function setValue(x:Number, y:Number, z:Number):void

Sets the vertex coordinates

Parameters
x:Number
 
y:Number
 
z:Number
toString()method 
public override function toString():String

Used to trace the values of a vertex object.

Returns
String — A string representation of the vertex object.
transform()method 
public function transform(m:MatrixAway3D):void Parameters
m:MatrixAway3D
weighted()method 
public static function weighted(a:Vertex, b:Vertex, aw:Number, bw:Number):Vertex

Get the weighted average of two vertices

Parameters
a:Vertex
 
b:Vertex
 
aw:Number
 
bw:Number

Returns
Vertex
Wiki link
Click to go to the wiki page for 'away3d.core.base.Vertex'

Code examples

Comments