Quat Class

Extends ValueType

Module: cc Parent 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
  • quat The convenience method to create a new cc.Quat.
  • toString TODO

Details

Properties

x
meta description
Type Number
Defined in cocos2d/core/value-types/quat.js:69
y
meta description
Type Number
Defined in cocos2d/core/value-types/quat.js:72
z
meta description
Type Number
Defined in cocos2d/core/value-types/quat.js:75
w
meta description
Type Number
Defined in cocos2d/core/value-types/quat.js:78

Methods

constructor

Constructor see cc.quat

meta description
Defined in cocos2d/core/value-types/quat.js:42
Parameters
clone

clone a Quat object and return the new object

meta description
Returns Quat
Defined in cocos2d/core/value-types/quat.js:85
set

Set values with another quaternion

meta description
Returns Quat
Defined in cocos2d/core/value-types/quat.js:95
Parameters
  • newValue Quat !#en new value to set. !#zh 要设置的新值
equals

Check whether current quaternion equals another

meta description
Returns Boolean
Defined in cocos2d/core/value-types/quat.js:111
Parameters
toEuler

Convert quaternion to euler

meta description
Returns Vec3
Defined in cocos2d/core/value-types/quat.js:122
Parameters
fromEuler

Convert euler to quaternion

meta description
Returns Quat
Defined in cocos2d/core/value-types/quat.js:134
Parameters
lerp

Calculate the interpolation result between this quaternion and another one with given ratio

meta description
Defined in cocos2d/core/value-types/quat.js:146
Parameters
lerp

Calculate the multiply result between this quaternion and another one

meta description
Defined in cocos2d/core/value-types/quat.js:160
Parameters
quat

The convenience method to create a new cc.Quat.

meta description
Returns Quat
Defined in cocos2d/core/value-types/quat.js:174
Parameters
toString

TODO

meta description
Returns string
Defined in cocos2d/core/value-types/value-type.js:97

results matching ""

    No results matching ""