Public Member Functions | Public Attributes | List of all members
shapes::Shape Class Referenceabstract

A basic definition of a shape. Shapes are considered centered at origin. More...

#include <shapes.h>

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

Public Member Functions

virtual Shapeclone () const =0
 Create a copy of this shape. More...
 
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...
 
virtual void print (std::ostream &out=std::cout) const
 Print information about this shape. More...
 
void scale (double scale)
 Uniformly scale this shape by a factor. More...
 
virtual void scaleAndPadd (double scale, double padd)=0
 Uniformly scale and padd this shape. More...
 
 Shape ()
 
virtual ~Shape ()
 

Public Attributes

ShapeType type
 The type of the shape. More...
 

Detailed Description

A basic definition of a shape. Shapes are considered centered at origin.

Definition at line 77 of file shapes.h.

Constructor & Destructor Documentation

◆ Shape()

shapes::Shape::Shape ( )

Definition at line 119 of file shapes.cpp.

◆ ~Shape()

shapes::Shape::~Shape ( )
virtual

Definition at line 124 of file shapes.cpp.

Member Function Documentation

◆ clone()

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

Create a copy of this shape.

Implemented in shapes::OcTree, shapes::Plane, shapes::Mesh, shapes::Box, shapes::Cone, shapes::Cylinder, and shapes::Sphere.

◆ isFixed()

bool shapes::Shape::isFixed ( ) const
virtual

Return a flag indicating whether this shape can be scaled and/or padded.

Reimplemented in shapes::OcTree, and shapes::Plane.

Definition at line 511 of file shapes.cpp.

◆ padd()

void shapes::Shape::padd ( double  padding)

Add uniform padding to this shape.

Definition at line 320 of file shapes.cpp.

◆ print()

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

Print information about this shape.

Reimplemented in shapes::OcTree, shapes::Plane, shapes::Mesh, shapes::Box, shapes::Cone, shapes::Cylinder, and shapes::Sphere.

Definition at line 461 of file shapes.cpp.

◆ scale()

void shapes::Shape::scale ( double  scale)

Uniformly scale this shape by a factor.

Definition at line 315 of file shapes.cpp.

◆ scaleAndPadd()

virtual void shapes::Shape::scaleAndPadd ( double  scale,
double  padd 
)
pure virtual

Uniformly scale and padd this shape.

Implemented in shapes::OcTree, shapes::Plane, shapes::Mesh, shapes::Box, shapes::Cone, shapes::Cylinder, and shapes::Sphere.

Member Data Documentation

◆ type

ShapeType shapes::Shape::type

The type of the shape.

Definition at line 102 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