ArcGIS Procedural Runtime  3.2.10650
GenerateContext.h
1 /*
2  COPYRIGHT (c) 2012-2024 Esri R&D Center Zurich
3  TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
4  Unpublished material - all rights reserved under the
5  Copyright Laws of the United States and applicable international
6  laws, treaties, and conventions.
7 
8  For additional information, contact:
9  Environmental Systems Research Institute, Inc.
10  Attn: Contracts and Legal Services Department
11  380 New York Street
12  Redlands, California, 92373
13  USA
14 
15  email: contracts@esri.com
16 */
17 
18 #ifndef PRTX_GENERATECONTEXT_H_
19 #define PRTX_GENERATECONTEXT_H_
20 
21 #include "prt/InitialShape.h"
22 #include "prt/Callbacks.h"
23 #include "prt/Cache.h"
24 #include "prt/OcclusionSet.h"
25 
26 #include "prtx/InitialShape.h"
27 
28 #include <vector>
29 
30 #ifdef _MSC_VER
31 # pragma warning(push)
32 # pragma warning (disable : 4251 4231 4275 4660)
33 #endif
34 
35 
36 namespace prtx {
37 
42 class PRTX_EXPORTS_API GenerateContext {
43 public:
44  using OcclusionSets = std::vector<const prt::OcclusionSet*>;
45  using OcclusionSetsVector = std::vector<OcclusionSets>;
46 
47  GenerateContext(const GenerateContext&) = delete;
48  GenerateContext& operator=(const GenerateContext&) = delete;
49  virtual ~GenerateContext() {};
50 
54  size_t getInitialShapeCount() const { return mInitialShapes.size(); }
59  const prtx::InitialShape* getInitialShape(size_t i) const { return mInitialShapes[i]; }
65  prt::OcclusionSet::Handle getOcclusionHandle(size_t i) const { return mOcclusionHandles[i]; }
69  prt::Callbacks* getCallbacks() { return mCallbacks; }
73  prt::Cache* getCache() { return mCache; }
74  prt::Cache const* getCache() const { return mCache; }
75 
81  const OcclusionSets& getOcclusionSets(size_t i) const { return mOcclusionSets[i]; }
82 
83 protected:
84  GenerateContext() {};
85 
89  GenerateContext(const prt::InitialShape* const* initialShapes, const prt::OcclusionSet::Handle* occlusionHandles, size_t initialShapeCount,
90  prt::Callbacks* callbacks, prt::Cache* cache, const OcclusionSetsVector& occlusionSets);
91 
95  GenerateContext(const prt::InitialShape* const* initialShapes, size_t initialShapeCount,
96  prt::Callbacks* callbacks, prt::Cache* cache, prt::OcclusionSet* writableOcclusionSet);
97 
98  // @cond
99  std::vector<const prtx::InitialShape*> mInitialShapes;
100  std::vector<prt::OcclusionSet::Handle> mOcclusionHandles;
101  prt::Callbacks* mCallbacks;
102  prt::Cache* mCache;
103  OcclusionSetsVector mOcclusionSets;
104  prt::OcclusionSet* mWritableOcclusionSet;
105  // @endcond
106 };
107 
108 } //namespace prtx
109 
110 
111 #ifdef _MSC_VER
112 # pragma warning(pop)
113 #endif
114 
115 #endif /* PRTX_GENERATECONTEXT_H_ */
Definition: GenerateContext.h:42
prt::Cache * getCache()
Definition: GenerateContext.h:73
const OcclusionSets & getOcclusionSets(size_t i) const
Definition: GenerateContext.h:81
Definition: OcclusionSet.h:39
The Procedural Runtime eXtension namespace. The prtx namespace contains the tools to extend the Proce...
Definition: AnnotationBuilder.h:35
Definition: /InitialShape.h:29
Definition: Cache.h:53
prt::Callbacks * getCallbacks()
Definition: GenerateContext.h:69
const prtx::InitialShape * getInitialShape(size_t i) const
Definition: GenerateContext.h:59
Definition: InitialShape.h:46
prt::OcclusionSet::Handle getOcclusionHandle(size_t i) const
Definition: GenerateContext.h:65
size_t getInitialShapeCount() const
Definition: GenerateContext.h:54
Definition: Callbacks.h:45