• Manual
  • Scripting API
  • Asset Store
  • TycoonTerrain.Core.Rendering
  • NativeMeshData
Search Results for

    Show / Hide Table of Contents
    • TycoonTerrain.Components
      • TycoonTileRendererBase
    • TycoonTerrain.Core
      • BoundsContainer
      • BoundsReservationRegister
      • CallbackHandle
      • CallbacksRegister
      • CardinalDirection
      • ChunkSet
      • ConstructableDefinition
      • CornerIndex
      • Extensions
      • IChunkListener
      • IntBound
      • LandTile
      • OnBoundsChangeCallback
      • PlacementValidResult
      • SurfaceOverlayMesh
      • TerrainGrid
      • TerrainModifiedEvent
      • TerrainSelection
      • TerrainTypeCollectionAsset
      • TerrainTypeDefinition
      • TerrainTypeTable
      • TileCorner
      • TileHandle
      • TilePosition
      • TileType
      • TycoonTileMap
      • TycoonTileRaycastHit
    • TycoonTerrain.Core.Generation
      • TerrainGenerationJob
    • TycoonTerrain.Core.Rendering
      • ChunkMesh
      • IMesh
      • NativeMeshData
      • RenderTerrainCliffChunkJob
      • RenderTerrainSurfaceChunkJob
      • RenderWaterChunkJob
      • RenderWaterCliffChunkJob
      • SubMeshTriangle
    • TycoonTerrain.Core.TerrainOperations
      • ClearWaterBodyOperation
      • CopyHeightMapOperation
      • CreateWaterBodyFloodOperation
      • DecreaseHeightCliffOperation
      • DecreaseHeightCorner
      • DecreaseHeightSmoothConnectedOperation
      • GetTilesInWaterBody
      • IncreaseHeightCliffOperation
      • IncreaseHeightCorner
      • IncreaseHeightSmoothConnectedOperation
      • ITerrainOperation
      • MaxHeightSmooth
      • OperationContext
      • OperationResult
      • SetHeightOperation
      • SetTileTypeInBoundsOperation
      • SetWaterLevelOperation
    • TycoonTerrain.Previewers
      • BuildingToolPreviewer
      • PreviewMeshes
      • TerrainPainterPreviewer
      • TerrainSelectionPreviewer
      • ToolPreviewerBase<T>
    • TycoonTerrain.Tools
      • BuildingTool
      • PainterTool
      • SceneryTool
      • SelectionToolBase
      • SnappingMode
      • TerraformingTool
      • ToolBase
      • WaterTool

    Struct NativeMeshData

    Structure used by rendering jobs to facilitate mesh building in the Unity Job System on background threads.

    Namespace: TycoonTerrain.Core.Rendering
    Assembly: TycoonTerrainAssembly.dll
    Syntax
    public struct NativeMeshData

    Constructors

    NativeMeshData(Allocator)

    Declaration
    public NativeMeshData(Allocator allocator)
    Parameters
    Type Name Description
    Unity.Collections.Allocator allocator

    NativeMeshData(NativeList<SubMeshTriangle>, NativeList<float3>, NativeList<float2>)

    Declaration
    public NativeMeshData(NativeList<SubMeshTriangle> indices, NativeList<float3> verts, NativeList<float2> uv)
    Parameters
    Type Name Description
    Unity.Collections.NativeList<SubMeshTriangle> indices
    Unity.Collections.NativeList<Unity.Mathematics.float3> verts
    Unity.Collections.NativeList<Unity.Mathematics.float2> uv

    Fields

    indices

    Declaration
    public NativeList<SubMeshTriangle> indices
    Field Value
    Type Description
    Unity.Collections.NativeList<SubMeshTriangle>

    uvs

    Declaration
    public NativeList<float2> uvs
    Field Value
    Type Description
    Unity.Collections.NativeList<Unity.Mathematics.float2>

    vertices

    Declaration
    public NativeList<float3> vertices
    Field Value
    Type Description
    Unity.Collections.NativeList<Unity.Mathematics.float3>

    Methods

    CopyData(NativeMeshData, List<Vector3>, List<List<Int32>>, Dictionary<TileType, Int32>, List<Vector2>)

    Copies the data from the native mesh data to managed data arrays.

    Declaration
    public static void CopyData(NativeMeshData from, List<Vector3> vertices, List<List<int>> indices, Dictionary<TileType, int> terrainTypeMapping, List<Vector2> uvs)
    Parameters
    Type Name Description
    NativeMeshData from

    NativeMeshData instance to copy data from.

    List<UnityEngine.Vector3> vertices

    The destination vertices.

    List<List<Int32>> indices

    The destination indices.

    Dictionary<TileType, Int32> terrainTypeMapping

    The tile type to submesh mappings.

    List<Vector2> uvs

    The destination uvs.

    CopyData(NativeMeshData, List<Vector3>, List<Int32>, List<Vector2>)

    Copies the data from the native mesh data to managed data arrays.

    Declaration
    public static void CopyData(NativeMeshData from, List<Vector3> vertices, List<int> indices, List<Vector2> uvs)
    Parameters
    Type Name Description
    NativeMeshData from

    NativeMeshData instance to copy data from.

    List<UnityEngine.Vector3> vertices

    The destination vertices.

    List<Int32> indices

    The destination indices.

    List<Vector2> uvs

    The destination uvs.

    CopyIndices(NativeMeshData, List<List<Int32>>, Dictionary<TileType, Int32>)

    Declaration
    public static void CopyIndices(NativeMeshData from, List<List<int>> indices, Dictionary<TileType, int> mapping)
    Parameters
    Type Name Description
    NativeMeshData from
    List<List<Int32>> indices
    Dictionary<TileType, Int32> mapping

    CopyIndicesFlat(NativeMeshData, List<Int32>)

    Ignores terrain type info and copies the indices to a flat array

    Declaration
    public static void CopyIndicesFlat(NativeMeshData from, List<int> indices)
    Parameters
    Type Name Description
    NativeMeshData from

    The source native mesh data.

    List<Int32> indices

    The destination indices list.

    Dispose()

    Declaration
    public void Dispose()
    In This Article
    • Constructors
      • NativeMeshData(Allocator)
      • NativeMeshData(NativeList<SubMeshTriangle>, NativeList<float3>, NativeList<float2>)
    • Fields
      • indices
      • uvs
      • vertices
    • Methods
      • CopyData(NativeMeshData, List<Vector3>, List<List<Int32>>, Dictionary<TileType, Int32>, List<Vector2>)
      • CopyData(NativeMeshData, List<Vector3>, List<Int32>, List<Vector2>)
      • CopyIndices(NativeMeshData, List<List<Int32>>, Dictionary<TileType, Int32>)
      • CopyIndicesFlat(NativeMeshData, List<Int32>)
      • Dispose()
    Back to top Tycoon Tile documentation