Quat
Class
Extends ValueType
Module: cc
Representation of 2D vectors and points.
Index
Properties
x
Number
y
Number
z
Number
w
Number
Methods
constructor
Constructor
clone
clone a Quat object and return the new object
set
Set values with another quaternion
equals
Check whether current quaternion equals another
toEuler
Convert quaternion to euler
fromEuler
Convert euler to quaternion
lerp
Calculate the interpolation result between this quaternion and another one with given ratio
lerp
Calculate the multiply result between this quaternion and another one
rotateAround
Rotates a quaternion by the given angle (in radians) about a world space axis.
toString
TODO
Details
Properties
x
y
z
w
Methods
constructor
Constructor
see cc.quat
Parameters
clone
clone a Quat object and return the new object
set
Set values with another quaternion
Parameters
newValue
Quat !#en new value to set. !#zh 要设置的新值
equals
Check whether current quaternion equals another
Parameters
toEuler
Convert quaternion to euler
Parameters
fromEuler
Convert euler to quaternion
Parameters
lerp
Calculate the interpolation result between this quaternion and another one with given ratio
Parameters
lerp
Calculate the multiply result between this quaternion and another one
Parameters
rotateAround
Rotates a quaternion by the given angle (in radians) about a world space axis.
Parameters
rot
Quat Quaternion to rotate
axis
Vec3 The axis around which to rotate in world space
rad
Number Angle (in radians) to rotate
out
Quat Quaternion to store result
toString
TODO