C# 클래스 QualisysRealTime.Unity.Skeleton.QuaternionHelper2

파일 보기 프로젝트 열기: qualisys/Qualisys-Unity-SDK 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Zero Quaternion
precision float

공개 메소드들

메소드 설명
DifferenceBetween ( Quaternion right, Quaternion left ) : float

Calculates the difference in rotation between two Quaternions if result is 0, there is no difference between the Quaternions if the results is 1, the difference is 180 degrees difference

FromMatrix ( Matrix4 matrix ) : Quaternion

Builds a quaternion from the given rotation matrix

FromMatrix ( Matrix4 &matrix, Quaternion &result ) : void

Builds a quaternion from the given rotation matrix

GetOrientation ( OpenTK.Vector3 forwardPoint, OpenTK.Vector3 leftPoint, OpenTK.Vector3 rightPoint ) : Quaternion

Get orientation of three points, where on point defines forward

GetOrientationFromYX ( OpenTK.Vector3 y, OpenTK.Vector3 x ) : Quaternion

Get quaternion with front and right vector

GetOrientationFromZY ( OpenTK.Vector3 z, OpenTK.Vector3 y ) : Quaternion

Get quaternion with front and right vector

GetRotationBetween ( OpenTK.Vector3 a, OpenTK.Vector3 b, float stiffness = 1f ) : Quaternion

Returns a quaternion representing the rotation from vector a to b Robust, does not return NaN

IsNaN ( this q ) : bool

Check if any element in quaternion is NaN

LookAtRight ( OpenTK.Vector3 source, OpenTK.Vector3 target, OpenTK.Vector3 x ) : Quaternion

Get quaternion with rotation as Y axis from source towards target and X close to right parameter

LookAtUp ( OpenTK.Vector3 source, OpenTK.Vector3 target, OpenTK.Vector3 z ) : Quaternion

Get quaternion with rotation as Y axis towards target as close as z parameter as possible

Rotate ( Quaternion quaternion, OpenTK.Vector3 vec ) : OpenTK.Vector3
RotationBetween ( OpenTK.Vector3 from, OpenTK.Vector3 to ) : Quaternion

Returns a quaternion representing the rotation between vectors Not robust, but faster

RotationX ( float radians ) : Quaternion

Rotation around X axis

RotationY ( float radians ) : Quaternion

Rotation around Y axis

RotationZ ( float radians ) : Quaternion

Rotation around Z axis

메소드 상세

DifferenceBetween() 공개 정적인 메소드

Calculates the difference in rotation between two Quaternions if result is 0, there is no difference between the Quaternions if the results is 1, the difference is 180 degrees difference
public static DifferenceBetween ( Quaternion right, Quaternion left ) : float
right Quaternion
left Quaternion
리턴 float

FromMatrix() 공개 정적인 메소드

Builds a quaternion from the given rotation matrix
public static FromMatrix ( Matrix4 matrix ) : Quaternion
matrix Matrix4 A rotation matrix
리턴 Quaternion

FromMatrix() 공개 정적인 메소드

Builds a quaternion from the given rotation matrix
public static FromMatrix ( Matrix4 &matrix, Quaternion &result ) : void
matrix Matrix4 A rotation matrix
result Quaternion The equivalent quaternion
리턴 void

GetOrientation() 공개 정적인 메소드

Get orientation of three points, where on point defines forward
public static GetOrientation ( OpenTK.Vector3 forwardPoint, OpenTK.Vector3 leftPoint, OpenTK.Vector3 rightPoint ) : Quaternion
forwardPoint OpenTK.Vector3
leftPoint OpenTK.Vector3
rightPoint OpenTK.Vector3
리턴 Quaternion

GetOrientationFromYX() 공개 정적인 메소드

Get quaternion with front and right vector
public static GetOrientationFromYX ( OpenTK.Vector3 y, OpenTK.Vector3 x ) : Quaternion
y OpenTK.Vector3
x OpenTK.Vector3
리턴 Quaternion

GetOrientationFromZY() 공개 정적인 메소드

Get quaternion with front and right vector
public static GetOrientationFromZY ( OpenTK.Vector3 z, OpenTK.Vector3 y ) : Quaternion
z OpenTK.Vector3
y OpenTK.Vector3
리턴 Quaternion

GetRotationBetween() 공개 정적인 메소드

Returns a quaternion representing the rotation from vector a to b Robust, does not return NaN
public static GetRotationBetween ( OpenTK.Vector3 a, OpenTK.Vector3 b, float stiffness = 1f ) : Quaternion
a OpenTK.Vector3 The first vector
b OpenTK.Vector3 The secound vector
stiffness float Stiffness value
리턴 Quaternion

IsNaN() 공개 정적인 메소드

Check if any element in quaternion is NaN
public static IsNaN ( this q ) : bool
q this
리턴 bool

LookAtRight() 공개 정적인 메소드

Get quaternion with rotation as Y axis from source towards target and X close to right parameter
public static LookAtRight ( OpenTK.Vector3 source, OpenTK.Vector3 target, OpenTK.Vector3 x ) : Quaternion
source OpenTK.Vector3 Position vector to look from
target OpenTK.Vector3 Position vector to look at
x OpenTK.Vector3
리턴 Quaternion

LookAtUp() 공개 정적인 메소드

Get quaternion with rotation as Y axis towards target as close as z parameter as possible
public static LookAtUp ( OpenTK.Vector3 source, OpenTK.Vector3 target, OpenTK.Vector3 z ) : Quaternion
source OpenTK.Vector3 The source position vector to look from
target OpenTK.Vector3
z OpenTK.Vector3
리턴 Quaternion

Rotate() 공개 정적인 메소드

public static Rotate ( Quaternion quaternion, OpenTK.Vector3 vec ) : OpenTK.Vector3
quaternion Quaternion
vec OpenTK.Vector3
리턴 OpenTK.Vector3

RotationBetween() 공개 정적인 메소드

Returns a quaternion representing the rotation between vectors Not robust, but faster
public static RotationBetween ( OpenTK.Vector3 from, OpenTK.Vector3 to ) : Quaternion
from OpenTK.Vector3 The vetor the rotation start from
to OpenTK.Vector3 The vector the quaternion should result in if from vector was transformed by the resulting Quaternion
리턴 Quaternion

RotationX() 공개 정적인 메소드

Rotation around X axis
public static RotationX ( float radians ) : Quaternion
radians float rotation amount
리턴 Quaternion

RotationY() 공개 정적인 메소드

Rotation around Y axis
public static RotationY ( float radians ) : Quaternion
radians float rotation amount
리턴 Quaternion

RotationZ() 공개 정적인 메소드

Rotation around Z axis
public static RotationZ ( float radians ) : Quaternion
radians float rotation amount
리턴 Quaternion

프로퍼티 상세

Zero 공개적으로 정적으로 프로퍼티

Defines the zero quaternion.
public static Quaternion Zero
리턴 Quaternion

precision 공개적으로 정적으로 프로퍼티

public static float precision
리턴 float