Orient class, available in: Global context3D orientation, stored as 3x3 matrix.This class has 29 members:
sdleiF
XYZ angles ROEuler angles representation
string toString ROtextual form
Vector toVector ROvector representationfor serialization
XYZ x ROx vector
float xxorientation.x.x
float xyorientation.x.y
float xzorientation.x.z
XYZ y ROy vector
float yxorientation.y.x
float yyorientation.y.y
float yzorientation.y.z
XYZ z ROz vector
float zxorientation.z.x
float zyorientation.z.y
float zzorientation.z.z
snoitcnuF
function between2(Orient, Orient, float amount)doesn't return a valueinterpolate orientationThe calling Orient receives the orientation interpolated from 2 input orientations.
Example:
var o1=Orient.new(), o2=Orient.new(), o3=Orient.new();
o2.rotate3(0,Math.pi/2,0);
o3.between2(o1,o2,0); // o3 equals o2
o3.between2(o1,o2,1); // o3 equals o1
o3.between2(o1,o2,0.5); // o3 is halfway between o1 and o2
function betweenOV(Orient, XYZ, float amount)doesn't return a valueinterpolate orientationLike between2(), but the second Orient is composed of the supplied XYZ vector (X component) and Y Z vectors from the calling object.
Example:
var o=Orient.new();
o.betweenOV(o,(0,1,0),1); //no change, o remains 100 010 001
o.betweenOV(o,(0,1,0),0.9); //o is slightly rotated towards (0,1,0)
o.betweenOV(o,(0,1,0),0); //o is completely transformed, o.x=(0,1,0)
function clone()returns Orientcreate new Orient object
function localToWorld(XYZ point, XYZ center)returns XYZtransform coordinates
function lookAt(XYZ direction, XYZ up)doesn't return a valuecalculate rotation from 2 vectors
function new()returns Orientcreate new Orient object
function newFromVector(Vector)returns Orientcreate new Orient object
function normalize()doesn't return a valuenormalize
function reset()doesn't return a valueset identity matrix
function revRotate(Orient)doesn't return a valuereverse rotate using Orient object
function rotate(Orient)doesn't return a valuerotate using Orient object
function rotate3(float x, float y, float z)doesn't return a valuerotate around 3 axes
function set(Orient)doesn't return a valuecopy from another Orient object
function worldToLocal(XYZ point, XYZ center)returns XYZtransform coordinates
Global context