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

virtual Shapeclone () const
 Create a copy of this shape. More...
 
 Cylinder ()
 
 Cylinder (double r, double l)
 The radius and the length of the cylinder. More...
 
virtual void print (std::ostream &out=std::cout) const
 Print information about this shape. More...
 
virtual void scaleAndPadd (double scale, double padd)
 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 padding to this shape. More...
 
void scale (double scale)
 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

shapes::Cylinder::Cylinder ( )

Definition at line 108 of file shapes.cpp.

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

The radius and the length of the cylinder.

Definition at line 114 of file shapes.cpp.

Member Function Documentation

Shape * shapes::Cylinder::clone ( ) const
virtual

Create a copy of this shape.

Implements shapes::Shape.

Definition at line 212 of file shapes.cpp.

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

Print information about this shape.

Reimplemented from shapes::Shape.

Definition at line 366 of file shapes.cpp.

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

Scale and padd this shape.

Implements shapes::Shape.

Definition at line 290 of file shapes.cpp.

Member Data Documentation

double shapes::Cylinder::length

The length of the cylinder.

Definition at line 143 of file shapes.h.

double shapes::Cylinder::radius

The radius of the cylinder.

Definition at line 146 of file shapes.h.

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

The type of the shape, as a string.

Definition at line 136 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 Jun 10 2019 13:22:04