Class ModelLOD
Represents single Level Of Detail for the model. Contains a collection of the meshes.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class ModelLOD : Object
Constructors
ModelLOD()
Properties
Box
Gets the bounding box combined for all meshes in this model LOD.
Declaration
[Unmanaged]
public BoundingBox Box { get; }
Property Value
BoundingBox
|
LODIndex
Gets the model LOD index.
Declaration
[Unmanaged]
public int LODIndex { get; }
Property Value
System.Int32
|
Meshes
ScreenSize
The screen size to switch LODs. Bottom limit of the model screen size to render this LOD.
Declaration
[Unmanaged]
public float ScreenSize { get; set; }
Property Value
System.Single
|
VertexCount
Gets the vertex count for this model LOD level.
Declaration
[Unmanaged]
public int VertexCount { get; }
Property Value
System.Int32
|
Methods
Draw(ref RenderContext, MaterialBase, ref Matrix, StaticFlags, Boolean, DrawPass, Single, SByte)
Draws the meshes from the model LOD.
Declaration
[Unmanaged]
public void Draw(ref RenderContext renderContext, MaterialBase material, ref Matrix world, StaticFlags flags, bool receiveDecals = true, DrawPass drawModes, float perInstanceRandom = 0F, sbyte sortOrder = 0)
Parameters
RenderContext
renderContext
The rendering context. |
MaterialBase
material
The material to use for rendering. |
Matrix
world
The world transformation of the model. |
StaticFlags
flags
The object static flags. |
System.Boolean
receiveDecals
True if rendered geometry can receive decals, otherwise false. |
DrawPass
drawModes
The draw passes to use for rendering this object. |
System.Single
perInstanceRandom
The random per-instance value (normalized to range 0-1). |
System.SByte
sortOrder
Object sorting key. |