OWL
|
#include <UserGeom.h>
Classes | |
struct | DeviceData |
Public Types | |
typedef std::shared_ptr< UserGeomType > | SP |
Public Types inherited from owl::GeomType | |
typedef std::shared_ptr< GeomType > | SP |
Public Types inherited from owl::SBTObjectType | |
typedef std::shared_ptr< SBTObjectType > | SP |
Public Types inherited from owl::ContextObject | |
typedef std::shared_ptr< ContextObject > | SP |
Public Types inherited from owl::Object | |
typedef std::shared_ptr< Object > | SP |
Public Member Functions | |
UserGeomType (Context *const context, size_t varStructSize, const std::vector< OWLVarDecl > &varDecls) | |
void | setIntersectProg (int rayType, Module::SP module, const std::string &progName) |
void | setBoundsProg (Module::SP module, const std::string &progName) |
void | setMotionBoundsProg (Module::SP module, const std::string &progName) |
void | buildBoundsProg () |
void | buildMotionBoundsProg () |
std::string | toString () const override |
virtual std::shared_ptr< Geom > | createGeom () override |
DeviceData & | getDD (const DeviceContext::SP &device) const |
RegisteredObject::DeviceData::SP | createOn (const DeviceContext::SP &device) override |
Public Member Functions inherited from owl::GeomType | |
GeomType (Context *const context, size_t varStructSize, const std::vector< OWLVarDecl > &varDecls) | |
std::string | toString () const override |
DeviceData & | getDD (const DeviceContext::SP &device) const |
RegisteredObject::DeviceData::SP | createOn (const DeviceContext::SP &device) override |
virtual std::shared_ptr< Geom > | createGeom ()=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 ®istry, 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 ®istry) | |
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 | |
ProgramDesc | boundsProg |
ProgramDesc | motionBoundsProg |
std::vector< ProgramDesc > | intersectProg |
Public Attributes inherited from owl::GeomType | |
std::vector< ProgramDesc > | closestHit |
std::vector< ProgramDesc > | anyHit |
Public Attributes inherited from owl::SBTObjectType | |
const size_t | varStructSize |
const std::vector< OWLVarDecl > | varDecls |
Public Attributes inherited from owl::RegisteredObject | |
int | ID |
ObjectRegistry & | registry |
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 |
Describes a geometry type for "User Geometries" or, as they area also known in OptiX land, "Custom Primitives" - ie, primitives where the user specifies bounding box program and intersection program. This "Type" class describes these programs; the "UserGeom" class then creates objects of this type and stores the respective data that describe that object
owl::UserGeomType::UserGeomType | ( | Context *const | context, |
size_t | varStructSize, | ||
const std::vector< OWLVarDecl > & | varDecls | ||
) |
constructor, using the variable declaratoins that the user supplied
void owl::UserGeomType::buildBoundsProg | ( | ) |
build the CUDA bounds program kernel (if bounds prog is set)
void owl::UserGeomType::buildMotionBoundsProg | ( | ) |
build the CUDA bounds program kernel (if motion bounds prog is set)
|
overridevirtual |
create an instance of this geometry that the user can then parameterize and attach to a group
Implements owl::GeomType.
|
override |
create this object's device-specific data for the device
|
inline |
get reference to given device-specific data for this object
void owl::UserGeomType::setBoundsProg | ( | Module::SP | module, |
const std::string & | progName | ||
) |
set bounding box program to run for this type
void owl::UserGeomType::setIntersectProg | ( | int | rayType, |
Module::SP | module, | ||
const std::string & | progName | ||
) |
set intersection program to run for this type and given ray type
void owl::UserGeomType::setMotionBoundsProg | ( | Module::SP | module, |
const std::string & | progName | ||
) |
set motion bounding box program to run for this type
|
overridevirtual |
pretty-printer, for printf-debugging
Reimplemented from owl::GeomType.
ProgramDesc owl::UserGeomType::boundsProg |
the bounds prog to run for this type
std::vector<ProgramDesc> owl::UserGeomType::intersectProg |
the vector of intersect programs to run for this type, one per ray type
ProgramDesc owl::UserGeomType::motionBoundsProg |
the motion bounds prog to run for this type (if motion blur is enabled)