Class DistanceSortingMesh
Sorts the mesh based on the distance to the camera.
Namespace: Evergine.Framework.Graphics.Sorting
Assembly: Evergine.Framework.dll
Syntax
public class DistanceSortingMesh : SortingMesh
Methods
EncodeDistance(float)
Encodes the float distance into an unsigned integer.
Declaration
public static uint EncodeDistance(float distance)
Parameters
| Type | Name | Description |
|---|---|---|
| float | distance | The float distance. |
Returns
| Type | Description |
|---|---|
| uint | The uint encoded distance. |
FillSortingKeys(DrawContext, FastList<RenderObjectInfo>, int, int, SortKey[])
Fills the sorting key array.
Declaration
public override void FillSortingKeys(DrawContext drawContext, FastList<RenderObjectInfo> renderObjects, int count, int offset, SortKey[] sortKeys)
Parameters
| Type | Name | Description |
|---|---|---|
| DrawContext | drawContext | The draw context. |
| FastList<RenderObjectInfo> | renderObjects | |
| int | count | The number of meshes to render. |
| int | offset | The offset in render meshes. |
| SortKey[] | sortKeys | The array of sort keys to fill. |