Class GenerationSettings
Contains immutable data that cannot be changed during the whole generation loop.
Inherited Members
Namespace: Holoride.ElasticSDK
Assembly: Holoride.ElasticSDK.Library.Runtime.dll
Syntax
public class GenerationSettings : ExtensibleObject<IGenerationSettings>
Constructors
GenerationSettings(float, int, float, Transform, float, int, int, bool, int)
Instantiates immutable generation settings.
Declaration
public GenerationSettings(float extents, int filterResolution, float heightOffset, Transform parent, float blendMargin, int disabledCollisionLayer, int gridDivisions = 5, bool ignoreMissingInputs = false, int seed = 1752132719)
Parameters
Type | Name | Description |
---|---|---|
float | extents | The supported extents of the generation process that determines where maps are downloaded, spawn candidates are set and terrain is generated. |
int | filterResolution | The resolution of the maps. |
float | heightOffset | The height offset all spawners can access to instantiate objects with a shared reference height. |
Transform | parent | The parent transform to all generated objects. |
float | blendMargin | The blend ratio between overlapping filter iterations. A lower value indicates less blending with harder seams. Therefore earlier processed values will change less after updates leading to fewer popup-effects. |
int | disabledCollisionLayer | The collision layer to temporarily disable collisions during the generation process. |
int | gridDivisions | The divisions of a terrain to trigger updates. |
bool | ignoreMissingInputs | Whether to silently ignore missing inputs or throw exceptions instead. |
int | seed | The seed value to use for randomization. |
Fields
BlendMargin
The blend ratio between overlapping filter iterations. A lower value indicates less blending with harder seams. Therefore earlier processed values will change less after updates leading to fewer popup-effects.
Declaration
public readonly float BlendMargin
Field Value
Type | Description |
---|---|
float |
DefaultHeightmapZoomLevel
Default zoom level for heightmap data provider.
Declaration
public const int DefaultHeightmapZoomLevel = 14
Field Value
Type | Description |
---|---|
int |
DefaultOverpassZoomLevel
Default zoom level for overpass data provider.
Declaration
public const int DefaultOverpassZoomLevel = 13
Field Value
Type | Description |
---|---|
int |
DisabledCollisionLayer
The collision layer to temporarily disable collisions during the generation process.
Declaration
public readonly int DisabledCollisionLayer
Field Value
Type | Description |
---|---|
int |
Extents
The supported extents of the generation process that determines where maps are downloaded, spawn candidates are set and terrain is generated.
Declaration
public readonly float Extents
Field Value
Type | Description |
---|---|
float |
FilterResolution
The resolution of the maps.
Declaration
public readonly int FilterResolution
Field Value
Type | Description |
---|---|
int |
GridDivisions
The resolution of each terrain chunk to trigger updates.
Declaration
public readonly int GridDivisions
Field Value
Type | Description |
---|---|
int |
HeightOffset
The height offset all spawners can access to instantiate objects with a shared reference height.
Declaration
public readonly float HeightOffset
Field Value
Type | Description |
---|---|
float |
IgnoreMissingInputs
States whether workers silently return or throw exceptions in the case of missing inputs.
Declaration
public readonly bool IgnoreMissingInputs
Field Value
Type | Description |
---|---|
bool |
Parent
The parent transform to all generated objects.
Declaration
public readonly Transform Parent
Field Value
Type | Description |
---|---|
Transform |
Seed
Seed used when initializing random number generators.
Declaration
public readonly int Seed
Field Value
Type | Description |
---|---|
int |
Properties
GridResolution
Declaration
public int GridResolution { get; }
Property Value
Type | Description |
---|---|
int |
Methods
GetRandom(GlobalPose, int, int)
Declaration
public Random GetRandom(GlobalPose pose, int precision = 100, int latOffset = 1000)
Parameters
Type | Name | Description |
---|---|---|
GlobalPose | pose | |
int | precision | |
int | latOffset |
Returns
Type | Description |
---|---|
Random |
GetRandom(int)
Declaration
public Random GetRandom(int seed)
Parameters
Type | Name | Description |
---|---|---|
int | seed |
Returns
Type | Description |
---|---|
Random |
GetRandom(Vector2Int)
Declaration
public Random GetRandom(Vector2Int cell)
Parameters
Type | Name | Description |
---|---|---|
Vector2Int | cell |
Returns
Type | Description |
---|---|
Random |
GetSeedFromPose(GlobalPose, int, int)
Declaration
public int GetSeedFromPose(GlobalPose pose, int precision = 100, int latOffset = 1000)
Parameters
Type | Name | Description |
---|---|---|
GlobalPose | pose | |
int | precision | |
int | latOffset |
Returns
Type | Description |
---|---|
int |