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

#include <Triangles.h>

Inheritance diagram for owl::TrianglesGeom:
owl::Geom owl::SBTObject< GeomType > owl::SBTObjectBase owl::RegisteredObject owl::ContextObject owl::Object

Classes

struct  DeviceData
 

Public Types

typedef std::shared_ptr< TrianglesGeomSP
 
- Public Types inherited from owl::Geom
typedef std::shared_ptr< GeomSP
 
- Public Types inherited from owl::SBTObject< GeomType >
typedef std::shared_ptr< SBTObjectSP
 
- 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

 TrianglesGeom (Context *const context, GeomType::SP geometryType)
 
RegisteredObject::DeviceData::SP createOn (const DeviceContext::SP &device) override
 
DeviceDatagetDD (const DeviceContext::SP &device) const
 
void setVertices (const std::vector< Buffer::SP > &vertices, size_t count, size_t stride, size_t offset)
 
void setIndices (Buffer::SP indices, size_t count, size_t stride, size_t offset)
 
void computeBounds (box3f bounds[2])
 
std::string toString () const override
 
- Public Member Functions inherited from owl::Geom
 Geom (Context *const context, GeomType::SP geomType)
 
std::string toString () const override
 
void writeSBTRecord (uint8_t *const sbtRecord, const DeviceContext::SP &device, int rayTypeID)
 
- Public Member Functions inherited from owl::SBTObject< GeomType >
 SBTObject (Context *const context, ObjectRegistry &registry, std::shared_ptr< GeomType > type)
 
virtual std::string toString () const
 
- Public Member Functions inherited from owl::SBTObjectBase
 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

struct {
   size_t   count = 0
 
   size_t   stride = 0
 
   size_t   offset = 0
 
   Buffer::SP   buffer
 
index
 
struct {
   size_t   count = 0
 
   size_t   stride = 0
 
   size_t   offset = 0
 
   std::vector< Buffer::SP >   buffers
 
vertex
 
- Public Attributes inherited from owl::Geom
GeomType::SP geomType
 
- Public Attributes inherited from owl::SBTObject< GeomType >
std::shared_ptr< GeomType > const type
 
- Public Attributes inherited from owl::SBTObjectBase
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

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

Detailed Description

an actual instance of a given triangle-primitives type; this actual triangle mesh uses the programs and SBT data associated with its associated TrianglesGeomType, and will "instantiate" these with the vertex arrays, index array, etc, specified in this Geom

Constructor & Destructor Documentation

◆ TrianglesGeom()

owl::TrianglesGeom::TrianglesGeom ( Context *const  context,
GeomType::SP  geometryType 
)

constructor - create a new (as yet without vertices, indices, etc) instance of given triangles geom type

Member Function Documentation

◆ computeBounds()

void owl::TrianglesGeom::computeBounds ( box3f  bounds[2])

call a cuda kernel that computes the bounds of the vertex buffers

◆ createOn()

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

creates the device-specific data for this group

◆ getDD()

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

creates the device-specific data for this group

get reference to given device-specific data for this object

get reference to given device-specific data for this object

◆ setIndices()

void owl::TrianglesGeom::setIndices ( Buffer::SP  indices,
size_t  count,
size_t  stride,
size_t  offset 
)

set the index buffer; this remains one buffer even if motion blur is enabled.

◆ setVertices()

void owl::TrianglesGeom::setVertices ( const std::vector< Buffer::SP > &  vertices,
size_t  count,
size_t  stride,
size_t  offset 
)

set the vertex array (if vector size is 1), or set/enable motion blur via multiple time steps, if vector size >= 0

Parameters
countthe number of vertices in each time step

◆ toString()

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

pretty-print

Reimplemented from owl::Geom.


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