Class HexSurfaceRenderLayer<TSurfaceLayer>
Base class for render data of the hex terrain surface. This one is a generic class, so it can be used for any surface type that is inherited from HexSurfaceLayer HexSurfaceRenderLayer
Inheritance
Implements
Inherited Members
Namespace: Fwt.HexTerrains.Surfaces.Data
Assembly: fwt.hexterrains.dll
Syntax
public abstract class HexSurfaceRenderLayer<TSurfaceLayer> : HexSurfaceRenderLayer, IDisposable where TSurfaceLayer : HexSurfaceLayer
Type Parameters
| Name | Description |
|---|---|
| TSurfaceLayer | type of the surface data this render data renders |
Properties
SurfaceLayer
Cached surface data this RenderData renders (generates meshes from)
Declaration
public TSurfaceLayer SurfaceLayer { get; protected set; }
Property Value
| Type | Description |
|---|---|
| TSurfaceLayer |
TerrainMetrics
Declaration
public HexTerrainMetrics TerrainMetrics { get; }
Property Value
| Type | Description |
|---|---|
| HexTerrainMetrics |
Methods
Init(TSurfaceLayer)
Initializes/Reinitializes a render data with provided surface data. If you have changed the surface data instance on the entity, call this function with a new surface data instance, so the render data caches it and reinitializes. Calls Init(surfaceData, RenderSettings) internally. uses cached RenderSettings as parameter. If your render settings are changed, call Init(surfaceData, renderSettings) instead Init(TSurfaceLayer, HexTerrainRenderSettings)
Declaration
public virtual void Init(TSurfaceLayer surfaceData)
Parameters
| Type | Name | Description |
|---|---|---|
| TSurfaceLayer | surfaceData | new surface data |
Init(TSurfaceLayer, HexTerrainRenderSettings)
Initializes/Reinitializes a render data with provided surface data and render settings. If you have changed the surface data instance on the entity, call this function with a new surface data instance, so the render data caches it and reinitializes.
Declaration
public virtual void Init(TSurfaceLayer surfaceData, HexTerrainRenderSettings renderSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| TSurfaceLayer | surfaceData | new surface data |
| HexTerrainRenderSettings | renderSettings | new render settings |
ReInit()
Reinitializes the render data with the cached surface data and cached render settings.
Declaration
public override void ReInit()