A parameterized generator of geometry.
An abstraction rather than a bag of static factory methods, so a shape is a
value: it can be stored, passed around, compared, kept in a list of things
the UI offers, and swapped for a caller-defined implementation. A static
Primitives.sphere(...) call can only be invoked, never held.
Implementations are expected to be immutable and cheap to construct; the work
happens in build.
base, so this can grow. A game writes its own shape by extending
this; it may not implements it. An implementer would stop compiling the
day a member is added here, which would make every addition to the shape
contract a breaking change for a published engine.
- Implementers
Constructors
- Shape()
-
const
Properties
Methods
-
build(
{VertexLayout layout = VertexLayout.standard}) → MeshData -
Generates the geometry for the requested
layout. -
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