-
Notifications
You must be signed in to change notification settings - Fork 0
/
OScene.hh
99 lines (84 loc) · 2.76 KB
/
OScene.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
* Copyright (c) 2019 Opticks Team. All Rights Reserved.
*
* This file is part of Opticks
* (see https://bitbucket.org/simoncblyth/opticks).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
class SLog ;
class BTimeKeeper ;
class Opticks ;
class OpticksHub ;
class SensorLib ;
template <typename> class OpticksCfg ;
class OContext ; // old leaky wrapper
class OCtx ; // new-fangled watertight wrapper
class OFunc ;
class OColors ;
class OGeo ;
class OBndLib ;
class OScintillatorLib ;
class OSourceLib ;
class OSensorLib ;
/**
OScene
========
Canonical m_scene instance resides in okop-/OpEngine
Instanciating an OScene creates the OptiX GPU context
and populates it with geometry, boundary info etc..
effectively uploading the geometry obtained from
the OpticksHub to the GPU. This geometry info is
held in the O* libs: OGeo, OBndLib, OScintillatorLib,
OSourceLib.
NB there is no use of OptiX types in this interface header
although these are used internally. This is as are aiming
to remove OptiX dependency in higher level interfaces
for easier OptiX version hopping.
**/
#include "plog/Severity.h"
#include "OXRAP_API_EXPORT.hh"
class OXRAP_API OScene {
public:
static const plog::Severity LEVEL ;
public:
OScene(OpticksHub* hub, const char* cmake_target="OptiXRap", const char* ptxrel=nullptr);
public:
void uploadSensorLib(const SensorLib* sensorlib);
public:
OContext* getOContext();
OBndLib* getOBndLib();
public:
void cleanup();
private:
int preinit() const ;
void init(); // creates OptiX context and populates with geometry info
private:
int m_preinit ;
SLog* m_log ;
BTimeKeeper* m_timer ;
OpticksHub* m_hub ;
Opticks* m_ok ;
OContext* m_ocontext ;
OCtx* m_octx ;
OFunc* m_osolve ;
OColors* m_ocolors ;
OGeo* m_ogeo ;
OBndLib* m_olib ;
OScintillatorLib* m_oscin ;
OSourceLib* m_osrc ;
OSensorLib* m_osensorlib ;
unsigned m_verbosity ;
bool m_use_osolve ;
};