home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Esportes
/
CrossingCup.swf
/
scripts
/
__Packages
/
sandy
/
math
/
VertexMath.as
< prev
Wrap
Text File
|
2007-12-11
|
840b
|
32 lines
class sandy.math.VertexMath extends sandy.math.VectorMath
{
function VertexMath()
{
super();
}
static function negate(v)
{
return new sandy.core.data.Vertex(- v.x,- v.y,- v.z);
}
static function dot(v, w)
{
return v.tx * w.tx + v.ty * w.ty + w.tz * v.tz;
}
static function addVertex(v, w)
{
return new sandy.core.data.Vertex(v.x + w.x,v.y + w.y,v.z + w.z);
}
static function sub(v, w)
{
return new sandy.core.data.Vertex(v.x - w.x,v.y - w.y,v.z - w.z,v.tx - w.tx,v.ty - w.ty,v.tz - w.tz);
}
static function cross(w, v)
{
return new sandy.core.data.Vertex(w.y * v.z - w.z * v.y,w.z * v.x - w.x * v.z,w.x * v.y - w.y * v.x);
}
static function clone(v)
{
return new sandy.core.data.Vertex(v.x,v.y,v.z);
}
}