NVIDIA OptiX 6.5 API nvidia_logo_transpbg.gif Up
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
optix::Quaternion Class Reference

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
 

Detailed Description

Quaternion.

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.

Constructor & Destructor Documentation

OPTIXU_INLINE RT_HOSTDEVICE optix::Quaternion::Quaternion ( )

Construct identity quaternion

OPTIXU_INLINE RT_HOSTDEVICE optix::Quaternion::Quaternion ( float  x,
float  y,
float  z,
float 
)

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)

Member Function Documentation

OPTIXU_INLINE RT_HOSTDEVICE void optix::Quaternion::toMatrix ( float  m[16]) const

From quaternion to rotation matrix

Member Data Documentation

float4 optix::Quaternion::m_q

quaternion x, y, z, w