generateVertexPositions method Null safety
- Vector3List positions,
- Uint16List indices
override
Implementation
@override
void generateVertexPositions(Vector3List positions, Uint16List indices) {
final v = Vector3.zero();
var index = 0;
for (var i = 0; i <= _segments; i++) {
final percent = i / _segments;
v
..x = _innerRadius * math.cos(_thetaStart + percent * _thetaLength)
..z = _innerRadius * math.sin(_thetaStart + percent * _thetaLength);
positions[index] = v;
index++;
v
..x = _outerRadius * math.cos(_thetaStart + percent * _thetaLength)
..z = _outerRadius * math.sin(_thetaStart + percent * _thetaLength);
positions[index] = v;
index++;
}
assert(index == vertexCount);
}