Public Member Functions | Public Attributes | Static Public Attributes | List of all members
shapes::Cone Class Reference

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. More...

#include <shapes.h>

Inheritance diagram for shapes::Cone:
Inheritance graph
[legend]

Public Member Functions

Coneclone () const override
 Create a copy of this shape. More...
 
 Cone ()
 
 Cone (double r, double l)
 
void padd (double paddRadius, double paddLength)
 Add non-uniform padding to this shape. More...
 
void print (std::ostream &out=std::cout) const override
 Print information about this shape. More...
 
void scale (double scaleRadius, double scaleLength)
 Scale this shape by a non-uniform factor. More...
 
void scaleAndPadd (double scaleRadius, double scaleLength, double paddRadius, double paddLength)
 Scale this shape by a non-uniform factor and then add non-uniform padding. More...
 
void scaleAndPadd (double scale, double padd) override
 Uniformly scale and padd this shape. More...
 
- Public Member Functions inherited from shapes::Shape
virtual bool isFixed () const
 Return a flag indicating whether this shape can be scaled and/or padded. More...
 
void padd (double padding)
 Add uniform padding to this shape. More...
 
void scale (double scale)
 Uniformly scale this shape by a factor. More...
 
 Shape ()
 
virtual ~Shape ()
 

Public Attributes

double length
 The length (height) of the cone. More...
 
double radius
 The radius of the cone. More...
 
- Public Attributes inherited from shapes::Shape
ShapeType type
 The type of the shape. More...
 

Static Public Attributes

static const std::string STRING_NAME = "cone"
 The type of the shape, as a string. More...
 

Detailed Description

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.

Definition at line 178 of file shapes.h.

Constructor & Destructor Documentation

◆ Cone() [1/2]

shapes::Cone::Cone ( )

Definition at line 125 of file shapes.cpp.

◆ Cone() [2/2]

shapes::Cone::Cone ( double  r,
double  l 
)

Definition at line 131 of file shapes.cpp.

Member Function Documentation

◆ clone()

Cone * shapes::Cone::clone ( ) const
overridevirtual

Create a copy of this shape.

Implements shapes::Shape.

Definition at line 225 of file shapes.cpp.

◆ padd()

void shapes::Cone::padd ( double  paddRadius,
double  paddLength 
)

Add non-uniform padding to this shape.

Parameters
paddRadiusRadius padding (in meters).
paddLengthCone length padding (in meters).

Definition at line 341 of file shapes.cpp.

◆ print()

void shapes::Cone::print ( std::ostream &  out = std::cout) const
overridevirtual

Print information about this shape.

Reimplemented from shapes::Shape.

Definition at line 453 of file shapes.cpp.

◆ scale()

void shapes::Cone::scale ( double  scaleRadius,
double  scaleLength 
)

Scale this shape by a non-uniform factor.

Parameters
scaleRadiusRadius scaling factor.
scaleLengthCone length scaling factor.

Definition at line 336 of file shapes.cpp.

◆ scaleAndPadd() [1/2]

void shapes::Cone::scaleAndPadd ( double  scaleRadius,
double  scaleLength,
double  paddRadius,
double  paddLength 
)

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

Parameters
scaleRadiusRadius scaling factor.
scaleLengthCone length scaling factor.
paddRadiusRadius padding (in meters).
paddLengthCone length padding (in meters).

Definition at line 326 of file shapes.cpp.

◆ scaleAndPadd() [2/2]

void shapes::Cone::scaleAndPadd ( double  scale,
double  padd 
)
overridevirtual

Uniformly scale and padd this shape.

Implements shapes::Shape.

Definition at line 346 of file shapes.cpp.

Member Data Documentation

◆ length

double shapes::Cone::length

The length (height) of the cone.

Definition at line 218 of file shapes.h.

◆ radius

double shapes::Cone::radius

The radius of the cone.

Definition at line 221 of file shapes.h.

◆ STRING_NAME

const std::string shapes::Cone::STRING_NAME = "cone"
static

The type of the shape, as a string.

Definition at line 188 of file shapes.h.


The documentation for this class was generated from the following files:


geometric_shapes
Author(s): Ioan Sucan , Gil Jones
autogenerated on Tue May 26 2020 03:13:02