ArcGIS Procedural Runtime  3.2.10650
InitialShape.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 PRT_INITIALSHAPE_H_
19 #define PRT_INITIALSHAPE_H_
20 
21 #include "prt/prt.h"
22 #include "prt/Object.h"
23 #include "prt/AttributeMap.h"
24 #include "prt/ResolveMap.h"
25 #include "prt/Cache.h"
26 
27 
28 namespace prt {
29 
30 
46 class PRT_EXPORTS_API InitialShape : public Object {
47 public:
51  virtual wchar_t const* getRuleFile() const = 0;
55  virtual wchar_t const* getStartRule() const = 0;
60  virtual wchar_t const* getName() const = 0;
64  virtual int32_t getRandomSeed() const = 0;
68  virtual AttributeMap const* getAttributeMap() const = 0;
72  virtual ResolveMap const* getResolveMap() const = 0;
81  virtual wchar_t const* getCacheKey() const = 0;
82 
83 protected:
84  InitialShape() = default;
85  virtual ~InitialShape() = default;
86 };
87 
88 
89 class PRT_EXPORTS_API InitialShapeBuilder : public Object {
90 public:
97  static InitialShapeBuilder* create(Status* status = nullptr);
98 
103  virtual InitialShape const* createInitialShapeAndReset(Status* status = nullptr) = 0;
104 
109  virtual InitialShape const* createInitialShape(Status* status = nullptr) = 0;
110 
128  virtual Status setGeometry(
129  double const* vertexCoords,
130  size_t vcCount,
131  uint32_t const* indices,
132  size_t indicesCount,
133  uint32_t const* faceCounts,
134  size_t faceCountsCount,
135  const uint32_t* holes = nullptr,
136  size_t holesCount = 0
137  ) = 0;
138 
139 
155  virtual Status setUVs(
156  double const* uvCoords,
157  size_t uvcCount,
158  uint32_t const* uvIndices,
159  size_t uvIndicesCount,
160  uint32_t const* faceCounts,
161  size_t faceCountsCount,
162  uint32_t uvSet = 0
163  ) = 0;
164 
165 
183  virtual Status resolveTextures(
184  wchar_t const* const* textureKeys,
185  size_t textureCount,
186  uint32_t const* faceTextureIndices,
187  uint32_t facesCount,
188  ResolveMap const* resolveMap = nullptr,
189  Cache* cache = nullptr
190  ) = 0;
191 
198  virtual Status resetGeometry() = 0;
199 
211  virtual Status resolveGeometry(
212  wchar_t const* key,
213  ResolveMap const* resolveMap = nullptr,
214  Cache* cache = nullptr
215  ) = 0;
216 
217 
252  virtual Status setAttributes(
253  wchar_t const* ruleFile,
254  wchar_t const* startRule,
255  int32_t randomSeed,
256  wchar_t const* name,
257  AttributeMap const* attributes,
258  ResolveMap const* resolveMap
259  ) = 0;
260 
261 
278  virtual Status resolveAttributes(
279  wchar_t const* key,
280  ResolveMap const* resolveMap = nullptr,
281  Cache* cache = nullptr
282  ) = 0;
283 
284 protected:
285  InitialShapeBuilder() = default;
286  virtual ~InitialShapeBuilder() = default;
287 };
288 
289 
290 } /* namespace prt */
291 
292 
293 #endif /* PRT_INITIALSHAPE_H_ */
Definition: ResolveMap.h:38
Definition: Object.h:35
Definition: Cache.h:53
Definition: AttributeMap.h:32
Definition: InitialShape.h:46
Status
Definition: Status.h:31
Definition: InitialShape.h:89
The Procedural Runtime API namespace. The prt namespace contains the top level entry points into the ...
Definition: Annotation.h:24