NVIDIA OptiX 8.1 nvidia_logo_transpbg.gif Up
OptixSRTMotionTransform Struct Reference

#include <optix_types.h>

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:

... // 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 )
struct OptixSRTData OptixSRTData
Represents an SRT transformation.
struct OptixSRTMotionTransform OptixSRTMotionTransform
Represents an SRT motion transformation.
unsigned short numKeys
If numKeys > 1, motion is enabled. timeBegin, timeEnd and flags are all ignored when motion is disabl...
Definition: optix_types.h:1314
Represents an SRT transformation.
Definition: optix_types.h:1494
Represents an SRT motion transformation.
Definition: optix_types.h:1531
OptixMotionOptions motionOptions
The motion options for this transformation Must have at least two motion keys.
Definition: optix_types.h:1537
OptixSRTData srtData[2]
The actual SRT data describing the transformation.
Definition: optix_types.h:1543
See also
optixConvertPointerToTraversableHandle()

Member Data Documentation

 child

OptixTraversableHandle OptixSRTMotionTransform::child

The traversable transformed by this transformation.

 motionOptions

OptixMotionOptions OptixSRTMotionTransform::motionOptions

The motion options for this transformation Must have at least two motion keys.

 pad

unsigned int OptixSRTMotionTransform::pad[3]

Padding to make the SRT data 16 byte aligned.

 srtData

OptixSRTData OptixSRTMotionTransform::srtData[2]

The actual SRT data describing the transformation.