Example of Khalimsky Signed Cell export with Display3D.
- See also
- Export objects with Board3D
Illustration of the resulting exported file (OBJ format visualized with blender).
#include <iostream>
#include "DGtal/io/boards/Board3D.h"
#include "DGtal/base/Common.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/shapes/Shapes.h"
#include "DGtal/io/DrawWithDisplay3DModifier.h"
using namespace std;
using namespace Z3i;
{
K.
init( plow, pup,
true );
board <<
SetMode3D( v.className(),
"Illustration" );
board << v << v2 << v3;
board2 << tsx << tsy << tsz << tsxn << tsyn << tszn;
board2 << tsx2 << tsy2 << tsz2 << tsxn2 << tsyn2 << tszn2;
board2 << tsx3 << tsy3 << tsz3 << tsxn3 << tsyn3 << tszn3;
std::cout << "save obj" << std::endl;
board2.
saveOBJ(
"board3D-2bis-ks.obj");
}
bool init(const Point &lower, const Point &upper, bool isClosed)
Specifies the upper and lower bounds for the maximal cells in this space.
SCell sSpel(Point p, Sign sign=POS) const
From the digital coordinates of a point in Zn, builds the corresponding spel (cell of maximal dimensi...
SCell sIncident(const SCell &c, Dimension k, bool up) const
Return the forward or backward signed cell incident to [c] along axis [k], depending on [up].