CylinderGeometry constructor

CylinderGeometry({
  1. double bottomRadius = 0.5,
  2. double topRadius = 0.5,
  3. double height = 1.0,
  4. int radialSegments = 32,
  5. int heightSegments = 1,
  6. bool bottomCap = true,
  7. bool topCap = true,
})

Builds a cylinder (or cone/truncated cone) of the given dimensions.

Implementation

factory CylinderGeometry({
  double bottomRadius = 0.5,
  double topRadius = 0.5,
  double height = 1.0,
  int radialSegments = 32,
  int heightSegments = 1,
  bool bottomCap = true,
  bool topCap = true,
}) {
  return CylinderGeometry._(
    bottomRadius,
    topRadius,
    height,
    radialSegments,
    buildCylinderArrays(
      bottomRadius: bottomRadius,
      topRadius: topRadius,
      height: height,
      radialSegments: radialSegments,
      heightSegments: heightSegments,
      bottomCap: bottomCap,
      topCap: topCap,
    ),
  );
}