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
[legend]

Public Member Functions

Sphereclone () const override
 Create a copy of this shape. More...
 
void print (std::ostream &out=std::cout) const override
 Print information about this shape. More...
 
void scaleAndPadd (double scale, double padd) override
 Uniformly 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 uniform padding to this shape. More...
 
void scale (double scale)
 Uniformly 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

◆ Sphere() [1/2]

shapes::Sphere::Sphere ( )

Definition at line 128 of file shapes.cpp.

◆ Sphere() [2/2]

shapes::Sphere::Sphere ( double  r)

The radius of the shpere.

Definition at line 134 of file shapes.cpp.

Member Function Documentation

◆ clone()

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

Create a copy of this shape.

Implements shapes::Shape.

Definition at line 247 of file shapes.cpp.

◆ print()

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

Print information about this shape.

Reimplemented from shapes::Shape.

Definition at line 466 of file shapes.cpp.

◆ scaleAndPadd()

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

Uniformly scale and padd this shape.

Implements shapes::Shape.

Definition at line 325 of file shapes.cpp.

Member Data Documentation

◆ radius

double shapes::Sphere::radius

The radius of the sphere.

Definition at line 122 of file shapes.h.

◆ STRING_NAME

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

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:


geometric_shapes
Author(s): Ioan Sucan , Gil Jones
autogenerated on Tue Aug 13 2024 02:40:57