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

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

#include <shapes.h>

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

Public Member Functions

Cylinderclone () const override
 Create a copy of this shape. More...
 
 Cylinder ()
 
 Cylinder (double r, double l)
 The radius and the length of the cylinder. More...
 
void padd (double padding)
 Add uniform padding to this shape. More...
 
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 scale)
 Uniformly scale this shape by a factor. More...
 
void scale (double scaleRadius, double scaleLength)
 Scale this shape by a non-uniform factor. More...
 
void scaleAndPadd (double scale, double padd) override
 Uniformly scale and padd this shape. 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...
 
- 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 of the cylinder. More...
 
double radius
 The radius of the cylinder. More...
 
- Public Attributes inherited from shapes::Shape
ShapeType type
 The type of the shape. More...
 

Static Public Attributes

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

Detailed Description

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

Definition at line 127 of file shapes.h.

Constructor & Destructor Documentation

◆ Cylinder() [1/2]

shapes::Cylinder::Cylinder ( )

Definition at line 142 of file shapes.cpp.

◆ Cylinder() [2/2]

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

The radius and the length of the cylinder.

Definition at line 148 of file shapes.cpp.

Member Function Documentation

◆ clone()

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

Create a copy of this shape.

Implements shapes::Shape.

Definition at line 252 of file shapes.cpp.

◆ padd() [1/2]

void shapes::Shape::padd

Add uniform padding to this shape.

Definition at line 320 of file shapes.cpp.

◆ padd() [2/2]

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

Add non-uniform padding to this shape.

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

Definition at line 348 of file shapes.cpp.

◆ print()

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

Print information about this shape.

Reimplemented from shapes::Shape.

Definition at line 480 of file shapes.cpp.

◆ scale() [1/2]

void shapes::Shape::scale

Uniformly scale this shape by a factor.

Definition at line 315 of file shapes.cpp.

◆ scale() [2/2]

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

Scale this shape by a non-uniform factor.

Parameters
scaleRadiusRadius scaling factor.
scaleLengthCylinder length scaling factor.

Definition at line 343 of file shapes.cpp.

◆ scaleAndPadd() [1/2]

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

Uniformly scale and padd this shape.

Implements shapes::Shape.

Definition at line 353 of file shapes.cpp.

◆ scaleAndPadd() [2/2]

void shapes::Cylinder::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.
scaleLengthCylinder length scaling factor.
paddRadiusRadius padding (in meters).
paddLengthCylinder length padding (in meters).

Definition at line 333 of file shapes.cpp.

Member Data Documentation

◆ length

double shapes::Cylinder::length

The length of the cylinder.

Definition at line 169 of file shapes.h.

◆ radius

double shapes::Cylinder::radius

The radius of the cylinder.

Definition at line 172 of file shapes.h.

◆ STRING_NAME

const std::string shapes::Cylinder::STRING_NAME = "cylinder"
static

The type of the shape, as a string.

Definition at line 139 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 Mon Sep 28 2020 03:43:09