Public Member Functions | |
RT_HOSTDEVICE | Quaternion () |
RT_HOSTDEVICE | Quaternion (float x, float y, float z, float w) |
RT_HOSTDEVICE | Quaternion (float4 v) |
RT_HOSTDEVICE | Quaternion (const Quaternion &other) |
RT_HOSTDEVICE | Quaternion (const float3 &axis, float angle) |
RT_HOSTDEVICE void | toMatrix (float m[16]) const |
Public Attributes | |
float4 | m_q |
Description
Quaternion is a utility class for handling quaternions which are primarily useful for representing directions and rotations.
History
Quaternion was introduced in OptiX 5.0.
OPTIXU_INLINE RT_HOSTDEVICE optix::Quaternion::Quaternion | ( | ) |
Construct identity quaternion
OPTIXU_INLINE RT_HOSTDEVICE optix::Quaternion::Quaternion | ( | float | x, |
float | y, | ||
float | z, | ||
float | w | ||
) |
Construct from coordinates x, y, z, w
OPTIXU_INLINE RT_HOSTDEVICE optix::Quaternion::Quaternion | ( | float4 | v) |
Construct from float4
OPTIXU_INLINE RT_HOSTDEVICE optix::Quaternion::Quaternion | ( | const Quaternion & | other) |
Copy constructor
OPTIXU_INLINE RT_HOSTDEVICE optix::Quaternion::Quaternion | ( | const float3 & | axis, |
float | angle | ||
) |
Construct from axis and angle (in degrees)
OPTIXU_INLINE RT_HOSTDEVICE void optix::Quaternion::toMatrix | ( | float | m[16]) | const |
From quaternion to rotation matrix
float4 optix::Quaternion::m_q |
quaternion x, y, z, w