ArcGIS Procedural Runtime
3.2.10650
|
Public Member Functions | |
virtual InitialShape const * | createInitialShape (Status *status=nullptr)=0 |
virtual InitialShape const * | createInitialShapeAndReset (Status *status=nullptr)=0 |
virtual Status | resetGeometry ()=0 |
virtual Status | resolveAttributes (wchar_t const *key, ResolveMap const *resolveMap=nullptr, Cache *cache=nullptr)=0 |
virtual Status | resolveGeometry (wchar_t const *key, ResolveMap const *resolveMap=nullptr, Cache *cache=nullptr)=0 |
virtual Status | resolveTextures (wchar_t const *const *textureKeys, size_t textureCount, uint32_t const *faceTextureIndices, uint32_t facesCount, ResolveMap const *resolveMap=nullptr, Cache *cache=nullptr)=0 |
virtual Status | setAttributes (wchar_t const *ruleFile, wchar_t const *startRule, int32_t randomSeed, wchar_t const *name, AttributeMap const *attributes, ResolveMap const *resolveMap)=0 |
virtual Status | setGeometry (double const *vertexCoords, size_t vcCount, uint32_t const *indices, size_t indicesCount, uint32_t const *faceCounts, size_t faceCountsCount, const uint32_t *holes=nullptr, size_t holesCount=0)=0 |
virtual Status | setUVs (double const *uvCoords, size_t uvcCount, uint32_t const *uvIndices, size_t uvIndicesCount, uint32_t const *faceCounts, size_t faceCountsCount, uint32_t uvSet=0)=0 |
Public Member Functions inherited from prt::Object | |
void | destroy () const |
virtual char * | toXML (char *result, size_t *resultSize, Status *stat=0) const =0 |
char * | toXMLDocument (char *result, size_t *resultSize, Status *stat=0) const |
Static Public Member Functions | |
static InitialShapeBuilder * | create (Status *status=nullptr) |
Additional Inherited Members | |
Protected Member Functions inherited from prt::Object | |
Object (const Object &) | |
|
static |
Creates an empty InitialShapeBuilder.
stat | Pointer to a Status object which will receive a status code. |
|
pure virtual |
Creates an initial shape instance and keeps the builder state.
|
pure virtual |
Creates an InitialShape instance and resets the builder to its default state.
|
pure virtual |
Resets geometry and textures, so setGeometry(), setUVs() and resolveTextures() can be called once more. Typically used to create multiple InitialShapes with the same attributes but different geometry.
|
pure virtual |
Updates initial shape attributes based on an asset (if the corresponding decoder supports it). Please refer to InitialShapeBuilder::setAttributes for a description of the attribute key semantics. By using the same cache object as in the InitialShapeBuilder::resolveGeometry call this can be done efficiently.
key | The key (into resolveMap) of the geometry asset to load. If resolveMap is 0, key is treated as a an URI. |
resolveMap | The resolveMap which contains key/URI entries for the key plus nested resources (such as a mtl file referenced by an obj file etc.). |
cache | Cache to use for texture lookups. 0 for no caching. |
|
pure virtual |
Sets an initial shape's geometry (plus uv coordinates and texturing if available) from an external resource. Overrides any existing data set with setGeometry(), setUVs() and/or resolveTextures(). If an initial shape's geometry is loaded with resolveGeometry, calls to setGeometry(), setUVs() and resolveTextures() will return an error until resetGeometryAndTextures() is called.
key | The key (into resolveMap) of the geometry asset to load. If resolveMap is 0, key is treated as a an URI. |
resolveMap | The resolveMap which contains key/URI entries for the key plus nested resources (such as a mtl file referenced by an obj file etc.). |
cache | Cache to use for texture lookups. 0 for no caching. |
|
pure virtual |
Sets up the initial shape''s material by resolving, loading and decoding the given textures. The faceTextureIndices must match the geometry set with setGeometry(). If a texture can not be resolved, STATUS_UNABLE_TO_RESOLVE is returned and builtin:unknowntexture.png is used for that texture. To use this member function for multiple InitialShapes, call resetGeometry() before the next resolveTextures().
Overrides any existing data set with resolveGeometry().
textureKeys | The textures (keys into texturesResolveMap / uris if resolveMap is 0). 0 or an empty string means 'no texture'. |
textureCount | The number of textures. |
faceTextureIndices | Array with texture index for each face. |
facesCount | The number of faces (== faceCountsCount in setGeometry()). This is the number of elements in faceTextureIndices. |
resolveMap | ResolveMap to use for texture lookups |
cache | Cache to use for texture lookups. 0 for no caching. |
|
pure virtual |
Sets the initial shape's attributes. The major purpose is to override rule attributes with concrete values in order to control the procedural model generation. However, any attribute name can be used; this allows for passing initial shape specific attributes to the encoder (see below). There is a number of reserved attribute names for special purposes; if present, they influence the model generation:
Attribute Key | Type | Default | Description |
---|---|---|---|
streetWidth | float array | A semantic attribute to transport information about streets adjacent to the initial shape. If present it is used to evaluate the street.xxx selectors in cga (for instance in the comp() operation). The index into the array corresponds to the edge-index, and the value corresponds to the width of the street on that side. 0 means no street, a value > 0 means street. | |
/edgeattr/name | float/bool/string array | A semantic attribute to transport information of edges of the initial shape. It can be sampled by edgeAttr.getFloat/Bool/String() functions. The array is filled in face-edge-order. | |
/arrayDimRows/<array attr name> | int | Allows to set the number of rows for 2D arrays. <array attr name> must be the name of a float/bool/string array in attributes. | |
/cgaenv/ | Reserved namespace for controlling cga execution. | ||
/cgaenv/occlDisableIntra | bool | false | Disable intra-model occlusion queries (i.e. they all return false) |
/cgaenv/occlDisableInter | bool | false | Disable inter-model occlusion queries (i.e. they all return false) |
/cgaenv/maxDerivationDepth | int | 1024 | Maximum recursion level for cga operations |
/cgaenv/maxDerivationWidth | int | 100000 | Maximum shapetree width (for cga) |
/cgaenv/maxFuncCallDepth | int | 1024 | Maximum recursion level for cga functions |
/cgaenv/floatCheck | int | 2 | Controls checking of float parameters of operation/built-in functions for inf/nan values: 0 = ignore(don't check), 1 = check and abort if inf/nan detected, 2 = check and replace with 0 if inf/nan detected |
/cgaenv/maxArraySize | int | 100000 | Maximum size of arrays |
/cgaenv/trimPlanesComputeSize | float | 100.0 | The size of the computed trimplanes in meters; float; default: 100.0 |
/cgaenv/touchesMaxDist | float | 1e-3 | Due to floating point limitations, occlusion queries use this threshold value. |
/cache/key | string | Set the cache key associated to this initial shape. This allows e.g. for re-using an initial shape's cache key with a different instance. See also the generateOptions parameter of generate(). | |
/enc/ | Reserved namespace for encoders. The encoder documentation lists the known initial shape attributes per encoder. Typically, these attributes are used to control encoder behavior on a per-initial-shape basis, i.e. they are the per-initial-shape counterpart to the encoder options. Also see the Application Notes for an usage example. |
ruleFile | The cgb file (as a key into the resolveMap). |
startRule | The start rule, with style prefix (e.g. "Default$Init"). Currently only rules from the default style are supported. This will be the initialShape.startRule cga attribute. |
randomSeed | The random seed; this will be the seedian cga attribute of the initial shape. |
name | The name of the initial shape. This will be the initialShape.name cga attribute. |
attributes | The rule attributes. Ownership remains with caller. |
resolveMap | The resolve map to use in generate(). |
|
pure virtual |
Sets the initial shape's geometry. Faces have counter-clockwise vertex ordering. To use this member function for multiple InitialShapes, call resetGeometry() before the next setGeometry().
Overrides any existing data set with resolveGeometry().
vertexCoords | The vertex coordinates as (x,y,z) tuples: { x0, y0, z0, x1, y1, z1, ... }. |
vcCount | The size of vertexCoords == 3 * number of vertices. |
indices | The vertex indices per face: { f0i0, f0i1, f0i2, f0if0Count-1, ..., f1i0, ... } |
indicesCount | The size of indices. |
faceCounts | The number of vertices per face: { f0Count, f1Count, ... }. Each face must have a vertex count > 0. |
faceCountsCount | The number of faces. |
holes | List which assigns hole-faces to faces. Holes must have the opposite vertex-ordering as the encircling face. The Structure is: { face-with-holes1-idx, hole-face-idx1, hole-face-idx2, ..., MAX_UINT32_T, ..., face-with-holesn-idx, hole-face-idx1, hole-face-idx2, ..., MAX_UINT32_T } |
holesCount | The number of uint32_t entries in the array above. |
|
pure virtual |
Sets the initial shape's uv coordinates (texture coordinates). The uvs must match the geometry set with setGeometry(). This member function can only be called once per uvSet. Use resetGeometry() first to call setUVs for another InitialShape.
Overrides any existing data set with resolveGeometry().
uvCoords | The uv coords as (u,v) tuples: { u0, v0, u1, v1, ... }. |
uvCount | The number of texture coords = 2 * number of (u,v) tuples. |
indices | The uv indices per face. |
indicesCount | The uv indices per face (analogous to indices in setGeometry()). |
faceCounts | The number of vertices per face: { f0Count, f1Count, ... } (== faceCounts in setGeometry()). |
faceCountsCount | The number of faces (== faceCountsCount in setGeometry()) |
uvSet | Optional index of uvSet. Defaults to 0. |