OWL
Loading...
Searching...
No Matches
UserGeomGroup.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 "UserGeom.h"
21
22namespace owl {
23
26 struct UserGeomGroup : public GeomGroup {
27
28 UserGeomGroup(Context *const context,
29 size_t numChildren,
30 unsigned int buildFlags);
31 virtual std::string toString() const { return "UserGeomGroup"; }
32
36 void buildOrRefit(bool FULL_REBUILD);
37
38 void buildAccel(LaunchParams::SP launchParams = nullptr) override;
39 void refitAccel(LaunchParams::SP launchParams = nullptr) override;
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
54} // ::owl
Definition: Context.h:32
Definition: Group.h:102
Definition: UserGeomGroup.h:26
void buildOrRefit(bool FULL_REBUILD)
Definition: UserGeomGroup.cpp:41
void buildAccelOn(const DeviceContext::SP &device)
Definition: UserGeomGroup.cpp:72
virtual std::string toString() const
Definition: UserGeomGroup.h:31
void buildAccel(LaunchParams::SP launchParams=nullptr) override
Definition: UserGeomGroup.cpp:60
void refitAccel(LaunchParams::SP launchParams=nullptr) override
Definition: UserGeomGroup.cpp:65