OWL
Loading...
Searching...
No Matches
SphereGeomGroup.h
1// ======================================================================== //
2// Copyright 2019-2020 Ingo Wald //
3// //
4// Licensed under the Apache License, Version 2.0 (the "License"); //
5// you may not use this file except in compliance with the License. //
6// You may obtain a copy of the License at //
7// //
8// http://www.apache.org/licenses/LICENSE-2.0 //
9// //
10// Unless required by applicable law or agreed to in writing, software //
11// distributed under the License is distributed on an "AS IS" BASIS, //
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
13// See the License for the specific language governing permissions and //
14// limitations under the License. //
15// ======================================================================== //
16
17#pragma once
18
19#include "Group.h"
20#include "SphereGeom.h"
21
22namespace owl {
23
26 struct SphereGeomGroup : public GeomGroup {
27
29 SphereGeomGroup(Context *const context, size_t numChildren, unsigned int buildFlags);
30
32 std::string toString() const override;
33
34 void buildAccel(LaunchParams::SP launchParams = nullptr) override;
35 void refitAccel(LaunchParams::SP launchParams = nullptr) override;
36
39 void updateMotionBounds();
40
42 template<bool FULL_REBUILD>
43 void buildAccelOn(const DeviceContext::SP &device);
44
45 constexpr static unsigned int defaultBuildFlags =
46 OPTIX_BUILD_FLAG_PREFER_FAST_TRACE |
47 OPTIX_BUILD_FLAG_ALLOW_COMPACTION;
48
49 protected:
50 const unsigned int buildFlags;
51 };
52
53} // ::owl
Definition: Context.h:32
Definition: Group.h:102
Definition: SphereGeomGroup.h:26
void refitAccel(LaunchParams::SP launchParams=nullptr) override
Definition: SphereGeomGroup.cpp:68
void buildAccelOn(const DeviceContext::SP &device)
Definition: SphereGeomGroup.cpp:78
void buildAccel(LaunchParams::SP launchParams=nullptr) override
Definition: SphereGeomGroup.cpp:59
std::string toString() const override
Definition: SphereGeomGroup.cpp:37
void updateMotionBounds()
Definition: SphereGeomGroup.cpp:53