LodSpec class final

A target ratio and the screen size below which it takes over.

A recipe, not a mesh. Simplifying is real work — simplifyMeshWithAttributes (pro-lod-01/pro-lod-02, in flutter3d_mesh) walks every triangle of the base mesh — so a LodSpec only ever holds what was asked for; LodMeshCache (lod_cache.dart) is what turns one into an actual MeshData, generated once per ModelObject.version and kept until either the ratio changes or the base mesh does.

ratio and maxScreenFraction are the same two numbers packages/flutter3d's own LodLevel already needs to build a LodGroup — this is the editor-side half that says how each level was made, where LodLevel is the viewport-side half that only cares what it looks like once made.

Constructors

LodSpec({required double ratio, required double maxScreenFraction})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
maxScreenFraction → double
Fraction of the viewport's height below which this level is used — LodLevel.maxScreenFraction's own meaning in package:flutter3d, carried here so a project file can say how a level was chosen without depending on the engine that consumes it.
final
ratio → double
Target triangle count against the base mesh's own, as a fraction in (0, 1] — 1.0 asks for no reduction at all, which simplifyMesh/simplifyMeshWithAttributes already hand back unchanged rather than doing free work to produce a copy.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({double? ratio, double? maxScreenFraction}) → LodSpec
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited