OptiX
3.9
NVIDIA OptiX Acceleration Engine
|
The Handle class is a reference counted handle class used to manipulate API objects.
All interaction with API objects should be done via these handles and the associated typedefs rather than direct usage of the objects.
Public Member Functions | |
Handle () | |
Handle (T *ptr) | |
template<class U > | |
Handle (U *ptr) | |
Handle (const Handle< T > ©) | |
template<class U > | |
Handle (const Handle< U > ©) | |
Handle< T > & | operator= (const Handle< T > ©) |
template<class U > | |
Handle< T > & | operator= (const Handle< U > ©) |
~Handle () | |
T * | operator-> () |
const T * | operator-> () const |
T * | get () |
const T * | get () const |
operator bool () const | |
Handle< VariableObj > | operator[] (const std::string &varname) |
Handle< VariableObj > | operator[] (const char *varname) |
Static Public Member Functions | |
static Handle< T > | take (typename T::api_t p) |
static Handle< T > | take (RTobject p) |
static Handle< T > | create () |
static Handle< T > | create (const std::string &a, const std::string &b, const std::string &c) |
static unsigned int | getDeviceCount () |
Handle< VariableObj > optix::Handle< T >::operator[] | ( | const std::string & | varname | ) |
Variable access operator. This operator will query the API object for a variable with the given name, creating a new variable instance if necessary. Only valid for ScopedObjs.
Handle< VariableObj > optix::Handle< T >::operator[] | ( | const char * | varname | ) |
Variable access operator. Identical to operator[](const std::string& varname)
Explicitly define char* version to avoid ambiguities between builtin operator[](int, char*) and Handle::operator[]( std::string ). The problem lies in that a Handle can be cast to a bool then to an int which implies that:
can be interpreted as either
or
|
inlinestatic |
Special version that takes an RTobject which must be cast up to the appropriate OptiX API opaque type.