Example of digital point export with Display3D.
- See also
- Export objects with Board3D
Illustration of the resulting exported file (OBJ format visualized with blender).
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/io/boards/Board3D.h"
#include "DGtal/helpers/StdDefs.h"
using namespace std;
{
shape_set.insertNew(p6);
shape_set.insertNew(p7);
Board3D<> board;
board << SetMode3D(
domain.className(),
"Paving");
board << p1 << p2 << p3;
board << shape_set;
board.saveOBJ("dgtalBoard3D-1-points.obj");
Board3D<> board2;
board2 << SetMode3D(
domain.className(),
"Paving");
board2 << CustomColors3D(Color(250, 0,0),Color(250, 0,0));
board2 << p1 ;
board2 << CustomColors3D(Color(0, 255,0),Color(0, 0,255));
board2 << p2 << p3;
board2 << CustomColors3D(Color(250, 0,0),Color(250, 0,0));
board2 << p6;
board2.saveOBJ("dgtalBoard3D-1bis-points.obj");
return 0;
}
void beginBlock(const std::string &keyword="")
Z3i this namespace gathers the standard of types for 3D imagery.
DGtal is the top-level namespace which contains all DGtal functions and types.
int main(int argc, char **argv)
HyperRectDomain< Space > Domain
Z2i::DigitalSet DigitalSet