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

Definition of a box Aligned with the XYZ axes. More...

#include <shapes.h>

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

Public Member Functions

 Box ()
 
 Box (double x, double y, double z)
 
Boxclone () 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
 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 size [3]
 x, y, z dimensions of the box (axis-aligned) More...
 
- Public Attributes inherited from shapes::Shape
ShapeType type
 The type of the shape. More...
 

Static Public Attributes

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

Detailed Description

Definition of a box Aligned with the XYZ axes.

Definition at line 174 of file shapes.h.

Constructor & Destructor Documentation

◆ Box() [1/2]

shapes::Box::Box ( )

Definition at line 134 of file shapes.cpp.

◆ Box() [2/2]

shapes::Box::Box ( double  x,
double  y,
double  z 
)

Definition at line 140 of file shapes.cpp.

Member Function Documentation

◆ clone()

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

Create a copy of this shape.

Implements shapes::Shape.

Definition at line 222 of file shapes.cpp.

◆ print()

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

Print information about this shape.

Reimplemented from shapes::Shape.

Definition at line 376 of file shapes.cpp.

◆ scaleAndPadd()

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

Scale and padd this shape.

Implements shapes::Shape.

Definition at line 302 of file shapes.cpp.

Member Data Documentation

◆ size

double shapes::Box::size[3]

x, y, z dimensions of the box (axis-aligned)

Definition at line 188 of file shapes.h.

◆ STRING_NAME

const std::string shapes::Box::STRING_NAME = "box"
static

The type of the shape, as a string.

Definition at line 181 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 Sun Aug 11 2019 03:16:55