A basic definition of a shape. Shapes are considered centered at origin. More...
#include <shapes.h>
Public Member Functions | |
virtual Shape * | clone () const =0 |
Create a copy of this shape. | |
virtual bool | isFixed () const |
Return a flag indicating whether this shape can be scaled and/or padded. | |
void | padd (double padding) |
Add padding to this shape. | |
virtual void | print (std::ostream &out=std::cout) const |
Print information about this shape. | |
void | scale (double scale) |
Scale this shape by a factor. | |
virtual void | scaleAndPadd (double scale, double padd)=0 |
Scale and padd this shape. | |
Shape () | |
virtual | ~Shape () |
Public Attributes | |
ShapeType | type |
The type of the shape. |
A basic definition of a shape. Shapes are considered centered at origin.
Definition at line 50 of file shapes.cpp.
shapes::Shape::~Shape | ( | ) | [virtual] |
Definition at line 55 of file shapes.cpp.
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.
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 366 of file shapes.cpp.
void shapes::Shape::padd | ( | double | padding | ) |
Add padding to this shape.
Definition at line 240 of file shapes.cpp.
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 316 of file shapes.cpp.
void shapes::Shape::scale | ( | double | scale | ) |
Scale this shape by a factor.
Definition at line 235 of file shapes.cpp.
virtual void shapes::Shape::scaleAndPadd | ( | double | scale, |
double | padd | ||
) | [pure virtual] |
Scale and padd this shape.
Implemented in shapes::OcTree, shapes::Plane, shapes::Mesh, shapes::Box, shapes::Cone, shapes::Cylinder, and shapes::Sphere.