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

Definition of a sphere. More...

#include <shapes.h>

Inheritance diagram for shapes::Sphere:
Inheritance graph

Public Member Functions

virtual Shapeclone () const
 Create a copy of this shape. 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...
 Sphere ()
 Sphere (double r)
 The radius of the shpere. 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 radius
 The radius of the sphere. More...
- Public Attributes inherited from shapes::Shape
ShapeType type
 The type of the shape. More...

Static Public Attributes

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

Detailed Description

Definition of a sphere.

Definition at line 106 of file shapes.h.

Constructor & Destructor Documentation

shapes::Sphere::Sphere ( )

Definition at line 96 of file shapes.cpp.

shapes::Sphere::Sphere ( double  r)

The radius of the shpere.

Definition at line 102 of file shapes.cpp.

Member Function Documentation

Shape * shapes::Sphere::clone ( ) const

Create a copy of this shape.

Implements shapes::Shape.

Definition at line 207 of file shapes.cpp.

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

Print information about this shape.

Reimplemented from shapes::Shape.

Definition at line 361 of file shapes.cpp.

void shapes::Sphere::scaleAndPadd ( double  scale,
double  padd 

Scale and padd this shape.

Implements shapes::Shape.

Definition at line 285 of file shapes.cpp.

Member Data Documentation

double shapes::Sphere::radius

The radius of the sphere.

Definition at line 122 of file shapes.h.

const std::string shapes::Sphere::STRING_NAME = "sphere"

The type of the shape, as a string.

Definition at line 115 of file shapes.h.

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

Author(s): Ioan Sucan , Gil Jones
autogenerated on Fri Jun 7 2019 21:59:29