NVIDIA OptiX 7.2 API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
OptixSRTMotionTransform Struct Reference

Public Attributes

OptixTraversableHandle child
OptixMotionOptions motionOptions
unsigned int pad [3]
OptixSRTData srtData [2]

Detailed Description

Represents an SRT motion transformation.

The device address of instances of this type must be a multiple of OPTIX_TRANSFORM_BYTE_ALIGNMENT.

This struct, as defined here, handles only N=2 motion keys due to the fixed array length of its srtData member. The following example shows how to create instances for an arbitrary number N of motion keys:

OptixSRTData srtData[N];
... // setup srtData
size_t transformSizeInBytes = sizeof( OptixSRTMotionTransform ) + ( N-2 ) * sizeof( OptixSRTData );
OptixSRTMotionTransform* srtMotionTransform = (OptixSRTMotionTransform*) malloc( transformSizeInBytes );
memset( srtMotionTransform, 0, transformSizeInBytes );
... // setup other members of srtMotionTransform
srtMotionTransform->motionOptions.numKeys = N;
memcpy( srtMotionTransform->srtData, srtData, N * sizeof( OptixSRTData ) );
... // copy srtMotionTransform to device memory
free( srtMotionTransform )
See Also

Member Data Documentation

OptixTraversableHandle OptixSRTMotionTransform::child

The traversable transformed by this transformation.

OptixMotionOptions OptixSRTMotionTransform::motionOptions

The motion options for this transformation.

unsigned int OptixSRTMotionTransform::pad[3]

Padding to make the SRT data 16 byte aligned.

OptixSRTData OptixSRTMotionTransform::srtData[2]

The actual SRT data describing the transformation.