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
  • mul Calculate the multiply result between this quaternion and another one
  • 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:844
y
meta description
Type Number
Defined in cocos2d/core/value-types/quat.ts:848
z
meta description
Type Number
Defined in cocos2d/core/value-types/quat.ts:852
w
meta description
Type Number
Defined in cocos2d/core/value-types/quat.ts:856

Methods

constructor

Constructor see cc.quat

meta description
Defined in cocos2d/core/value-types/quat.ts:48
Parameters
mul

Calculate the multiply result between this quaternion and another one

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

Obtaining copy specified quaternion

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

Copy quaternion target

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

Provided Quaternion Value

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

The target of an assignment as a unit quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:123
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:139
getAxisAngle

Get the rotary shaft and the arc of rotation quaternion

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

Quaternion multiplication

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

Quaternion scalar multiplication

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

Quaternion multiplication and addition: A + B * scale

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

About the X axis specified quaternion

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

Rotation about the Y axis designated quaternion

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

Around the Z axis specified quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:296
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:318
Parameters
  • axis Unknown 旋转轴,默认已归一化
  • rad Unknown 旋转弧度
rotateAroundLocal

Local space around the specified axis rotation quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:338
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:354
dot

Quaternion dot product (scalar product)

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

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

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

Quaternion with two spherical interpolation control points

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

Quaternion inverse

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

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

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

Seek length quaternion

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

Seeking quaternion square of the length

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

Normalized quaternions

meta description
Defined in cocos2d/core/value-types/quat.ts:520
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:540
fromViewUp

The forward direction and the direction of the viewport computing quaternion

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

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

meta description
Defined in cocos2d/core/value-types/quat.ts:590
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:605
fromEuler

The quaternion calculated Euler angle information, rotation order YZX

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

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

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

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

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

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

meta description
Defined in cocos2d/core/value-types/quat.ts:722
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:741
Parameters
  • outerZ Unknown z 取值范围区间改为 [-180, -90] U [90, 180]
strictEquals

Analyzing quaternion equivalent

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

Negative floating point error quaternion approximately equivalent Analyzing

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

Quaternion rotation array

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

Array to a quaternion

meta description
Defined in cocos2d/core/value-types/quat.ts:826
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:878
set

Set values with another quaternion

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

Convert quaternion to euler

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

Convert euler to quaternion

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

Calculate the multiply result between this quaternion and another one

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