Class Cone

Inheritance Relationships

Base Type

Class Documentation

class Cone : public shapes::Shape

Definition of a cone Tip is on positive z axis. Center of base is on negative z axis. Origin is halway between tip and center of base.

Public Functions

Cone()
Cone(double r, double l)
void scale(double scaleRadius, double scaleLength)

Scale this shape by a non-uniform factor.

Parameters:
  • scaleRadius – Radius scaling factor.

  • scaleLengthCone length scaling factor.

void padd(double paddRadius, double paddLength)

Add non-uniform padding to this shape.

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

  • paddLengthCone 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.

  • scaleLengthCone length scaling factor.

  • paddRadius – Radius padding (in meters).

  • paddLengthCone length padding (in meters).

virtual void scaleAndPadd(double scale, double padd) override

Uniformly scale and padd this shape.

virtual Cone *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 (height) of the cone.

double radius

The radius of the cone.

Public Static Attributes

static const std::string STRING_NAME

The type of the shape, as a string.