30 #include "DGtal/io/boards/Board3D.h"
31 #include "DGtal/base/Common.h"
32 #include "DGtal/helpers/StdDefs.h"
33 #include "DGtal/shapes/Shapes.h"
34 #include "DGtal/io/DrawWithDisplay3DModifier.h"
37 using namespace DGtal;
49 Domain domain( plow, pup );
50 K.init( plow, pup,
true );
56 SCell v2 = K.sSpel( Point( 1, 0, 0 ), KSpace::POS );
57 SCell v3 = K.sSpel( Point( 0, 1, 0 ), KSpace::POS );
58 SCell v4 = K.sSpel( Point( 1, 1, 0 ), KSpace::NEG );
60 SCell v = K.sSpel( Point( 0, 0, 0 ), KSpace::POS );
61 board <<
SetMode3D( v.className(),
"Illustration" );
64 board << v << v2 << v3;
65 board.saveOBJ(
"board3D-2-ks.obj");
71 SCell sx = K.sIncident( v, 0,
true );
75 SCell sy = K.sIncident( v, 1,
true );
76 SCell sz = K.sIncident( v, 2,
true );
77 SCell sxn = K.sIncident( v, 0,
false );
78 SCell syn = K.sIncident( v, 1,
false );
79 SCell szn = K.sIncident( v, 2,
false );
89 board2 << tsx << tsy << tsz << tsxn << tsyn << tszn;
93 SCell sx2 = K.sIncident( v2, 0,
true );
94 SCell sy2 = K.sIncident( v2, 1,
true );
95 SCell sz2 = K.sIncident( v2, 2,
true );
96 SCell sxn2 = K.sIncident( v2, 0,
false );
97 SCell syn2 = K.sIncident( v2, 1,
false );
98 SCell szn2 = K.sIncident( v2, 2,
false );
108 board2 << tsx2 << tsy2 << tsz2 << tsxn2 << tsyn2 << tszn2;
112 SCell sx3 = K.sIncident( v3, 0,
true );
113 SCell sy3 = K.sIncident( v3, 1,
true );
114 SCell sz3 = K.sIncident( v3, 2,
true );
115 SCell sxn3 = K.sIncident( v3, 0,
false );
116 SCell syn3 = K.sIncident( v3, 1,
false );
117 SCell szn3 = K.sIncident( v3, 2,
false );
128 board2 << tsx3 << tsy3 << tsz3 << tsxn3 << tsyn3 << tszn3;
130 std::cout <<
"save obj" << std::endl;
131 board2.saveOBJ(
"board3D-2bis-ks.obj");
KhalimskySpaceND< 2, Integer > KSpace
The class Board3D is a type of Display3D which export the figures in the format OBJ/MTL when calling ...
DGtal is the top-level namespace which contains all DGtal functions and types.
Modifier class in a Display3D stream. Useful to choose your own mode for a given class. Realizes the concept CDrawableWithDisplay3D.