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 Obtaining copy specified quaternion
  • copy Copy quaternion target
  • set Provided Quaternion Value
  • identity The target of an assignment as a unit quaternion
  • rotationTo Set quaternion rotation is the shortest path between two vectors, the default two vectors are normalized
  • getAxisAngle Get the rotary shaft and the arc of rotation quaternion
  • multiply Quaternion multiplication
  • multiplyScalar Quaternion scalar multiplication
  • scaleAndAdd Quaternion multiplication and addition: A + B * scale
  • rotateX About the X axis specified quaternion
  • rotateY Rotation about the Y axis designated quaternion
  • rotateZ Around the Z axis specified quaternion
  • rotateAround Space around the world at a given axis of rotation quaternion
  • rotateAroundLocal Local space around the specified axis rotation quaternion
  • calculateW The component w xyz components calculated, normalized by default
  • dot Quaternion dot product (scalar product)
  • lerp Element by element linear interpolation: A + t * (B - A)
  • sqlerp Quaternion with two spherical interpolation control points
  • invert Quaternion inverse
  • conjugate Conjugating a quaternion, and the unit quaternion equivalent to inversion, but more efficient
  • len Seek length quaternion
  • lengthSqr Seeking quaternion square of the length
  • normalize Normalized quaternions
  • fromAxes Calculated according to the local orientation quaternion coordinate axis, the default three vectors are normalized and mutually perpendicular
  • fromViewUp The forward direction and the direction of the viewport computing quaternion
  • fromAxisAngle The quaternion calculated and the arc of rotation of the rotary shaft
  • `` Set a quaternion from the given euler angle 0, 0, z.
  • fromMat3 Calculating the three-dimensional quaternion matrix information, default zoom information input matrix does not contain
  • fromEuler The quaternion calculated Euler angle information, rotation order YZX
  • toAxisX This returns the result of the quaternion coordinate system X-axis vector
  • toAxisY This returns the result of the quaternion coordinate system Y axis vector
  • toAxisZ This returns the result of the quaternion coordinate system the Z-axis vector
  • toEuler The quaternion calculated Euler angles, return angle x, y in the [-180, 180] interval, z default the range [-90, 90] interval, the rotation order YZX
  • strictEquals Analyzing quaternion equivalent
  • equals Negative floating point error quaternion approximately equivalent Analyzing
  • toArray Quaternion rotation array
  • fromArray Array to a quaternion
  • 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
  • multiply 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 Convert to a readable string.

Details

Properties

x
meta description
Type Number
Defined in cocos2d/core/value-types/quat.ts:837
y
meta description
Type Number
Defined in cocos2d/core/value-types/quat.ts:841
z
meta description
Type Number
Defined in cocos2d/core/value-types/quat.ts:845
w
meta description
Type Number
Defined in cocos2d/core/value-types/quat.ts:849

Methods

constructor

Constructor see cc.quat

meta description
Defined in cocos2d/core/value-types/quat.ts:49
Parameters
clone

Obtaining copy specified quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:72
copy

Copy quaternion target

meta description
Defined in cocos2d/core/value-types/quat.ts:84
set

Provided Quaternion Value

meta description
Defined in cocos2d/core/value-types/quat.ts:100
identity

The target of an assignment as a unit quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:116
rotationTo

Set quaternion rotation is the shortest path between two vectors, the default two vectors are normalized

meta description
Defined in cocos2d/core/value-types/quat.ts:132
getAxisAngle

Get the rotary shaft and the arc of rotation quaternion

meta description
Returns Unknown
Defined in cocos2d/core/value-types/quat.ts:166
Parameters
  • outAxis Unknown 旋转轴输出
  • q Unknown 源四元数
multiply

Quaternion multiplication

meta description
Defined in cocos2d/core/value-types/quat.ts:193
multiplyScalar

Quaternion scalar multiplication

meta description
Defined in cocos2d/core/value-types/quat.ts:213
scaleAndAdd

Quaternion multiplication and addition: A + B * scale

meta description
Defined in cocos2d/core/value-types/quat.ts:229
rotateX

About the X axis specified quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:245
Parameters
  • rad Unknown 旋转弧度
rotateY

Rotation about the Y axis designated quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:267
Parameters
  • rad Unknown 旋转弧度
rotateZ

Around the Z axis specified quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:289
Parameters
  • rad Unknown 旋转弧度
rotateAround

Space around the world at a given axis of rotation quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:311
Parameters
  • axis Unknown 旋转轴,默认已归一化
  • rad Unknown 旋转弧度
rotateAroundLocal

Local space around the specified axis rotation quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:331
Parameters
  • axis Unknown 旋转轴
  • rad Unknown 旋转弧度
calculateW

The component w xyz components calculated, normalized by default

meta description
Defined in cocos2d/core/value-types/quat.ts:347
dot

Quaternion dot product (scalar product)

meta description
Defined in cocos2d/core/value-types/quat.ts:364
lerp

Element by element linear interpolation: A + t * (B - A)

meta description
Defined in cocos2d/core/value-types/quat.ts:376
sqlerp

Quaternion with two spherical interpolation control points

meta description
Defined in cocos2d/core/value-types/quat.ts:437
invert

Quaternion inverse

meta description
Defined in cocos2d/core/value-types/quat.ts:452
conjugate

Conjugating a quaternion, and the unit quaternion equivalent to inversion, but more efficient

meta description
Defined in cocos2d/core/value-types/quat.ts:473
len

Seek length quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:489
lengthSqr

Seeking quaternion square of the length

meta description
Defined in cocos2d/core/value-types/quat.ts:501
normalize

Normalized quaternions

meta description
Defined in cocos2d/core/value-types/quat.ts:513
fromAxes

Calculated according to the local orientation quaternion coordinate axis, the default three vectors are normalized and mutually perpendicular

meta description
Defined in cocos2d/core/value-types/quat.ts:533
fromViewUp

The forward direction and the direction of the viewport computing quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:550
Parameters
  • view Unknown 视口面向的前方向,必须归一化
  • up Unknown 视口的上方向,必须归一化,默认为 (0, 1, 0)
fromAxisAngle

The quaternion calculated and the arc of rotation of the rotary shaft

meta description
Defined in cocos2d/core/value-types/quat.ts:565

Set a quaternion from the given euler angle 0, 0, z.

meta description
Defined in cocos2d/core/value-types/quat.ts:583
Parameters
  • out Quat Quaternion to store result.
  • z number Angle to rotate around Z axis in degrees.
fromMat3

Calculating the three-dimensional quaternion matrix information, default zoom information input matrix does not contain

meta description
Defined in cocos2d/core/value-types/quat.ts:598
fromEuler

The quaternion calculated Euler angle information, rotation order YZX

meta description
Defined in cocos2d/core/value-types/quat.ts:650
toAxisX

This returns the result of the quaternion coordinate system X-axis vector

meta description
Defined in cocos2d/core/value-types/quat.ts:678
toAxisY

This returns the result of the quaternion coordinate system Y axis vector

meta description
Defined in cocos2d/core/value-types/quat.ts:696
toAxisZ

This returns the result of the quaternion coordinate system the Z-axis vector

meta description
Defined in cocos2d/core/value-types/quat.ts:715
toEuler

The quaternion calculated Euler angles, return angle x, y in the [-180, 180] interval, z default the range [-90, 90] interval, the rotation order YZX

meta description
Defined in cocos2d/core/value-types/quat.ts:734
Parameters
  • outerZ Unknown z 取值范围区间改为 [-180, -90] U [90, 180]
strictEquals

Analyzing quaternion equivalent

meta description
Defined in cocos2d/core/value-types/quat.ts:774
equals

Negative floating point error quaternion approximately equivalent Analyzing

meta description
Defined in cocos2d/core/value-types/quat.ts:786
toArray

Quaternion rotation array

meta description
Defined in cocos2d/core/value-types/quat.ts:802
Parameters
  • ofs Unknown 数组内的起始偏移量
fromArray

Array to a quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:819
Parameters
  • ofs Unknown 数组起始偏移量
clone

clone a Quat object and return the new object

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

Set values with another quaternion

meta description
Returns Quat
Defined in cocos2d/core/value-types/quat.ts:881
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.ts:897
Parameters
toEuler

Convert quaternion to euler

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

Convert euler to quaternion

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

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

meta description
Returns Quat
Defined in cocos2d/core/value-types/quat.ts:930
Parameters
multiply

Calculate the multiply result between this quaternion and another one

meta description
Returns Quat
Defined in cocos2d/core/value-types/quat.ts:945
Parameters
rotateAround

Rotates a quaternion by the given angle (in radians) about a world space axis.

meta description
Returns Quat
Defined in cocos2d/core/value-types/quat.ts:956
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

Convert to a readable string.

meta description
Returns string
Defined in cocos2d/core/value-types/value-type.ts:92

results matching ""

    No results matching ""