| 1 |
//########################################################################## |
| 2 |
//# # |
| 3 |
//# CLOUDCOMPARE # |
| 4 |
//# # |
| 5 |
//# This program is free software; you can redistribute it and/or modify # |
| 6 |
//# it under the terms of the GNU General Public License as published by # |
| 7 |
//# the Free Software Foundation; version 2 or later of the License. # |
| 8 |
//# # |
| 9 |
//# This program is distributed in the hope that it will be useful, # |
| 10 |
//# but WITHOUT ANY WARRANTY; without even the implied warranty of # |
| 11 |
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # |
| 12 |
//# GNU General Public License for more details. # |
| 13 |
//# # |
| 14 |
//# COPYRIGHT: EDF R&D / TELECOM ParisTech (ENST-TSI) # |
| 15 |
//# # |
| 16 |
//########################################################################## |
| 17 |
|
| 18 |
#ifndef PROFILE_LOADER_HEADER |
| 19 |
#define PROFILE_LOADER_HEADER |
| 20 |
|
| 21 |
class ccPolyline; |
| 22 |
class ccMainAppInterface; |
| 23 |
|
| 24 |
//Qt |
| 25 |
#include <QString> |
| 26 |
|
| 27 |
//CCCoreLib |
| 28 |
#include <CCGeom.h> |
| 29 |
|
| 30 |
//! Loads a 2D profile form a custom (ASCII) file |
| 31 |
class ProfileLoader |
| 32 |
{ |
| 33 |
public: |
| 34 |
|
| 35 |
//! Loads a 2D profile from a file |
| 36 |
/** The file must have a particular organization (see the code for more details). |
| 37 |
Notably the profile is associated to a 3D origin. |
| 38 |
Only the X and Y coordinates of the polyline's vertices will be used: |
| 39 |
X = radius and Y = height (Z = 0). |
| 40 |
\param[in] filename filename |
| 41 |
\param[out] origin profile origin |
| 42 |
\param[in] app main application handle for displaying messages (optional) |
| 43 |
\return loaded polyline (or 0 if an error occurred) |
| 44 |
**/ |
| 45 |
static ccPolyline* Load(QString filename, CCVector3& origin, ccMainAppInterface* app = nullptr); |
| 46 |
|
| 47 |
}; |
| 48 |
|
| 49 |
#endif //PROFILE_LOADER_HEADER |