API Reference · Scene and camera

LevelOfDetail

Namespace: Ava3D

public sealed record class LevelOfDetail

A coarser version of a MeshNode's mesh, drawn in its place from a distance onwards.

Why distance and not screen size. Screen size is the better measure in principle — it knows the field of view and the resolution — and it is also the one a person cannot reason about while placing ferns in a forest. "Past eight metres the fern is the light one" can be checked by walking eight metres; a coverage fraction cannot. It is what three.js and Babylon.js ask for, and the reason is the same.

Constructors

MemberDescription
LevelOfDetail(float Distance, Mesh Mesh, Material Material = null)

A coarser version of a MeshNode's mesh, drawn in its place from a distance onwards.

Why distance and not screen size. Screen size is the better measure in principle — it knows the field of view and the resolution — and it is also the one a person cannot reason about while placing ferns in a forest. "Past eight metres the fern is the light one" can be checked by walking eight metres; a coverage fraction cannot. It is what three.js and Babylon.js ask for, and the reason is the same.

Distance

From how far away this level is drawn, in world units: the distance from the camera to the centre of the copy's bounds. It is drawn until the next level's distance, or until MeshNode.MaxDrawDistance.

Mesh

The geometry drawn from that distance.

Material

How it is shaded, or null to wear the node's own material.

Properties

MemberDescription
float Distance { get; set; }

From how far away this level is drawn, in world units: the distance from the camera to the centre of the copy's bounds. It is drawn until the next level's distance, or until MeshNode.MaxDrawDistance.

Material Material { get; set; }

How it is shaded, or null to wear the node's own material.

Mesh Mesh { get; set; }

The geometry drawn from that distance.

See also