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

virtual Shapeclone () const
 Create a copy of this shape. More...
 
 Cone ()
 
 Cone (double r, double l)
 
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 (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 152 of file shapes.h.

Constructor & Destructor Documentation

shapes::Cone::Cone ( )

Definition at line 121 of file shapes.cpp.

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

Definition at line 127 of file shapes.cpp.

Member Function Documentation

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

Create a copy of this shape.

Implements shapes::Shape.

Definition at line 217 of file shapes.cpp.

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

Print information about this shape.

Reimplemented from shapes::Shape.

Definition at line 371 of file shapes.cpp.

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

Scale and padd this shape.

Implements shapes::Shape.

Definition at line 296 of file shapes.cpp.

Member Data Documentation

double shapes::Cone::length

The length (height) of the cone.

Definition at line 166 of file shapes.h.

double shapes::Cone::radius

The radius of the cone.

Definition at line 169 of file shapes.h.

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

The type of the shape, as a string.

Definition at line 159 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 Fri Jun 7 2019 21:59:29