OWL
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
owl::GeomType Struct Referenceabstract
Inheritance diagram for owl::GeomType:
owl::SBTObjectType owl::RegisteredObject owl::ContextObject owl::Object owl::CurvesGeomType owl::SphereGeomType owl::TrianglesGeomType owl::UserGeomType

Classes

struct  DeviceData
 

Public Types

typedef std::shared_ptr< GeomTypeSP
 
- Public Types inherited from owl::SBTObjectType
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

 GeomType (Context *const context, size_t varStructSize, const std::vector< OWLVarDecl > &varDecls)
 
std::string toString () const override
 
DeviceDatagetDD (const DeviceContext::SP &device) const
 
RegisteredObject::DeviceData::SP createOn (const DeviceContext::SP &device) override
 
virtual std::shared_ptr< GeomcreateGeom ()=0
 
void setAnyHitProgram (int rayType, Module::SP module, const std::string &progName)
 
void setClosestHitProgram (int rayType, Module::SP module, const std::string &progName)
 
- Public Member Functions inherited from owl::SBTObjectType
 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

std::vector< ProgramDescclosestHit
 
std::vector< ProgramDescanyHit
 
- Public Attributes inherited from owl::SBTObjectType
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
 

Constructor & Destructor Documentation

◆ GeomType()

owl::GeomType::GeomType ( Context *const  context,
size_t  varStructSize,
const std::vector< OWLVarDecl > &  varDecls 
)

create new geometry type with given parameters/variables

constructor - mostly pass through to parent class

Parameters
varStructSizesize of the struct on the device
varDeclslist of variables within this struct that we can/have to set

Member Function Documentation

◆ createGeom()

virtual std::shared_ptr< Geom > owl::GeomType::createGeom ( )
pure virtual

create an instance of tihs geometry - abstract, since the actual class to create depends on what kind of geometry this is

Implemented in owl::CurvesGeomType, owl::SphereGeomType, owl::TrianglesGeomType, and owl::UserGeomType.

◆ createOn()

RegisteredObject::DeviceData::SP owl::GeomType::createOn ( const DeviceContext::SP &  device)
override

creates the device-specific data for this group

◆ getDD()

GeomType::DeviceData & owl::GeomType::getDD ( const DeviceContext::SP &  device) const
inline

get reference to given device-specific data for this object

◆ setAnyHitProgram()

void owl::GeomType::setAnyHitProgram ( int  rayType,
Module::SP  module,
const std::string &  progName 
)

sets the anyhit program to run for given ray type

◆ setClosestHitProgram()

void owl::GeomType::setClosestHitProgram ( int  rayType,
Module::SP  module,
const std::string &  progName 
)

sets the closest program to run for given ray type

◆ toString()

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

pretty-printer, for printf-debugging

Reimplemented from owl::Object.

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

Member Data Documentation

◆ anyHit

std::vector<ProgramDesc> owl::GeomType::anyHit

anyhit programs to run for this geom - one per ray type

◆ closestHit

std::vector<ProgramDesc> owl::GeomType::closestHit

closest programs to run for this geom - one per ray type


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