25 typedef std::shared_ptr<InstanceGroup> SP;
30 typedef std::shared_ptr<DeviceData> SP;
54 unsigned int buildFlags,
61 void setChild(
size_t childID, Group::SP child);
68 const float *floatsForThisStimeStep,
69 OWLMatrixFormat matrixFormat);
81 const std::string &progName);
85 const std::string &progName);
93 void buildAccel(LaunchParams::SP launchParams =
nullptr)
override;
94 void refitAccel(LaunchParams::SP launchParams =
nullptr)
override;
97 RegisteredObject::DeviceData::SP
createOn(
const DeviceContext::SP &device)
override;
102 template<
bool FULL_REBUILD>
103 void staticBuildOn(
const DeviceContext::SP &device);
104 template<
bool FULL_REBUILD>
105 void motionBlurBuildOn(
const DeviceContext::SP &device);
107 template<
bool FULL_REBUILD>
108 void staticDeviceBuildOn(
const DeviceContext::SP &device, LaunchParams::SP launchParams);
109 template<
bool FULL_REBUILD>
110 void motionBlurDeviceBuildOn(
const DeviceContext::SP &device, LaunchParams::SP launchParams);
138 constexpr static unsigned int defaultBuildFlags =
139 OPTIX_BUILD_FLAG_PREFER_FAST_TRACE;
142 const unsigned int buildFlags;
161 assert(device && device->ID < (
int)
deviceData.size());
Definition: DeviceMemory.h:23
Definition: InstanceGroup.h:29
CUfunction instanceFuncKernel
Definition: InstanceGroup.h:43
CUfunction motionInstanceFuncKernel
Definition: InstanceGroup.h:47
DeviceData(const DeviceContext::SP &device)
DeviceMemory motionTransformsBuffer
Definition: InstanceGroup.h:38
Definition: InstanceGroup.h:24
std::vector< affine3f > transforms[2]
Definition: InstanceGroup.h:126
InstanceGroup(Context *const context, size_t numChildren, Group::SP *groups, unsigned int buildFlags, bool useInstanceProgram)
ProgramDesc instanceProg
Definition: InstanceGroup.h:148
std::vector< Group::SP > children
Definition: InstanceGroup.h:122
void setMotionInstanceProg(Module::SP module, const std::string &progName)
size_t numChildren
Definition: InstanceGroup.h:117
std::string toString() const override
void setInstanceProg(Module::SP module, const std::string &progName)
std::vector< uint32_t > instanceIDs
Definition: InstanceGroup.h:131
void buildAccel(LaunchParams::SP launchParams=nullptr) override
RegisteredObject::DeviceData::SP createOn(const DeviceContext::SP &device) override
ProgramDesc motionInstanceProg
Definition: InstanceGroup.h:151
void setTransform(size_t childID, const affine3f &xfm)
void setTransforms(uint32_t timeStep, const float *floatsForThisStimeStep, OWLMatrixFormat matrixFormat)
void setChild(size_t childID, Group::SP child)
void buildMotionInstanceProg()
void refitAccel(LaunchParams::SP launchParams=nullptr) override
std::vector< uint8_t > visibilityMasks
Definition: InstanceGroup.h:136
int getSBTOffset() const override
Definition: InstanceGroup.h:114
DeviceData & getDD(const DeviceContext::SP &device) const
Definition: InstanceGroup.h:159
bool useInstanceProgram
Definition: InstanceGroup.h:145
std::vector< DeviceData::SP > deviceData
Definition: Object.h:86
Definition: Geometry.h:31
Definition: AffineSpace.h:52