DrawableGeometry class abstract base

A mesh that has reached the device and can therefore be drawn.

A subtype of MeshGeometry rather than a separate interface, which is not bookkeeping: the renderer's draw loops hold a MeshGeometry and ask whether it is drawable, and Dart promotes an is test only towards a subtype.

Kept at the freeze, and for a different reason than it was created with. It was introduced so the renderer would not name a backend for the sake of one is check — it used to test for GpuMesh, the backend class. That reason expired when DeviceMesh moved into this package: testing for it would name no backend either.

What it still does is name the distinction the four is checks in the draw loops actually make. MeshGeometry has two implementations and only one of them can be drawn: geometry that reached the device, and geometry that is triangles in Dart memory. A check against the concrete class would ask "is it this one" where the loop means "can this be drawn", and those come apart the first time there is a second drawable kind.

One implementation today, which is why it was on the freeze list at all. The argument for keeping it is the second implementation of its parent, not a hypothetical second implementation of itself.

Nothing here is CPU-readable: the buffers are opaque handles, and MeshGeometry.source is still where triangles come from when anything needs them.

Extended, not implemented, outside this library: a base type, so a member added in a 1.x release arrives with a body and nothing that extends it has to change.

Mixed-in types

Constructors

DrawableGeometry()

Properties

boundingRadius → double
Radius of the sphere around the bounds centre, used to frame a camera.
no setterinherited
bounds → Aabb3
Object-space bounds.
no setterinherited
clusters → ClusteredIndices?
The runs indices is cut into for culling, with the indices themselves on the CPU to repack a subset from — C9. Null for a mesh drawn whole, which is every mesh the splitter was not asked about.
no setter
hashCode → int
The hash code for this object.
no setterinherited
indexCount → int
Count of indices in the mesh, three per triangle.
no setterinherited
indexType → IndexType
The width of one index. Chosen at upload from the vertex count.
no setter
indices → GeometryBuffer
The triangle-list indices into vertices, at the width indexType names.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source → MeshData?
The CPU-side geometry, when it is still around.
no setterinherited
version → int
Bumped whenever the geometry changes in place — DeviceMesh. overwriteVertices — so a cache keyed on this mesh (a node's bounds) sees the change an identity check cannot. Zero for geometry that never changes.
no setterinherited
vertexCount → int
Count of vertices in the mesh.
no setterinherited
vertices → GeometryBuffer
Interleaved vertex attributes, in the layout the vertex stage declares.
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