ShapeBuffers class
The Brain's shape SoA for one frame, bundled for DrawFrame.
Deliberately not CSR, unlike MeshBuffers: the Brain writes a fixed
stride of 12 vertices per part and reports how many of them are live in
counts. A non-shape part carries count 0 and zero-filled slots, so the
buffers are always parts × 24 long whether or not the animation has shapes.
Constructors
- ShapeBuffers({required Float32List vertices, required Float32List boxCoords, required Int32List counts})
-
const
Properties
- boxCoords → Float32List
-
Interleaved
[fx,fy,…]normalised box coordinates, same stride:(0,0)is the LT corner of the shape's pre-pivot bounding box,(1,1)the RB — free of pivot and coordinate system. The Brain emits these purely so a Body can bilinearly interpolate the four PartColor corners onto vertices that are not corners (a star's points, a fan's center).final - counts → Int32List
-
Live vertex count per part. The only valid slice — there is no offsets
array, and
DrawBatch.vertex_countis 0 for a Shape batch (the Brain fills it for Normal only).final - hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
True when this frame carries no shape data at all.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- vertices → Float32List
-
Interleaved
[x,y,…]local-space positions,part * 24 + 2*v.final
Methods
-
countOf(
int p) → int -
Part
p's live vertex count, or 0 when it draws no shape this frame. -
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