DGtal 1.4.2
Loading...
Searching...
No Matches
dgtalBoard3D-6-clipping.cpp
1
43#include <iostream>
44#include "DGtal/io/boards/Board3D.h"
45#include "DGtal/io/DrawWithDisplay3DModifier.h"
46#include "DGtal/io/Color.h"
47#include "DGtal/base/Common.h"
48#include "DGtal/helpers/StdDefs.h"
49#include "DGtal/shapes/Shapes.h"
50
52
53using namespace std;
54using namespace DGtal;
55using namespace Z3i;
56
57
59// Standard services - public :
60
61int main( int /*argc*/, char** /*argv*/ )
62{
63
64 Board3D<> board;
65
66 Point p1( 0, 0, 0 );
67 Point p2( 20, 20, 20 );
68 Domain domain(p1, p2);
69 DigitalSet shape_set( domain );
70
71 Shapes<Domain>::addNorm2Ball( shape_set, Point( 10, 10, 10 ), 7 );
72
73 board << SetMode3D( shape_set.className(), "Both" );
74 board << shape_set;
75 board << CustomColors3D(Color(250, 200,0, 100),Color(250, 200,0, 20));
76 board << SetMode3D( p1.className(), "Paving" );
77
78 board << ClippingPlane(1,0,0,-4.9);
79 board << ClippingPlane(0,1,0.3,-10);
80
81 board.saveOBJ("board3D-6-clipping.obj");
82
83}
84// //
86
87
88
89
90
The class Board3D is a type of Display3D which export the figures in the format OBJ/MTL when calling ...
Definition Board3D.h:82
void saveOBJ(const std::string &filename, const bool isNormalized=false)
Structure representing an RGB triple with alpha component.
Definition Color.h:68
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
static void addNorm2Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
Class for adding a Clipping plane through the Viewer3D stream. Realizes the concept CDrawableWithView...
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
int main()
Definition testBits.cpp:56
MyPointD Point
Domain domain