Class Cylinder

Inheritance Relationships

Base Type

Class Documentation

class Cylinder : public shapes::Shape

Definition of a cylinder Length is along z axis. Origin is at center of mass.

Public Functions

Cylinder()
Cylinder(double r, double l)

The radius and the length of the cylinder.

void scale(double scaleRadius, double scaleLength)

Scale this shape by a non-uniform factor.

Parameters:
  • scaleRadius – Radius scaling factor.

  • scaleLengthCylinder length scaling factor.

void padd(double paddRadius, double paddLength)

Add non-uniform padding to this shape.

Parameters:
  • paddRadius – Radius padding (in meters).

  • paddLengthCylinder length padding (in meters).

void scaleAndPadd(double scaleRadius, double scaleLength, double paddRadius, double paddLength)

Scale this shape by a non-uniform factor and then add non-uniform padding.

Parameters:
  • scaleRadius – Radius scaling factor.

  • scaleLengthCylinder length scaling factor.

  • paddRadius – Radius padding (in meters).

  • paddLengthCylinder length padding (in meters).

virtual void scaleAndPadd(double scale, double padd) override

Uniformly scale and padd this shape.

virtual Cylinder *clone() const override

Create a copy of this shape.

virtual void print(std::ostream &out = std::cout) const override

Print information about this shape.

void padd(double padding)

Add uniform padding to this shape.

void scale(double scale)

Uniformly scale this shape by a factor.

Public Members

double length

The length of the cylinder.

double radius

The radius of the cylinder.

Public Static Attributes

static const std::string STRING_NAME

The type of the shape, as a string.