Search Results for

    Show / Hide Table of Contents

    Class TerrainChunk

    Represents a single terrain chunk.

    Inheritance
    System.Object
    Object
    TerrainChunk
    Implements
    ISerializable
    Inherited Members
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public sealed class TerrainChunk : Object, ISerializable

    Constructors

    TerrainChunk()

    Initializes a new instance of the TerrainChunk.

    Declaration
    public TerrainChunk()

    Properties

    OverrideMaterial

    The material to override the terrain default one for this chunk.

    Declaration
    [Unmanaged]
    public MaterialBase OverrideMaterial { get; set; }
    Property Value
    MaterialBase

    Methods

    Draw(ref RenderContext, MaterialBase, Int32)

    Draws the terrain chunk.

    Declaration
    [Unmanaged]
    public void Draw(ref RenderContext renderContext, MaterialBase material, int lodIndex = 0)
    Parameters
    RenderContext renderContext

    The rendering context.

    MaterialBase material

    The material to use for rendering.

    System.Int32 lodIndex

    The LOD index.

    GetBounds()

    Gets the chunk world bounds.

    Declaration
    [Unmanaged]
    public BoundingBox GetBounds()
    Returns
    BoundingBox

    GetHeightmapUVScaleBias()

    Gets the scale (in XY) and bias (in ZW) applied to the vertex UVs to get the chunk coordinates.

    Declaration
    [Unmanaged]
    public Float4 GetHeightmapUVScaleBias()
    Returns
    Float4

    GetPatch()

    Gets the patch.

    Declaration
    [Unmanaged]
    public TerrainPatch GetPatch()
    Returns
    TerrainPatch

    GetTransform()

    Gets the chunk transformation (world to local).

    Declaration
    [Unmanaged]
    public Transform GetTransform()
    Returns
    Transform

    GetX()

    Gets the x coordinate.

    Declaration
    [Unmanaged]
    public int GetX()
    Returns
    System.Int32

    GetZ()

    Gets the z coordinate.

    Declaration
    [Unmanaged]
    public int GetZ()
    Returns
    System.Int32

    Intersects(Ray, out Single)

    Determines if there is an intersection between the terrain chunk and a point

    Declaration
    [Unmanaged]
    public bool Intersects(Ray ray, out float distance)
    Parameters
    Ray ray

    The ray.

    System.Single distance

    The output distance.

    Returns
    System.Boolean

    True if chunk intersects with the ray, otherwise false.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat