|
OWL
OptiX7 Wrapper Library
|
#include <Variable.h>
Public Types | |
| typedef std::shared_ptr< Variable > | SP |
Public Types inherited from owl::Object | |
| typedef std::shared_ptr< Object > | SP |
Public Member Functions | |
| Variable (const OWLVarDecl *const varDecl) | |
| virtual void | set (const std::shared_ptr< Buffer > &value) |
| virtual void | set (const std::shared_ptr< Group > &value) |
| virtual void | set (const std::shared_ptr< Texture > &value) |
| virtual void | setRaw (const void *ptr) |
| virtual void | set (const int32_t &value) |
| virtual void | set (const vec2i &value) |
| virtual void | set (const vec3i &value) |
| virtual void | set (const vec4i &value) |
| virtual void | set (const uint32_t &value) |
| virtual void | set (const vec2ui &value) |
| virtual void | set (const vec3ui &value) |
| virtual void | set (const vec4ui &value) |
| virtual void | set (const int64_t &value) |
| virtual void | set (const vec2l &value) |
| virtual void | set (const vec3l &value) |
| virtual void | set (const vec4l &value) |
| virtual void | set (const uint64_t &value) |
| virtual void | set (const vec2ul &value) |
| virtual void | set (const vec3ul &value) |
| virtual void | set (const vec4ul &value) |
| virtual void | set (const float &value) |
| virtual void | set (const vec2f &value) |
| virtual void | set (const vec3f &value) |
| virtual void | set (const vec4f &value) |
| virtual void | set (const double &value) |
| virtual void | set (const vec2d &value) |
| virtual void | set (const vec3d &value) |
| virtual void | set (const vec4d &value) |
| virtual std::string | toString () const |
| void | mismatchingType () |
| virtual void | writeToSBT (uint8_t *sbtEntry, const DeviceContext::SP &device) const =0 |
Public Member Functions inherited from owl::Object | |
| Object () | |
| virtual DeviceData::SP | createOn (const std::shared_ptr< DeviceContext > &device) |
| void | createDeviceData (const std::vector< std::shared_ptr< DeviceContext >> &devices) |
| template<typename T > | |
| std::shared_ptr< T > | as () |
Static Public Member Functions | |
| static Variable::SP | createInstanceOf (const OWLVarDecl *decl) |
Public Attributes | |
| const OWLVarDecl *const | varDecl |
Public Attributes inherited from owl::Object | |
| const size_t | uniqueID |
| std::vector< DeviceData::SP > | deviceData |
Additional Inherited Members | |
Static Public Attributes inherited from owl::Object | |
| static std::atomic< uint64_t > | nextAvailableID |
"Variable"s are associated with objects, and hold user-supplied data of a given type. The purpose of this is to allow owl to internally populate device-side Shader Binding Table (SBT) entries based on host-side supplied parameters - ie, if sets a Group, Buffer, etc, parameter on the host, then we will automatically translate that to the respecitve device data (in these examples a OptiXTraversablaHandle, or device pointer) when we write it into the SBT.
To add some type-safety into OWL we create, for each paramter that the user declares for an object, a matching (templated) variable type; if the user then tries to set a variable of a different type than declared we'll throw a 'mismatchingType' expception
| typedef std::shared_ptr<Variable> owl::Variable::SP |
|
inline |
|
static |
creates an instance of this variable type to be attached to a given object - this instance will can then store the values that the user passes
creates a variable type that matches the given variable declaration
| void owl::Variable::mismatchingType | ( | ) |
throw an exception that the type the user tried to set doesn't math the type he/she declared
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in owl::UserTypeVariable.
|
inlinevirtual |
pretty-printer, for printf-debugging
Reimplemented from owl::Object.
|
pure virtual |
writes the device specific representation of the given type
Implemented in owl::TextureVariable, owl::GroupVariable, owl::BufferVariable, owl::DeviceIndexVariable, owl::BufferPointerVariable, owl::VariableT< T >, and owl::UserTypeVariable.
| const OWLVarDecl* const owl::Variable::varDecl |
the variable we're setting in the given object