Class Cylinder
Defined in File shapes.h
Inheritance Relationships
Base Type
public shapes::Shape
(Class Shape)
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.
scaleLength – Cylinder length scaling factor.
-
void padd(double paddRadius, double paddLength)
Add non-uniform padding to this shape.
- Parameters:
paddRadius – Radius padding (in meters).
paddLength – Cylinder 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.
-
virtual void scaleAndPadd(double scale, double padd) override
Uniformly scale and padd 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.
-
Cylinder()