Figure3D class, used for 3D figures.
More...
#include <codac2_Figure3D.h>
|
| Figure3D (const std::string &name) |
| Creates a new Figure3D object, with a given name.
|
|
| ~Figure3D () |
| Destructor for the Figure3D class.
|
|
const std::string & | name () const |
| Getter for the name of the figure.
|
|
void | draw_axes (double size=1.0) |
| Draws the (x,y,z) axes on the figure in red, green and blue.
|
|
void | draw_box (const IntervalVector &x, const StyleProperties &s={ Color::dark_gray(0.5) }) |
| Draws a box on the figure.
|
|
void | draw_parallelepiped (const Vector &z, const Matrix &A, const StyleProperties &s={ Color::dark_gray(0.5) }) |
| Draws a parallelepiped z+A*[-1,1]^3 on the figure.
|
|
void | draw_paving (const PavingOut &p, const StyleProperties &bound_s={ Color::yellow(0.5) }) |
| Draws a paving on the figure (Only the boundary is drawn).
|
|
void | draw_paving (const PavingInOut &p, const StyleProperties &bound_s={ Color::yellow(0.3) }, const StyleProperties &in_s={ Color::green(0.5) }) |
| Draws a paving on the figure (Only the boundary and the inside is drawn).
|
|
template<typename P> |
void | draw_subpaving (const Subpaving< P > &p, const StyleProperties &s=StyleProperties()) |
| Draws a subpaving on the figure.
|
|
Figure3D class, used for 3D figures.
This class is used to display 3D figures. It generates an OBJ file that can be opened with a 3D viewer.
◆ Figure3D()
codac2::Figure3D::Figure3D |
( |
const std::string & | name | ) |
|
Creates a new Figure3D object, with a given name.
- Parameters
-
◆ name()
const std::string & codac2::Figure3D::name |
( |
| ) |
const |
Getter for the name of the figure.
- Returns
- The name of the figure
◆ draw_axes()
void codac2::Figure3D::draw_axes |
( |
double | size = 1.0 | ) |
|
Draws the (x,y,z) axes on the figure in red, green and blue.
- Parameters
-
◆ draw_box()
Draws a box on the figure.
- Parameters
-
x | Box to draw |
s | Style of the box (edge color) |
◆ draw_parallelepiped()
Draws a parallelepiped z+A*[-1,1]^3 on the figure.
- Parameters
-
z | Coordinates of the center of the parallelepiped |
A | Matrix of the parallelepiped |
s | Style of the parallelepiped (edge color) |
◆ draw_paving() [1/2]
Draws a paving on the figure (Only the boundary is drawn).
- Parameters
-
p | PavingOut to draw (result of a paving with contractors). |
bound_s | Style of the boundary of the paving |
◆ draw_paving() [2/2]
Draws a paving on the figure (Only the boundary and the inside is drawn).
- Parameters
-
p | PavingInOut to draw (result of a paving with separators). |
bound_s | Style of the boundary of the paving |
in_s | Style of the inside of the paving |
◆ draw_subpaving()
Draws a subpaving on the figure.
- Parameters
-
p | Subpaving to draw |
s | Style of the subpaving |
111 {
112 for(const auto& pi : p.boxes())
114 }
The documentation for this class was generated from the following file: