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 padd (double padding)
 Add uniform padding to this shape. More...
 
void padd (double paddX, double paddY, double paddZ)
 Add non-uniform padding to this shape. More...
 
void print (std::ostream &out=std::cout) const override
 Print information about this shape. More...
 
void scale (double scale)
 Uniformly scale this shape by a factor. More...
 
void scale (double scaleX, double scaleY, double scaleZ)
 Scale this shape by a non-uniform factor. More...
 
void scaleAndPadd (double scale, double padd) override
 Uniformly scale and padd this shape. More...
 
void scaleAndPadd (double scaleX, double scaleY, double scaleZ, double paddX, double paddY, double paddZ)
 Scale this shape by a non-uniform factor and then add non-uniform padding. 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 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 226 of file shapes.h.

Constructor & Destructor Documentation

◆ Box() [1/2]

shapes::Box::Box ( )

Definition at line 172 of file shapes.cpp.

◆ Box() [2/2]

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

Definition at line 178 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 262 of file shapes.cpp.

◆ padd() [1/2]

void shapes::Shape::padd

Add uniform padding to this shape.

Definition at line 320 of file shapes.cpp.

◆ padd() [2/2]

void shapes::Box::padd ( double  paddX,
double  paddY,
double  paddZ 
)

Add non-uniform padding to this shape.

Parameters
paddXPadding in x-dimension (in meters).
paddYPadding in y-dimension (in meters).
paddZPadding in z-dimension (in meters).

Definition at line 400 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 490 of file shapes.cpp.

◆ scale() [1/2]

void shapes::Shape::scale

Uniformly scale this shape by a factor.

Definition at line 315 of file shapes.cpp.

◆ scale() [2/2]

void shapes::Box::scale ( double  scaleX,
double  scaleY,
double  scaleZ 
)

Scale this shape by a non-uniform factor.

Parameters
scaleXScale in x-dimension.
scaleYScale in y-dimension.
scaleZScale in z-dimension.

Definition at line 395 of file shapes.cpp.

◆ scaleAndPadd() [1/2]

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

Uniformly scale and padd this shape.

Implements shapes::Shape.

Definition at line 405 of file shapes.cpp.

◆ scaleAndPadd() [2/2]

void shapes::Box::scaleAndPadd ( double  scaleX,
double  scaleY,
double  scaleZ,
double  paddX,
double  paddY,
double  paddZ 
)

Scale this shape by a non-uniform factor and then add non-uniform padding.

Parameters
scaleXScale in x-dimension.
scaleYScale in y-dimension.
scaleZScale in z-dimension.
paddXPadding in x-dimension (in meters).
paddYPadding in y-dimension (in meters).
paddZPadding in z-dimension (in meters).

Definition at line 383 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 270 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 236 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 Mon Sep 28 2020 03:43:09