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"
{
trace.
beginBlock (
"Example dgtalBoard3D-1-points" );
board << p1 << p2 << p3;
board << shape_set;
board.
saveOBJ(
"dgtalBoard3D-1-points.obj");
trace.
info()<<
" Second"<<std::endl;
board2 << p1 ;
board2 << p2 << p3;
board2 << p6;
board2.
saveOBJ(
"dgtalBoard3D-1bis-points.obj");
return 0;
}
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.
void insertNew(const Point &p)
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.
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
HyperRectDomain< Space > Domain
Z2i::DigitalSet DigitalSet