ShapeMesh class final

A 3-D shape's triangles on the CPU, in its own space: the renderer's axes (+Y down), metres. Front faces wind counter-clockwise seen from outside, as glTF's do once turned into engine axes.

Available extensions

Constructors

ShapeMesh({required Float32List positions, required Float32List normals, required Float32List uvs, required Uint32List indices})
A mesh of indices triangles over its vertices.

Properties

bounds → Aabb3
The box around every vertex; empty for no vertices.
no setter
geometry → ModelGeometry

Available on ShapeMesh, provided by the ShapeMeshGeometry extension

Its triangles alone.
no setter
hashCode → int
The hash code for this object.
no setterinherited
indices → Uint32List
Three per triangle.
final
normals → Float32List
x, y, z per vertex, unit length.
final
positions → Float32List
x, y, z per vertex.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
triangleCount → int
How many triangles there are.
no setter
uvs → Float32List
u, v per vertex.
final
vertexCount → int
How many vertices there are.
no setter

Methods

faceted() → ShapeMesh
The same triangles, each with vertices of its own and its face's normal: hard edges everywhere, the low-poly look.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toPrimitive({int? material = 0}) → PrimitiveData
As the renderer takes it: interleaved vertices (kVertexFloats each: no tangents — the shader derives them — and white vertex colour).
toString() → String
A string representation of this object.
inherited

Operators

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