19#include "RegisteredObject.h"
21#include "LaunchParams.h"
30 typedef std::shared_ptr<Group> SP;
36 struct DeviceData :
public RegisteredObject::DeviceData {
37 typedef std::shared_ptr<DeviceData> SP;
61 std::string
toString()
const override;
64 virtual void buildAccel(LaunchParams::SP launchParams =
nullptr) = 0;
67 virtual void refitAccel(LaunchParams::SP launchParams =
nullptr) = 0;
78 RegisteredObject::DeviceData::SP
createOn(
const DeviceContext::SP &device)
override;
81 inline OptixTraversableHandle
getTraversable(
const DeviceContext::SP &device)
const;
103 typedef std::shared_ptr<GeomGroup> SP;
113 void setChild(
size_t childID, Geom::SP child);
Definition: DeviceMemory.h:23
virtual ~GeomGroup()
Definition: Group.cpp:71
int sbtOffset
Definition: Group.h:128
void setChild(size_t childID, Geom::SP child)
Definition: Group.cpp:81
std::string toString() const
Definition: Group.cpp:88
std::vector< Geom::SP > geometries
Definition: Group.h:124
int getSBTOffset() const override
Definition: Group.h:118
OptixTraversableHandle traversable
Definition: Group.h:43
DeviceMemory bvhMemory
Definition: Group.h:47
size_t memPeak
peak memory uesd during building, last time it was built.
Definition: Group.h:53
size_t memFinal
memory used for the BVH, last time it was built.
Definition: Group.h:50
virtual void buildAccel(LaunchParams::SP launchParams=nullptr)=0
RegisteredObject::DeviceData::SP createOn(const DeviceContext::SP &device) override
Definition: Group.cpp:42
virtual int getSBTOffset() const =0
void getAccelSize(size_t &memFinal, size_t &memPeak)
Definition: Group.h:89
virtual void refitAccel(LaunchParams::SP launchParams=nullptr)=0
box3f bounds[2]
Definition: Group.h:97
std::string toString() const override
Definition: Group.cpp:48
OptixTraversableHandle getTraversable(const DeviceContext::SP &device) const
Definition: Group.h:144
DeviceData & getDD(const DeviceContext::SP &device) const
Definition: Group.h:137
Definition: ObjectRegistry.h:30
std::vector< DeviceData::SP > deviceData
Definition: Object.h:86
Definition: RegisteredObject.h:30
ObjectRegistry & registry
Definition: RegisteredObject.h:42