Packageaway3d.core.draw
Classpublic final class ScreenVertex

representation of a 3d vertex resolved to the view.

Public Properties
 PropertyDefined by
  vectorInstructionType : String = "L"
ScreenVertex
  viewTimer : int
ScreenVertex
  visible : Boolean
Indicates whether the vertex is visible after projection.
ScreenVertex
  vx : Number
The view x position of the vertex in the view.
ScreenVertex
  vy : Number
The view y position of the vertex in the view.
ScreenVertex
  x : Number
The screen x position of the vertex in the view.
ScreenVertex
  y : Number
The screen y position of the vertex in the view.
ScreenVertex
  z : Number
The screen z position of the vertex in the view.
ScreenVertex
Public Methods
 MethodDefined by
  
ScreenVertex
(x:Number = 0, y:Number = 0, z:Number = 0)
Creates a new PrimitiveQuadrantTreeNode object.
ScreenVertex
  
Calculates the distance between two screen vertex objects.
ScreenVertex
  
distanceSqr(ax:Number, ay:Number, bx:Number, by:Number):Number
[static] Calculates the squared distance between two screen vertex objects.
ScreenVertex
  
distortSqr(b:ScreenVertex, focus:Number):Number
Calculates affine distortion present at the midpoint between two screen vertex objects.
ScreenVertex
  
median(aindex:Number, bindex:Number, screenVertices:Array, screenIndices:Array, focus:Number):void
[static] Creates the median screen vertex between the two given screen vertex objects.
ScreenVertex
  
toString():String
Used to trace the values of a vertex.
ScreenVertex
  
weighted(a:ScreenVertex, b:ScreenVertex, aw:Number, bw:Number, focus:Number):ScreenVertex
[static] Returns a screen vertex with values given by a weighted mean calculation.
ScreenVertex
Property detail
vectorInstructionTypeproperty
public var vectorInstructionType:String = "L"
viewTimerproperty 
public var viewTimer:int
visibleproperty 
public var visible:Boolean

Indicates whether the vertex is visible after projection.

vxproperty 
public var vx:Number

The view x position of the vertex in the view.

vyproperty 
public var vy:Number

The view y position of the vertex in the view.

xproperty 
public var x:Number

The screen x position of the vertex in the view.

yproperty 
public var y:Number

The screen y position of the vertex in the view.

zproperty 
public var z:Number

The screen z position of the vertex in the view.

Constructor detail
ScreenVertex()constructor
public function ScreenVertex(x:Number = 0, y:Number = 0, z:Number = 0)Parameters
x:Number (default = 0) — [optional] The x position of the vertex in the view. Defaults to 0.
 
y:Number (default = 0) — [optional] The y position of the vertex in the view. Defaults to 0.
 
z:Number (default = 0) — [optional] The z position of the vertex in the view. Defaults to 0.
Init Parameters
Method detail
distance()method
public function distance(b:ScreenVertex):Number

Calculates the distance between two screen vertex objects.

Parameters
b:ScreenVertex — The second screen vertex object to use for the calcation.

Returns
Number — The scalar value of the vector between this and the given screen vertex.
distanceSqr()method 
public static function distanceSqr(ax:Number, ay:Number, bx:Number, by:Number):Number

Calculates the squared distance between two screen vertex objects.

Parameters
ax:Number — The screen vertex object to use for the calcation.
 
ay:Number
 
bx:Number
 
by:Number

Returns
Number — The squared scalar value of the vector between this and the given scren vertex.
distortSqr()method 
public function distortSqr(b:ScreenVertex, focus:Number):Number

Calculates affine distortion present at the midpoint between two screen vertex objects.

Parameters
b:ScreenVertex — The second screen vertex object to use for the calcation.
 
focus:Number — The focus value used for the distortion calulations.

Returns
Number — The scalar value of the vector between this and the given screen vertex.
median()method 
public static function median(aindex:Number, bindex:Number, screenVertices:Array, screenIndices:Array, focus:Number):void

Creates the median screen vertex between the two given screen vertex objects.

Parameters
aindex:Number — The index of the first screen vertex to use for the calculation.
 
bindex:Number — The index of the second screen vertex to use for the calculation.
 
screenVertices:Array — The Array of screen vertices to use for the calculation.
 
screenIndices:Array — The Array of screen indices to use for the calculation.
 
focus:Number — The focus value used for the median calulations.
toString()method 
public function toString():String

Used to trace the values of a vertex.

Returns
String — A string representation of the vertex object.
weighted()method 
public static function weighted(a:ScreenVertex, b:ScreenVertex, aw:Number, bw:Number, focus:Number):ScreenVertex

Returns a screen vertex with values given by a weighted mean calculation.

Parameters
a:ScreenVertex — The first screen vertex to use for the calculation.
 
b:ScreenVertex — The second screen vertex to use for the calculation.
 
aw:Number — The first screen vertex weighting.
 
bw:Number — The second screen vertex weighting.
 
focus:Number — The focus value used for the weighting calulations.

Returns
ScreenVertex — The resulting screen vertex.
Wiki link
Click to go to the wiki page for 'away3d.core.draw.ScreenVertex'

Code examples

Comments