NVIDIA OptiX 7.7 nvidia_logo_transpbg.gif Up
OptixBuildInputTriangleArray Struct Reference

#include <optix_types.h>

Public Attributes

const CUdeviceptrvertexBuffers
 
unsigned int numVertices
 
OptixVertexFormat vertexFormat
 
unsigned int vertexStrideInBytes
 
CUdeviceptr indexBuffer
 
unsigned int numIndexTriplets
 
OptixIndicesFormat indexFormat
 
unsigned int indexStrideInBytes
 
CUdeviceptr preTransform
 
const unsigned int * flags
 
unsigned int numSbtRecords
 
CUdeviceptr sbtIndexOffsetBuffer
 
unsigned int sbtIndexOffsetSizeInBytes
 
unsigned int sbtIndexOffsetStrideInBytes
 
unsigned int primitiveIndexOffset
 
OptixTransformFormat transformFormat
 
OptixBuildInputOpacityMicromap opacityMicromap
 
OptixBuildInputDisplacementMicromap displacementMicromap
 

Detailed Description

Triangle inputs.

See also
OptixBuildInput::triangleArray

Member Data Documentation

 displacementMicromap

OptixBuildInputDisplacementMicromap OptixBuildInputTriangleArray::displacementMicromap

Optional displacement micromap inputs.

 flags

const unsigned int* OptixBuildInputTriangleArray::flags

Array of flags, to specify flags per sbt record, combinations of OptixGeometryFlags describing the primitive behavior, size must match numSbtRecords.

 indexBuffer

CUdeviceptr OptixBuildInputTriangleArray::indexBuffer

Optional pointer to array of 16 or 32-bit int triplets, one triplet per triangle. The minimum alignment must match the natural alignment of the type as specified in the indexFormat, i.e., for OPTIX_INDICES_FORMAT_UNSIGNED_INT3 4-byte and for OPTIX_INDICES_FORMAT_UNSIGNED_SHORT3 a 2-byte alignment.

 indexFormat

OptixIndicesFormat OptixBuildInputTriangleArray::indexFormat

 indexStrideInBytes

unsigned int OptixBuildInputTriangleArray::indexStrideInBytes

Stride between triplets of indices. If set to zero, indices are assumed to be tightly packed and stride is inferred from indexFormat.

 numIndexTriplets

unsigned int OptixBuildInputTriangleArray::numIndexTriplets

Size of array in OptixBuildInputTriangleArray::indexBuffer. For build, needs to be zero if indexBuffer is nullptr.

 numSbtRecords

unsigned int OptixBuildInputTriangleArray::numSbtRecords

Number of sbt records available to the sbt index offset override.

 numVertices

unsigned int OptixBuildInputTriangleArray::numVertices

Number of vertices in each of buffer in OptixBuildInputTriangleArray::vertexBuffers.

 opacityMicromap

OptixBuildInputOpacityMicromap OptixBuildInputTriangleArray::opacityMicromap

Optional opacity micromap inputs.

 preTransform

CUdeviceptr OptixBuildInputTriangleArray::preTransform

Optional pointer to array of floats representing a 3x4 row major affine transformation matrix. This pointer must be a multiple of OPTIX_GEOMETRY_TRANSFORM_BYTE_ALIGNMENT.

 primitiveIndexOffset

unsigned int OptixBuildInputTriangleArray::primitiveIndexOffset

Primitive index bias, applied in optixGetPrimitiveIndex(). Sum of primitiveIndexOffset and number of triangles must not overflow 32bits.

 sbtIndexOffsetBuffer

CUdeviceptr OptixBuildInputTriangleArray::sbtIndexOffsetBuffer

Device pointer to per-primitive local sbt index offset buffer. May be NULL. Every entry must be in range [0,numSbtRecords-1]. Size needs to be the number of primitives.

 sbtIndexOffsetSizeInBytes

unsigned int OptixBuildInputTriangleArray::sbtIndexOffsetSizeInBytes

Size of type of the sbt index offset. Needs to be 0, 1, 2 or 4 (8, 16 or 32 bit).

 sbtIndexOffsetStrideInBytes

unsigned int OptixBuildInputTriangleArray::sbtIndexOffsetStrideInBytes

Stride between the index offsets. If set to zero, the offsets are assumed to be tightly packed and the stride matches the size of the type (sbtIndexOffsetSizeInBytes).

 transformFormat

OptixTransformFormat OptixBuildInputTriangleArray::transformFormat

 vertexBuffers

const CUdeviceptr* OptixBuildInputTriangleArray::vertexBuffers

Points to host array of device pointers, one per motion step. Host array size must match the number of motion keys as set in OptixMotionOptions (or an array of size 1 if OptixMotionOptions::numKeys is set to 0 or 1). Each per motion key device pointer must point to an array of vertices of the triangles in the format as described by vertexFormat. The minimum alignment must match the natural alignment of the type as specified in the vertexFormat, i.e., for OPTIX_VERTEX_FORMAT_FLOATX 4-byte, for all others a 2-byte alignment. However, an 16-byte stride (and buffer alignment) is recommended for vertices of format OPTIX_VERTEX_FORMAT_FLOAT3 for GAS build performance.

 vertexFormat

OptixVertexFormat OptixBuildInputTriangleArray::vertexFormat

 vertexStrideInBytes

unsigned int OptixBuildInputTriangleArray::vertexStrideInBytes

Stride between vertices. If set to zero, vertices are assumed to be tightly packed and stride is inferred from vertexFormat.