/usr/include/psurface/QualityRequest.h is in libpsurface-dev 2.0.0-2+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | #ifndef QUALITY_REQUEST
#define QUALITY_REQUEST
namespace psurface {
/// A class encapsulating the exact definition of a 'good' point removal step
struct QualityRequest {
/// Are surface intersections allowed?
bool intersections;
/// An edge length that mustn't be exceeded. Negative values mean 'no restriction'.
float maxEdgeLength;
/// Should small dihedral angles be allowed?
bool smallDihedralAngles;
/// Minimum allowed dihedral angle.
float dihedralAngleThreshold;
/// Importance of the triangle aspect ratio in the new triangulation
float aspectRatio;
/// Importance of the Hausdorff distance in the new triangulation
float hausdorffDistance;
// //////////////////////
// Member functions
/** Default constructor. Deactivates all restrictions except for paths and intents
* equal rights for aspect ratio and Hausdorff distance.
*/
QualityRequest() {
intersections = false;
maxEdgeLength = -1;
smallDihedralAngles = false;
dihedralAngleThreshold = 0;
aspectRatio = 0.5;
hausdorffDistance = 0.5;
}
void normalize() {
float sum = aspectRatio + hausdorffDistance;
aspectRatio /= sum;
hausdorffDistance /= sum;
}
};
} // namespace
#endif
|