Class TerrainChunk
Represents a single terrain chunk.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public sealed class TerrainChunk : Object, ISerializable
Constructors
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()
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. |