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

#include <SBTObject.h>

Inheritance diagram for owl::SBTObjectType:
owl::RegisteredObject owl::ContextObject owl::Object owl::GeomType owl::LaunchParamsType owl::MissProgType owl::RayGenType owl::CurvesGeomType owl::SphereGeomType owl::TrianglesGeomType owl::UserGeomType

Public Types

typedef std::shared_ptr< SBTObjectTypeSP
 
- Public Types inherited from owl::ContextObject
typedef std::shared_ptr< ContextObjectSP
 
- Public Types inherited from owl::Object
typedef std::shared_ptr< ObjectSP
 

Public Member Functions

 SBTObjectType (Context *const context, ObjectRegistry &registry, size_t varStructSize, const std::vector< OWLVarDecl > &varDecls)
 
virtual ~SBTObjectType ()
 
int getVariableIdx (const std::string &varName)
 
bool hasVariable (const std::string &varName)
 
std::string toString () const override
 
void declareVariable (const std::string &varName, OWLDataType type, size_t offset)
 
std::vector< Variable::SP > instantiateVariables ()
 
- 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

const size_t varStructSize
 
const std::vector< OWLVarDeclvarDecls
 
- 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

- Static Public Attributes inherited from owl::Object
static std::atomic< uint64_t > nextAvailableID
 

Detailed Description

base class for describing the 'type' (eg, set of named variabels, progrma name, etc) of anything that can store variables, and that will eithe be written into the SBT, or other device representations. Object types store the description of objects (eg, which variables they have, and how those are layouted in device memory, while actual objects (basically, the equivalent of C++ instances of tihs type) then store the values* for the given type

Constructor & Destructor Documentation

◆ ~SBTObjectType()

owl::SBTObjectType::~SBTObjectType ( )
virtual

clean up; in particular, frees the vardecls

Member Function Documentation

◆ declareVariable()

void owl::SBTObjectType::declareVariable ( const std::string &  varName,
OWLDataType  type,
size_t  offset 
)

add a new variable of given type and name, and with given byte offset within the device representation of this class

◆ getVariableIdx()

int owl::SBTObjectType::getVariableIdx ( const std::string &  varName)

find index of variable with given name, or -1 if not exists

◆ hasVariable()

bool owl::SBTObjectType::hasVariable ( const std::string &  varName)

check if we have this variable (to error out if app tries to set variable that we do not own

◆ instantiateVariables()

std::vector< Variable::SP > owl::SBTObjectType::instantiateVariables ( )

create a set of actual instances of the variables of this type, to be attached to an actual object of this type, so this object can then store variable values

create one instance each of a given type's variables

◆ toString()

std::string owl::SBTObjectType::toString ( ) const
overridevirtual

pretty-printer, for printf-debugging

pretty-typecast into derived classes

Reimplemented from owl::ContextObject.

Reimplemented in owl::SphereGeomType, owl::TrianglesGeomType, and owl::UserGeomType.

Member Data Documentation

◆ varDecls

const std::vector<OWLVarDecl> owl::SBTObjectType::varDecls

the high-level semantic description of variables in the variables struct

◆ varStructSize

const size_t owl::SBTObjectType::varStructSize

the total size of the variables struct


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