32 #include "DGtal/base/Common.h"
33 #include "ConfigTest.h"
34 #include "DGtal/helpers/StdDefs.h"
35 #include "DGtal/io/boards/Board3D.h"
39 using namespace DGtal;
53 Point p1( -3, -2, 0 );
55 Point p3( -1, -1, -1);
68 board << p1 << p2 << p3;
70 board.
saveOBJ(
"dgtalBoard3D-1-points.obj");
82 board2.
saveOBJ(
"dgtalBoard3D-1bis-points.obj");
90 unsigned int nbok = 0;
118 board.
saveOBJ(
"dgtalBoard3D.quad.obj");
121 nbok +=
true ? 1 : 0;
123 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
124 <<
"true == true" << std::endl;
136 Point p2( 0, 10 , 0);
137 Point p3( 10, 10, 0);
138 Point p4(10, 0, 100 );
139 Point p5( 20, 0 , 0);
140 Point p6( 20, 10, 0);
148 board << p1<<p2<<p3<<p4;
150 board.
saveOBJ(
"dgtalBoard3D-norm.obj",
true);
151 board.
saveOBJ(
"dgtalBoard3D-wonorm.obj");
171 board.
saveOBJ(
"dgtalBoard3D-line.obj");
183 int main(
int argc,
char** argv )
187 for (
int i = 0; i < argc; ++i )
194 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
The class Board3D is a type of Display3D which export the figures in the format OBJ/MTL when calling ...
void saveOBJ(const std::string &filename, const bool isNormalized=false)
Structure representing an RGB triple with alpha component.
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
void insertNew(const Point &p)
virtual void setLineColor(DGtal::Color aColor)
void addLine(const RealPoint &p1, const RealPoint &p2, const double width=0.03)
void addQuadWithNormal(const RealPoint &p1, const RealPoint &p2, const RealPoint &p3, const RealPoint &p4, const RealPoint &n, const bool enableReorientation, const bool enableDoubleFace=false)
std::string className() const
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex,...
bool init(const Point &lower, const Point &upper, bool isClosed)
Specifies the upper and lower bounds for the maximal cells in this space.
Cell uCell(const PreCell &c) const
From an unsigned cell, returns an unsigned cell lying into this Khalismky space.
PointVector< dim, double, std::array< double, dim > > getNormalized() const
void beginBlock(const std::string &keyword="")
DGtal is the top-level namespace which contains all DGtal functions and types.
Factory for GPL Display3D:
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
int main(int argc, char **argv)