Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal  1.4.2
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
io/viewers/demo-kernel-2.cpp

Example of Domain and Point display in Viewer3D.

See also
Display3D: a stream mechanism for displaying 3D DGtal objects
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/kernel/SpaceND.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/kernel/domains/HyperRectDomain.h"
#include "DGtal/io/boards/Board2D.h"
#include "DGtal/io/viewers/Viewer3D.h"
using namespace std;
using namespace DGtal;
int main( int argc, char** argv )
{
QApplication application(argc,argv);
typedef MySpace::Point MyPoint;
typedef HyperRectDomain<MySpace> MyDomain;
MyPoint p1( 0, 0, 0 );
MyPoint p2( 5, 5 ,5 );
MyPoint p3( 2, 3, 4 );
MyDomain domain( p1, p2 );
Viewer3D<> viewer; // for 3D visualization
viewer.show();
viewer << domain;
viewer << p1 << p2 << p3;
viewer<< Viewer3D<>::updateDisplay;
return application.exec();
}
// //
DGtal is the top-level namespace which contains all DGtal functions and types.
int main(int argc, char **argv)
MyPointD Point
Definition: testClone2.cpp:383
Domain domain