DGtal 2.1.0
Loading...
Searching...
No Matches
viewer3D-1-points.cpp File Reference
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/io/Display3D.h"
#include "DGtal/io/viewers/PolyscopeViewer.h"
Include dependency graph for viewer3D-1-points.cpp:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Bertrand Kerautret (kerau.nosp@m.tre@.nosp@m.loria.nosp@m..fr ) LORIA (CNRS, UMR 7503), University of Nancy, France
Date
2011/19/03

Simple example of class PolyscopeViewer.

This file is part of the DGtal library.

Definition in file viewer3D-1-points.cpp.

Function Documentation

◆ main()

int main ( void  )

Definition at line 54 of file viewer3D-1-points.cpp.

55{
57
58 Point p1( 0, 0, 0 );
59 Point p2( 5, 5 ,5 );
60 Point p3( 2, 3, 4 );
61 Domain domain( p1, p2 );
62
63 // Drawing can happen with draw function
64 v.draw(p1);
65 // Or stream operators that can be chained
66 v << p2 << p3;
67 // Draw operator allows to retrieve the name (id) of an object
68 std::string name = v.draw(domain);
69 trace.info() << name << std::endl;
70
71 v.show();
72 return 0;
73}
std::string draw(const Point &p, const std::string &uname="Point_{i}")
void show() override
Starts the event loop and display of elements.
std::ostream & info()
Trace trace
Domain domain

References domain, DGtal::Display3D< Space, KSpace >::draw(), DGtal::Trace::info(), DGtal::PolyscopeViewer< Space, KSpace >::show(), and DGtal::trace.