ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
CVConst.h File Reference
#include "CVTypes.h"
#include <cfloat>
#include <cmath>
#include <limits>
Include dependency graph for CVConst.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  CC_VIEW_ORIENTATION {
  CC_TOP_VIEW , CC_BOTTOM_VIEW , CC_FRONT_VIEW , CC_BACK_VIEW ,
  CC_LEFT_VIEW , CC_RIGHT_VIEW , CC_ISO_VIEW_1 , CC_ISO_VIEW_2
}
 View orientation. More...
 
enum  CHAMFER_DISTANCE_TYPE { CHAMFER_111 = 0 , CHAMFER_345 = 1 }
 Chamfer distances types. More...
 
enum  CV_LOCAL_MODEL_TYPES { NO_MODEL = 0 , LS = 1 , TRI = 2 , QUADRIC = 3 }
 

Variables

constexpr double M_PI = 3.14159265358979323846
 Pi. More...
 
constexpr double M_PI_2 = 1.57079632679489661923
 Pi/2. More...
 
constexpr double SQRT_3 = 1.7320508075688772935274463415059
 Square root of 3. More...
 
constexpr double ZERO_TOLERANCE
 Numerical threshold for considering a value as "zero". More...
 
constexpr float ZERO_TOLERANCE_F = std::numeric_limits<float>::epsilon()
 
constexpr double ZERO_TOLERANCE_D = static_cast<double>(ZERO_TOLERANCE_F)
 
constexpr double ZERO_SQUARED_TOLERANCE_D = ZERO_TOLERANCE_D * ZERO_TOLERANCE_D
 
constexpr ScalarType ZERO_TOLERANCE_SCALAR
 
constexpr ScalarType ZERO_TOLERANCE_POINT_COORDINATE
 
constexpr PointCoordinateType PC_ONE = static_cast<PointCoordinateType>(1.0)
 '1' as a PointCoordinateType value More...
 
constexpr PointCoordinateType PC_NAN
 'NaN' as a PointCoordinateType value More...
 
constexpr ScalarType NAN_VALUE = std::numeric_limits<ScalarType>::quiet_NaN()
 NaN as a ScalarType value. More...
 
constexpr float MIN_POINT_SIZE_F = 1.0f
 
constexpr float MAX_POINT_SIZE_F = 16.0f
 
constexpr float MIN_LINE_WIDTH_F = 1.0f
 
constexpr float MAX_LINE_WIDTH_F = 16.0f
 
static constexpr float CC_GL_MAX_ZOOM_RATIO = 1.0e6f
 
static constexpr float CC_GL_MIN_ZOOM_RATIO = 1.0e-6f
 
constexpr double EPSILON_VALUE = 1.0e-5
 
constexpr unsigned char POINT_VISIBLE
 
constexpr unsigned char POINT_HIDDEN
 
constexpr unsigned char POINT_OUT_OF_RANGE
 
constexpr unsigned char POINT_OUT_OF_FOV
 
constexpr unsigned CV_LOCAL_MODEL_MIN_SIZE []
 Min number of points to compute local models (see CV_LOCAL_MODEL_TYPES) More...
 

Enumeration Type Documentation

◆ CC_VIEW_ORIENTATION

View orientation.

Enumerator
CC_TOP_VIEW 

Top view (eye: +Z)

CC_BOTTOM_VIEW 

Bottom view

CC_FRONT_VIEW 

Front view

CC_BACK_VIEW 

Back view

CC_LEFT_VIEW 

Left view

CC_RIGHT_VIEW 

Right view

CC_ISO_VIEW_1 

Isometric view 1: front, right and top

CC_ISO_VIEW_2 

Isometric view 2: back, left and top

Definition at line 102 of file CVConst.h.

◆ CHAMFER_DISTANCE_TYPE

Chamfer distances types.

Enumerator
CHAMFER_111 

Chamfer distance <1-1-1>

CHAMFER_345 

Chamfer distance <3-4-5>

Definition at line 114 of file CVConst.h.

◆ CV_LOCAL_MODEL_TYPES

Types of local models (no model, least square best fitting plan, Delaunay 2D1/2 triangulation, height function)

Enumerator
NO_MODEL 

No local model

LS 

Least Square best fitting plane

TRI 

2.5D Delaunay triangulation

QUADRIC 

2.5D quadric function

Definition at line 121 of file CVConst.h.

Variable Documentation

◆ CC_GL_MAX_ZOOM_RATIO

constexpr float CC_GL_MAX_ZOOM_RATIO = 1.0e6f
staticconstexpr

Definition at line 84 of file CVConst.h.

◆ CC_GL_MIN_ZOOM_RATIO

constexpr float CC_GL_MIN_ZOOM_RATIO = 1.0e-6f
staticconstexpr

Definition at line 85 of file CVConst.h.

◆ CV_LOCAL_MODEL_MIN_SIZE

constexpr unsigned CV_LOCAL_MODEL_MIN_SIZE[]
constexpr

◆ EPSILON_VALUE

constexpr double EPSILON_VALUE = 1.0e-5
constexpr

◆ M_PI

constexpr double M_PI = 3.14159265358979323846
constexpr

Pi.

Definition at line 19 of file CVConst.h.

Referenced by cloudViewer::visualization::ViewControlWithCustomAnimation::AddSpinKeyFrames(), G3Point::G3PointAction::angles(), DistanceMapGenerationDlg::angularUnitChanged(), cloudViewer::visualization::rendering::RotationInteractorLogic::CalcPanVectorWorld(), cloudViewer::visualization::rendering::MatrixInteractorLogic::CalcRotateRadians(), cloudViewer::visualization::rendering::MatrixInteractorLogic::CalcRotateZRadians(), cloudViewer::visualization::ViewControl::CameraLocalRotate(), ccMouseCircle::ccMouseCircle(), Circle::Circle(), cloudViewer::GeometricalAnalysisTools::ComputeApproxPointsDensityInACellAtLevel(), cloudViewer::GeometricalAnalysisTools::ComputeCharactersitic(), DistanceMapGenerationTool::ComputeSurfacesAndVolumes(), ConvertAngleFromRad(), ConvertAngleToRad(), DistanceMapGenerationTool::ConvertCloudToConical(), DistanceMapGenerationTool::ConvertCloudToCylindrical(), DistanceMapGenerationTool::ConvertConicalMapToMesh(), cloudViewer::visualization::ViewControl::ConvertFromPinholeCameraParameters(), DistanceMapGenerationTool::ConvertMapToCloud(), DistanceMapGenerationTool::ConvertProfileToMesh(), cloudViewer::visualization::ViewControl::ConvertToPinholeCameraParameters(), CosSinTable< Count >::CosSinTable(), DistanceMapGenerationTool::CreateMap(), cloudViewer::t::geometry::RaycastingScene::CreateRaysPinhole(), define_ccTorus(), cloudViewer::DegreesToRadians(), ccCompass::estimateStructureNormals(), DistanceMapGenerationDlg::exportProfilesAsDXF(), ccContourExtractor::ExtractConcaveHull2D(), Gamma_cc(), ccRasterizeTool::generateHillshade(), GrainsAsEllipsoids::initSphereVertices(), cloudViewer::t::geometry::kernel::pointcloud::IsBoundaryPoints(), logWishSF(), cloudViewer::ml::impl::MapCylinderToCube(), optRotY(), cloudViewer::visualization::gl_util::Perspective(), prior(), DistanceMapGenerationTool::ProjectPointOnCone(), cloudViewer::geometry::pybind_primitives(), cloudViewer::RadiansToDegrees(), cloudViewer::visualization::rendering::CameraSphereInteractorLogic::Rotate(), SampleSphere(), DxfProfilesExporter::SaveHorizontalProfiles(), cloudViewer::NormalDistribution::setParameters(), cloudViewer::visualization::ViewControl::SetProjectionParameters(), PdmsTools::PdmsObjects::CTorus::setValue(), PdmsTools::PdmsObjects::RTorus::setValue(), e57::SphericalBounds::SphericalBounds(), cloudViewer::visualization::rendering::CameraSphereInteractorLogic::StartMouseDrag(), PdmsTools::PdmsObjects::SCylinder::surface(), PdmsTools::PdmsObjects::CTorus::surface(), PdmsTools::PdmsObjects::RTorus::surface(), PdmsTools::PdmsObjects::Dish::surface(), PdmsTools::PdmsObjects::Cone::surface(), ccLineation::updateMetadata(), ccThickness::updateMetadata(), cloudViewer::t::pipelines::kernel::UpdateSPFHFeature(), and cloudViewer::visualization::rendering::CameraInteractorLogic::Zoom().

◆ M_PI_2

constexpr double M_PI_2 = 1.57079632679489661923
constexpr

Pi/2.

Definition at line 24 of file CVConst.h.

Referenced by ccGLMatrixTpl< T >::getParameters().

◆ MAX_LINE_WIDTH_F

constexpr float MAX_LINE_WIDTH_F = 16.0f
constexpr

Definition at line 81 of file CVConst.h.

Referenced by ccPropertiesTreeDelegate::createEditor().

◆ MAX_POINT_SIZE_F

constexpr float MAX_POINT_SIZE_F = 16.0f
constexpr

Definition at line 79 of file CVConst.h.

Referenced by ccPropertiesTreeDelegate::createEditor().

◆ MIN_LINE_WIDTH_F

constexpr float MIN_LINE_WIDTH_F = 1.0f
constexpr

Definition at line 80 of file CVConst.h.

Referenced by ccPropertiesTreeDelegate::createEditor().

◆ MIN_POINT_SIZE_F

constexpr float MIN_POINT_SIZE_F = 1.0f
constexpr

Definition at line 78 of file CVConst.h.

Referenced by ccPropertiesTreeDelegate::createEditor().

◆ NAN_VALUE

constexpr ScalarType NAN_VALUE = std::numeric_limits<ScalarType>::quiet_NaN()
constexpr

NaN as a ScalarType value.

Warning
: handle with care!

Definition at line 76 of file CVConst.h.

Referenced by ccScalarFieldArithmeticsDlg::Apply(), masc::Classifier::classify(), qCanupoProcess::Classify(), qM3C2Process::Compute(), qVoxFallProcess::Compute(), cloudViewer::GeometricalAnalysisTools::ComputeApproxPointsDensityInACellAtLevel(), cloudViewer::ScalarFieldTools::computeCellGaussianFilter(), cloudViewer::DistanceComputationTools::computeCellHausdorffDistance(), cloudViewer::DistanceComputationTools::computeCellHausdorffDistanceWithLocalModel(), cloudViewer::DistanceComputationTools::computeCloud2CloudDistances(), cloudViewer::DistanceComputationTools::ComputeCloud2PlaneDistance(), cloudViewer::DistanceComputationTools::computeCloud2PlaneDistanceRMS(), cloudViewer::DistanceComputationTools::ComputeCloud2PlaneMaxDistance(), cloudViewer::DistanceComputationTools::ComputeCloud2PlaneRobustMax(), cloudViewer::DistanceComputationTools::computeCloud2PolylineEquation(), ComputeCorePointDescriptor(), ComputeCorePointNormal(), qM3C2Normals::ComputeCorePointsNormals(), cloudViewer::Neighbourhood::computeCurvature(), DelaunayLocalModel::computeDistanceFromModelToPoint(), cloudViewer::GeometricalAnalysisTools::ComputeGeomCharacteristicAtLevel(), cloudViewer::StatisticalTestingTools::computeLocalChi2DistAtLevel(), ComputeM3C2DistForPoint(), ComputeMathOpWithNearestNeighbor(), cloudViewer::ScalarFieldTools::computeMeanGradientOnPatch(), cloudViewer::ScalarFieldTools::computeMeanScalarValue(), cloudViewer::ScalarFieldTools::computeMeanSquareScalarValue(), cloudViewer::Neighbourhood::computeMomentOrder1(), ConfusionMatrix::computeOverallAccuracy(), cloudViewer::DistanceComputationTools::computePoint2MeshDistancesWithOctree(), ConfusionMatrix::computePrecisionRecallF1Score(), DistanceMapGenerationTool::ComputeRadialDist(), cloudViewer::Neighbourhood::computeRoughness(), cloudViewer::ScalarFieldTools::computeScalarFieldExtremas(), qM3C2Tools::ComputeStatistics(), masc::ContextBasedFeature::computeValue(), DistanceMapGenerationTool::ConvertMapToCloud(), ccCropTool::Crop(), define_CCConst(), cloudViewer::DistanceComputationTools::diff(), masc::Classifier::evaluate(), cloudViewer::FastMarchingForPropagation::extractPropagatedPoints(), TreeIso::Final_seg_pcd(), cloudViewer::MeshSamplingTools::flagMeshVerticesByType(), cloudViewer::AutoSegmentationTools::frontPropagationBasedSegmentation(), ccRasterizeTool::generateHillshade(), TreeIso::Init_seg_pcd(), TreeIso::Intermediate_seg_pcd(), Interquartile(), Median(), cloudViewer::ScalarFieldTools::multiplyScalarFields(), cloudViewer::ScalarField::NaN(), masc::Feature::PerformMathOp(), ScalarFieldRatioWrapper::pointValue(), masc::ContextBasedFeature::prepare(), masc::Feature::PrepareSF(), CommandSubsample::process(), cloudViewer::ScalarFieldTools::SetScalarValueToNaN(), and ccEntityAction::sfSetAsCoord().

◆ PC_NAN

constexpr PointCoordinateType PC_NAN
constexpr
Initial value:
=
std::numeric_limits<PointCoordinateType>::quiet_NaN()

'NaN' as a PointCoordinateType value

Warning
: handle with care!

Definition at line 71 of file CVConst.h.

Referenced by cloudViewer::Neighbourhood::computeLargestRadius(), and define_CCConst().

◆ PC_ONE

constexpr PointCoordinateType PC_ONE = static_cast<PointCoordinateType>(1.0)
constexpr

'1' as a PointCoordinateType value

To avoid compiler warnings about 'possible loss of data'

Definition at line 67 of file CVConst.h.

Referenced by ccPointPairRegistrationDlg::addAlignedPoint(), qCanupo2DViewDialog::addOrSelectPoint(), ccPointPairRegistrationDlg::addReferencePoint(), PCVContext::associateToEntity(), NurbsCurveFitting::compute(), cloudViewer::DistanceComputationTools::computeCloud2PlaneDistanceRMS(), cloudViewer::DistanceComputationTools::computeCloud2PlaneEquation(), cloudViewer::DistanceComputationTools::ComputeCloud2PlaneMaxDistance(), cloudViewer::DistanceComputationTools::ComputeCloud2PlaneRobustMax(), DistanceMapGenerationTool::ProfileMetaData::computeCloudToSurfaceOriginTrans(), cloudViewer::DistanceComputationTools::computePoint2PlaneDistance(), cloudViewer::DistanceComputationTools::ComputeSquareDistToSegment(), masc::NeighborhoodFeature::computeValue(), DistanceMapGenerationTool::ConvertCloudToConical(), DistanceMapGenerationTool::ConvertCloudToCylindrical(), ccPointPairRegistrationDlg::convertToSphereCenter(), define_CCConst(), cloudViewer::GeometricalAnalysisTools::DetectCircle(), ccPointPair::drawMeOnly(), ccTrace::fitPlane(), GetConeProfile(), ccLibAlgorithms::GetDefaultCloudKernelSize(), ccCompass::importFoliations(), ccCompassImport::importFoliations(), CommandMatchBestFitPlane::process(), cloudViewer::ICPRegistrationTools::Register(), cloudViewer::RegistrationTools::RegistrationProcedure(), qAnimationDlg::smoothTrajectory(), DistanceMapGenerationDlg::toggleOverlayGrid(), and ccPlaneEditDlg::updatePlane().

◆ POINT_HIDDEN

constexpr unsigned char POINT_HIDDEN
constexpr
Initial value:
=
1

Point visibility state: hidden (e.g. behind other points)

Definition at line 94 of file CVConst.h.

Referenced by define_CCConst(), ccGraphicalSegmentationTool::segment(), and StereogramDialog::updateFacetsFilter().

◆ POINT_OUT_OF_FOV

constexpr unsigned char POINT_OUT_OF_FOV
constexpr
Initial value:
=
4

Point visibility state: out of field of view

Definition at line 98 of file CVConst.h.

Referenced by define_CCConst().

◆ POINT_OUT_OF_RANGE

constexpr unsigned char POINT_OUT_OF_RANGE
constexpr
Initial value:
=
2

Point visibility state: out of range

Definition at line 96 of file CVConst.h.

Referenced by define_CCConst().

◆ POINT_VISIBLE

◆ SQRT_3

◆ ZERO_SQUARED_TOLERANCE_D

constexpr double ZERO_SQUARED_TOLERANCE_D = ZERO_TOLERANCE_D * ZERO_TOLERANCE_D
constexpr

ZERO_SQUARED_TOLERANCE_D is used to set or compare a (square) value to "close to zero".

Definition at line 53 of file CVConst.h.

Referenced by cloudViewer::GreaterThanSquareEpsilon(), and cloudViewer::LessThanSquareEpsilon().

◆ ZERO_TOLERANCE

constexpr double ZERO_TOLERANCE
constexpr
Initial value:
=
std::numeric_limits<double>::epsilon()

Numerical threshold for considering a value as "zero".

Definition at line 37 of file CVConst.h.

Referenced by PCVContext::associateToEntity().

◆ ZERO_TOLERANCE_D

constexpr double ZERO_TOLERANCE_D = static_cast<double>(ZERO_TOLERANCE_F)
constexpr

ZERO_TOLERANCE_D is used to set or compare a double variable to "close to zero". It is defined as std::numeric_limits<float>::epsilon() because using std::numeric_limits<double>::epsilon() results in numbers that are too small for our purposes.

Definition at line 49 of file CVConst.h.

Referenced by ccLibAlgorithms::ApplyScaleMatchingAlgorithm(), cloudViewer::WeibullDistribution::ComputeG(), define_CCConst(), cloudViewer::GreaterThanEpsilon(), cloudViewer::LessThanEpsilon(), cloudViewer::GeometricalAnalysisTools::RefineSphereLS(), and cloudViewer::RegistrationTools::RegistrationProcedure().

◆ ZERO_TOLERANCE_F

constexpr float ZERO_TOLERANCE_F = std::numeric_limits<float>::epsilon()
constexpr

ZERO_TOLERANCE_F is used to set or compare a float variable to "close to zero".

Definition at line 43 of file CVConst.h.

Referenced by define_CCConst(), cloudViewer::GreaterThanEpsilon(), and cloudViewer::LessThanEpsilon().

◆ ZERO_TOLERANCE_POINT_COORDINATE

constexpr ScalarType ZERO_TOLERANCE_POINT_COORDINATE
constexpr
Initial value:
=
std::numeric_limits<PointCoordinateType>::epsilon()

ZERO_TOLERANCE_POINT_COORDINATE is used to set or compare a PointCoordinateType variable to "close to zero".

Definition at line 62 of file CVConst.h.

Referenced by define_CCConst().

◆ ZERO_TOLERANCE_SCALAR

constexpr ScalarType ZERO_TOLERANCE_SCALAR
constexpr
Initial value:
=
std::numeric_limits<ScalarType>::epsilon()

ZERO_TOLERANCE_SCALAR is used to set or compare a ScalarType variable to "close to zero".

Definition at line 57 of file CVConst.h.

Referenced by define_CCConst(), and ccScalarField::Range::updateRange().