BrushSurface class final

The triangles of every brush sharing one material and one answer about shadows.

Plain arrays rather than the engine's MeshData, because this package does not depend on the engine and should not: turning brushes into triangles is arithmetic, and arithmetic has no business knowing about a GPU. The application interleaves these into whatever vertex layout it draws with, which is about twenty lines and the only place the two packages meet.

Constructors

BrushSurface({required String material, required ShadowCasting shadowCasting, required Float32List positions, required Float32List normals, required Float32List texcoords, required Float32List tangents, required Uint32List indices, Float32List? lightmapUvs, int? brush})

Properties

bounds → Aabb3
The box around every vertex, for deciding whether a batch can be seen.
latefinal
brush → int?
Which of the level's brushes this surface is, when the level was built one surface per brush (BrushGeometry.build's perBrush), and null when it is a batch of many.
final
castsShadow → bool
Whether it takes part in the shadow pass at all — the two-state view of shadowCasting, as on the brushes this came from.
no setter
hashCode → int
The hash code for this object.
no setterinherited
indices → Uint32List
final
lightmapUvs → Float32List?
Two floats per vertex: where the vertex is in the level's lightmap.
final
material → String
final
normals → Float32List
Three floats per vertex.
final
positions → Float32List
Three floats per vertex.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shadowCasting → ShadowCasting
How the mesh built from this takes part in the shadow pass.
final
tangents → Float32List
Four floats per vertex: the tangent direction, and a handedness sign.
final
texcoords → Float32List
Two floats per vertex.
final
triangleCount → int
no setter
vertexCount → int
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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