All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdEmbreeRTCBufferAllocator Class Reference

Utility class to track which embree user vertex buffers are currently in use. More...

Public Member Functions

 HdEmbreeRTCBufferAllocator ()
 Constructor. By default, set everything to unallocated. More...
 
int Allocate ()
 Allocate a buffer by finding the first clear bit, using that as the buffer number, and setting the bit to mark it as used. More...
 
void Free (int buffer)
 Free a buffer by clearing its bit. More...
 
unsigned int NumBuffers ()
 Query how many buffers are currently in user for this geometry. More...
 

Static Public Attributes

static constexpr int PXR_MAX_USER_VERTEX_BUFFERS = 16
 As of Embree3 the number of buffers was greatly increased however the maximum is only defined locally to the library as of v3.4.0 this was the number. More...
 

Detailed Description

Utility class to track which embree user vertex buffers are currently in use.

Definition at line 41 of file meshSamplers.h.

Constructor & Destructor Documentation

Constructor. By default, set everything to unallocated.

Definition at line 45 of file meshSamplers.h.

Member Function Documentation

int Allocate ( )

Allocate a buffer by finding the first clear bit, using that as the buffer number, and setting the bit to mark it as used.

Returns
An unused RTC user vertex buffer id, or -1 on failure.
void Free ( int  buffer)

Free a buffer by clearing its bit.

Parameters
bufferThe buffer to mark as unused.
unsigned int NumBuffers ( )

Query how many buffers are currently in user for this geometry.

Member Data Documentation

constexpr int PXR_MAX_USER_VERTEX_BUFFERS = 16
static

As of Embree3 the number of buffers was greatly increased however the maximum is only defined locally to the library as of v3.4.0 this was the number.

Definition at line 63 of file meshSamplers.h.


The documentation for this class was generated from the following file: