OWL
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
owl::SBTObjectBase Struct Reference

#include <SBTObject.h>

Inheritance diagram for owl::SBTObjectBase:
owl::RegisteredObject owl::ContextObject owl::Object owl::SBTObject< GeomType > owl::SBTObject< LaunchParamsType > owl::SBTObject< MissProgType > owl::SBTObject< RayGenType > owl::SBTObject< ObjectType > owl::Geom owl::LaunchParams owl::MissProg owl::RayGen owl::CurvesGeom owl::SphereGeom owl::TrianglesGeom owl::UserGeom

Public Member Functions

 SBTObjectBase (Context *const context, ObjectRegistry &registry, std::shared_ptr< SBTObjectType > type)
 
bool hasVariable (const std::string &name)
 
Variable::SP getVariable (const std::string &name)
 
void writeVariables (uint8_t *sbtEntry, const DeviceContext::SP &device) const
 
- Public Member Functions inherited from owl::RegisteredObject
 RegisteredObject (Context *const context, ObjectRegistry &registry)
 
- Public Member Functions inherited from owl::ContextObject
 ContextObject (Context *const context)
 
std::string toString () const override
 
- Public Member Functions inherited from owl::Object
 Object ()
 
virtual std::string toString () const
 
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 ()
 

Public Attributes

std::shared_ptr< SBTObjectType > const type
 
const std::vector< Variable::SP > variables
 
- Public Attributes inherited from owl::RegisteredObject
int ID
 
ObjectRegistryregistry
 
- Public Attributes inherited from owl::ContextObject
Context *const context
 
- Public Attributes inherited from owl::Object
const size_t uniqueID
 
std::vector< DeviceData::SP > deviceData
 

Additional Inherited Members

- Public Types inherited from owl::ContextObject
typedef std::shared_ptr< ContextObjectSP
 
- Public Types inherited from owl::Object
typedef std::shared_ptr< ObjectSP
 
- Static Public Attributes inherited from owl::Object
static std::atomic< uint64_t > nextAvailableID
 

Detailed Description

abstract base classs for any object that can store variables and write itself into a device-side shader binding table (ie, raygen programs, closest hit programs, etc. Each SBTObjectBase has a type that describes its variables, but the actual work for subclasses of this type will be done in the subclass.

Constructor & Destructor Documentation

◆ SBTObjectBase()

owl::SBTObjectBase::SBTObjectBase ( Context *const  context,
ObjectRegistry registry,
std::shared_ptr< SBTObjectType type 
)

create a new SBTOBject with this type descriptor, and register it in that registry

Member Function Documentation

◆ getVariable()

Variable::SP owl::SBTObjectBase::getVariable ( const std::string &  name)
inline

return shared-ptr to this variable - should only be called for variables that we actually own

◆ hasVariable()

bool owl::SBTObjectBase::hasVariable ( const std::string &  name)
inline

returns whether this object has a variable of this name

◆ writeVariables()

void owl::SBTObjectBase::writeVariables ( uint8_t *  sbtEntryBase,
const DeviceContext::SP &  device 
) const

this function is arguably the heart of the owl variable layer: given an SBT Object's set of variables, create the SBT entry that writes the given variables' values into the specified format, prorperly translating per-device data (buffers, traversable) while doing so (also works for launch params, even though those, strictly speaking, are not part of the SBT)

Member Data Documentation

◆ type

std::shared_ptr<SBTObjectType> const owl::SBTObjectBase::type

our own type description, that tells us which variables (of which type, etc) we have

◆ variables

const std::vector<Variable::SP> owl::SBTObjectBase::variables

the actual variable values


The documentation for this struct was generated from the following files: