Packagesandy.core.data
Classpublic final class UVCoord

A 2D coordinate point on a texture that corresponds to a vertex of a polygon in 3D space.

The UVCoord represents the position of a vertex on the Bitmap used to dress the polygon.
It is the 2D texture coordinates, used in the BitmapMaterial and VideoMaterial.



Public Properties
 PropertyDefined by
  u : Number
The v coordinate.
UVCoord
  v : Number
The u coordinate.
UVCoord
Public Methods
 MethodDefined by
  
UVCoord(p_nU:Number = 0, p_nV:Number = 0)
Creates a new UV coordinate.
UVCoord
  
add(p_oUV:UVCoord):void
Add the UVCoord passed as parameter with the current UVCoord.
UVCoord
  
Return a clone of this UVCoord.
UVCoord
  
copy(p_oUV:UVCoord):void
Realize a copy of the UVCoord object passed in parameter to the local object.
UVCoord
  
length():Number
UVCoord
  
normalize():void
UVCoord
  
scale(p_nFactor:Number):void
Scale the texture coords values by a factor.
UVCoord
  
sub(p_oUV:UVCoord):void
Substract the UVCoord passed as parameter to the current UVCoord.
UVCoord
  
toString():String
Returns a string representing this UVCoord.
UVCoord
Property detail
uproperty
public var u:Number

The v coordinate.

vproperty 
public var v:Number

The u coordinate.

Constructor detail
UVCoord()constructor
public function UVCoord(p_nU:Number = 0, p_nV:Number = 0)

Creates a new UV coordinate.

Parameters
p_nU:Number (default = 0) — Number the x texture position in the bitmap
 
p_nV:Number (default = 0) — Number the y texture position in the bitmap.
Method detail
add()method
public function add(p_oUV:UVCoord):void

Add the UVCoord passed as parameter with the current UVCoord.

Parameters
p_oUV:UVCoord — The UVCoord to add
clone()method 
public function clone():UVCoord

Return a clone of this UVCoord.

Returns
UVCoord — The clone
copy()method 
public function copy(p_oUV:UVCoord):void

Realize a copy of the UVCoord object passed in parameter to the local object.

Parameters
p_oUV:UVCoord
length()method 
public function length():Number

Returns
Number
normalize()method 
public function normalize():void
scale()method 
public function scale(p_nFactor:Number):void

Scale the texture coords values by a factor.

Parameters
p_nFactor:Number — The factor
sub()method 
public function sub(p_oUV:UVCoord):void

Substract the UVCoord passed as parameter to the current UVCoord.

Parameters
p_oUV:UVCoord — The UVCoord to substract
toString()method 
public function toString():String

Returns a string representing this UVCoord.

Returns
String — The string representation