DGtal  1.4.beta
testMeshDisplay.cpp File Reference
#include "DGtal/base/Common.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/shapes/Mesh.h"
#include "DGtal/io/viewers/Viewer3D.h"
Include dependency graph for testMeshDisplay.cpp:

Go to the source code of this file.

## Functions

int main (int argc, char **argv)

## 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/.

Date
2012/07/07

Functions for testing class MeshDisplay.

This file is part of the DGtal library.

Definition in file testMeshDisplay.cpp.

## ◆ main()

 int main ( int argc, char ** argv )

[MeshUseInitDisplay]

[MeshUseInitDisplay]

[MeshUseMeshCreation]

[MeshUseMeshCreation] [MeshUseDisplay]

[MeshUseDisplay]

Definition at line 51 of file testMeshDisplay.cpp.

52 {
53  trace.beginBlock ( "Testing class MeshDisplay" );
54  trace.info() << "Args:";
55  for ( int i = 0; i < argc; ++i )
56  trace.info() << " " << argv[ i ];
57  trace.info() << endl;
59  QApplication application(argc,argv);
60  Viewer3D<> viewer;
61  viewer.show();
63
65  Mesh<Point> aMesh(true);
69
74
81
84
85  Mesh<Point>::MeshFace listIndex;
86  listIndex.push_back(7);
87  listIndex.push_back(8);
88  listIndex.push_back(9);
89  listIndex.push_back(10);
90  listIndex.push_back(11);
91  listIndex.push_back(12);
92
96  viewer.setLineColor(Color(150,0,0,254));
97  viewer << aMesh;
98  viewer << Viewer3D<>::updateDisplay;
99  bool res = application.exec();
101  trace.emphase() << ( res ? "Passed." : "Error." ) << endl;
102  trace.endBlock();
103  return res ? 0 : 1;
104 }
Structure representing an RGB triple with alpha component.
Definition: Color.h:68
virtual void setLineColor(DGtal::Color aColor)
Aim: This class is defined to represent a surface mesh through a set of vertices and faces....
Definition: Mesh.h:92
void addFace(const MeshFace &aFace, const DGtal::Color &aColor=DGtal::Color::White)
std::vector< Index > MeshFace
Definition: Mesh.h:126
void beginBlock(const std::string &keyword="")
std::ostream & emphase()
std::ostream & info()
double endBlock()
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
Trace trace
Definition: Common.h:153
MyPointD Point
Definition: testClone2.cpp:383