TubeGeometry constructor

TubeGeometry(
  1. ScenePath path, {
  2. double radius = 0.5,
  3. int radialSegments = 12,
  4. int stations = 64,
  5. bool caps = true,
  6. GeometryStorage storage = GeometryStorage.fixed,
})

Sweeps a tube of the given radius along path.

radialSegments sets how many faces wrap the circumference and stations how many cross-sections run along the path. With caps the two ends are closed by a disk. Pass GeometryStorage.updatable to allow updatePath.

Implementation

factory TubeGeometry(
  ScenePath path, {
  double radius = 0.5,
  int radialSegments = 12,
  int stations = 64,
  bool caps = true,
  GeometryStorage storage = GeometryStorage.fixed,
}) {
  return TubeGeometry._(
    radius,
    radialSegments,
    stations,
    caps,
    buildTubeArrays(
      path,
      radius: radius,
      radialSegments: radialSegments,
      stations: stations,
      caps: caps,
    ),
    storage,
  );
}