RenderedOMeshRect constructor
RenderedOMeshRect({})
Creates a new RenderedOMeshRect from a OMeshRect and a ui.Rect.
Implementation
RenderedOMeshRect({
required this.mesh,
required ui.Rect rect,
List<OVertex>? normalizedVerticesOverride,
}) {
final denormalizedVertices = (normalizedVerticesOverride ?? mesh.vertices)
.map((ov) => ov.denormalize(rect))
.toList();
vertices = List.generate(
denormalizedVertices.length,
(index) => RenderedOVertex._fromVerticeOnMesh(
index,
mesh.width,
denormalizedVertices,
),
);
}