Hex Terrains Framework
Search Results for

    Show / Hide Table of Contents

    Class CalcSurfaceMeshSourcesSystem<TSurface, TRenderData>

    Base system that calculates mesh sources for the chunks that are visible and dirty. When creating your own surface, override this system to work with your own surface data.

    Inheritance
    object
    ComponentSystemBase
    SystemBase
    CalcSurfaceMeshSourcesSystem<TSurface, TRenderData>
    CalcGroundMeshSourcesSystem
    CalcWaterMeshSourcesSystem
    Inherited Members
    SystemBase.Dependency
    SystemBase.CheckedStateRef
    SystemBase.CompleteDependency()
    SystemBase.Entities
    SystemBase.Job
    SystemBase.Update()
    SystemBase.OnUpdate()
    SystemBase.GetComponent<T>(Entity)
    SystemBase.SetComponent<T>(Entity, T)
    SystemBase.HasComponent<T>(Entity)
    SystemBase.HasBuffer<T>(Entity)
    SystemBase.GetComponentLookup<T>(bool)
    SystemBase.GetComponentDataFromEntity<T>(bool)
    SystemBase.GetBuffer<T>(Entity, bool)
    SystemBase.GetBufferLookup<T>(bool)
    SystemBase.GetBufferFromEntity<T>(bool)
    SystemBase.GetEntityStorageInfoLookup()
    SystemBase.GetStorageInfoFromEntity()
    SystemBase.Exists(Entity)
    ComponentSystemBase.Enabled
    ComponentSystemBase.EntityQueries
    ComponentSystemBase.GlobalSystemVersion
    ComponentSystemBase.LastSystemVersion
    ComponentSystemBase.EntityManager
    ComponentSystemBase.World
    ComponentSystemBase.SystemHandle
    ComponentSystemBase.SystemHandleUntyped
    ComponentSystemBase.Time
    ComponentSystemBase.WorldUpdateAllocator
    ComponentSystemBase.OnCreate()
    ComponentSystemBase.OnStartRunning()
    ComponentSystemBase.OnStopRunning()
    ComponentSystemBase.OnDestroy()
    ComponentSystemBase.ShouldRunSystem()
    ComponentSystemBase.GetComponentTypeHandle<T>(bool)
    ComponentSystemBase.GetDynamicComponentTypeHandle(ComponentType)
    ComponentSystemBase.GetBufferTypeHandle<T>(bool)
    ComponentSystemBase.GetSharedComponentTypeHandle<T>()
    ComponentSystemBase.GetDynamicSharedComponentTypeHandle(ComponentType)
    ComponentSystemBase.GetEntityTypeHandle()
    ComponentSystemBase.RequireForUpdate(EntityQuery)
    ComponentSystemBase.RequireAnyForUpdate(params EntityQuery[])
    ComponentSystemBase.RequireAnyForUpdate(NativeArray<EntityQuery>)
    ComponentSystemBase.RequireForUpdate<T>()
    ComponentSystemBase.RequireSingletonForUpdate<T>()
    ComponentSystemBase.HasSingleton<T>()
    ComponentSystemBase.GetSingleton<T>()
    ComponentSystemBase.GetSingletonRW<T>()
    ComponentSystemBase.GetSingletonBuffer<T>(bool)
    ComponentSystemBase.TryGetSingleton<T>(out T)
    ComponentSystemBase.TryGetSingletonBuffer<T>(out DynamicBuffer<T>)
    ComponentSystemBase.SetSingleton<T>(T)
    ComponentSystemBase.GetSingletonEntity<T>()
    ComponentSystemBase.TryGetSingletonEntity<T>(out Entity)
    ComponentSystemBase.GetEntityQuery(params ComponentType[])
    ComponentSystemBase.GetEntityQuery(NativeArray<ComponentType>)
    ComponentSystemBase.GetEntityQuery(params EntityQueryDesc[])
    ComponentSystemBase.GetEntityQuery(in EntityQueryBuilder)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Fwt.HexTerrains.Systems
    Assembly: fwt.hexterrains.dll
    Syntax
    [UpdateInGroup(typeof(HexTerrainsStartPreRenderGroup))]
    public abstract class CalcSurfaceMeshSourcesSystem<TSurface, TRenderData> : SystemBase where TSurface : HexSurfaceLayer where TRenderData : HexSurfaceRenderLayer<TSurface>
    Type Parameters
    Name Description
    TSurface
    TRenderData

    Methods

    CalcMeshSources(in HexTerrainVisibility, TSurface, TRenderData, ChunksGridLayer)

    Calculates mesh sources for the chunks that are visible and dirty.

    Declaration
    public virtual void CalcMeshSources(in HexTerrainVisibility terrainVisibility, TSurface surfaceData, TRenderData renderData, ChunksGridLayer chunksGridData)
    Parameters
    Type Name Description
    HexTerrainVisibility terrainVisibility
    TSurface surfaceData

    Surface data to generate meshes based on

    TRenderData renderData

    Render data that holds meshes and mesh sources for mesh generation

    ChunksGridLayer chunksGridData

    Chunks data (visible, dirty, etc.)

    ScheduleGenerateMeshJob(TSurface, TRenderData, ChunkMetricsDataLayer, ChunkMeshSourcesDataLayer, CellMetricsDataLayer, int, JobHandle)

    Schedules a job to generate a mesh for the chunk with a given index. If you want to introduce your own mesh generator, override this method and schedule your own job.

    Declaration
    protected virtual JobHandle ScheduleGenerateMeshJob(TSurface surfaceData, TRenderData renderData, ChunkMetricsDataLayer chunkMetrics, ChunkMeshSourcesDataLayer chunkMeshSources, CellMetricsDataLayer cellMetrics, int chunkIndex, JobHandle dependency)
    Parameters
    Type Name Description
    TSurface surfaceData

    Surface data to render a mesh based on

    TRenderData renderData

    Render data that holds generated meshes and mesh sources

    ChunkMetricsDataLayer chunkMetrics

    Metrix of all terrain chunks

    ChunkMeshSourcesDataLayer chunkMeshSources

    MeshSources to save generated mesh data into

    CellMetricsDataLayer cellMetrics

    Metrics of all cells

    int chunkIndex

    Index of chunk to schedule a mesh generation for

    JobHandle dependency

    JobHandle to use as parameter when scheduling job

    Returns
    Type Description
    JobHandle

    Extension Methods

    HashExtensions.GetHashCode_RefType<TValue>(TValue, int)
    HashExtensions.GetHashCode_RefType<TValue>(TValue, int)
    Extensions_UnityObject.SmartDestroy(object)
    Extensions_UnityObject.SmartDestroy(object)
    Extensions_UnityObject.SmartGetComponent<TComponent>(object)
    Extensions_UnityObject.SmartGetComponent<TComponent>(object)
    Extensions_UnityObject.SmartGetGameGameObject(object)
    Extensions_UnityObject.SmartGetGameGameObject(object)
    In this article
    Back to top Generated by DocFX