Documentation

Classes

Class CL3D.Quaternion

Quaternion class for representing rotations

Class Overview
CL3D.Quaternion(x, y, z, w)
Quaternion class for representing rotations
Parameters:
x
y
z
w

Field Summary
Field Attributes Field Name and Description
 
W
W component of the Quaternion
 
X
X component of the Quaternion
 
Y
Y component of the Quaternion
 
Z
Z component of the Quaternion
Method Summary
Method Attributes Method Name and Description
 
Addition operator, adds another quaternion to this one
 
Creates a clone of this Quaternion
 
copyTo(tgt)
Copies the content of this Quaternion to a target Quaternion
 
calculates to dot product with another quaternion
 
Creates a matrix from this quaternion
 
Multiplication operator, multiplies with a float (scalar).
 
 
setFromEuler(dest, y, z)
Sets the quaternion from euler coordinates
 
slerp(q1, q2, time)
set this quaternion to the result of the interpolation between two quaternions.
 
toEuler(dest)
Fills a 3D vector with euler coodinates representing this quaternion
Field Detail
{Number} W
W component of the Quaternion

{Number} X
X component of the Quaternion

{Number} Y
Y component of the Quaternion

{Number} Z
Z component of the Quaternion
Method Detail
addToThis(b)
Addition operator, adds another quaternion to this one
Parameters:
b

clone()
Creates a clone of this Quaternion

copyTo(tgt)
Copies the content of this Quaternion to a target Quaternion
Parameters:
tgt

dotProduct(q2)
calculates to dot product with another quaternion
Parameters:
q2

getMatrix()
Creates a matrix from this quaternion

multiplyWith(s)
Multiplication operator, multiplies with a float (scalar).
Parameters:
s

normalize()

setFromEuler(dest, y, z)
Sets the quaternion from euler coordinates
Parameters:
{CL3D.Vect3d} dest
3d vector to be filled with the euler coordinates
y
z

slerp(q1, q2, time)
set this quaternion to the result of the interpolation between two quaternions. Time is a float between 0 and 1
Parameters:
q1
q2
time

toEuler(dest)
Fills a 3D vector with euler coodinates representing this quaternion
Parameters:
{CL3D.Vect3d} dest
3d vector to be filled with the euler coordinates

© 2011-2018 N.Gebhardt, Ambiera
Documentation generated by JsDoc Toolkit