Skip to content

Commit

Permalink
Merge pull request #2 from christian-rauch/2.11
Browse files Browse the repository at this point in the history
update to 2.11 release
  • Loading branch information
christian-rauch committed Jun 30, 2020
2 parents 04b8c12 + feae85a commit 0c1d417
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 16 deletions.
2 changes: 1 addition & 1 deletion org.cloudcompare.CloudCompare.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<id>org.cloudcompare.CloudCompare</id>
<name>CloudCompare</name>
<releases>
<release date="2019-06-12" version="2.11"/>
<release date="2020-06-14" version="2.11"/>
</releases>
<project_license>GPL-2.0</project_license>
<metadata_license>CC0-1.0</metadata_license>
Expand Down
6 changes: 3 additions & 3 deletions org.cloudcompare.CloudCompare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ modules:
- name: TBB
sources:
- type: archive
url: https://github.com/intel/tbb/archive/2019_U8.tar.gz
sha256: 7b1fd8caea14be72ae4175896510bf99c809cd7031306a1917565e6de7382fba
url: https://github.com/oneapi-src/oneTBB/archive/2019_U8.tar.gz
sha256: 6b540118cbc79f9cbc06a35033c18156c21b84ab7b6cf56d773b168ad2b68566
# CMake support
- type: patch
path: patches/tbb_cmake.patch
Expand Down Expand Up @@ -229,7 +229,7 @@ modules:
# use the source directory relative to manifest
- type: git
url: https://github.com/CloudCompare/CloudCompare.git
commit: 0c0fca2704218eb570af13a46aac2f1010796180
tag: "v2.11.0"
# patch: replace constexpr by const for floating point operations
# see https://github.com/CloudCompare/CloudCompare/issues/848
- type: patch
Expand Down
56 changes: 44 additions & 12 deletions patches/cc_constexpr_double.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
diff --git a/CC/include/CCConst.h b/CC/include/CCConst.h
index 8ab70a93..085e3cae 100644
--- a/CC/include/CCConst.h
+++ b/CC/include/CCConst.h
@@ -40,10 +40,10 @@ constexpr double M_PI_2 = (M_PI/2.0);
@@ -33,17 +33,17 @@ constexpr double M_PI = 3.14159265358979323846;

//! Pi/2
#ifndef M_PI_2
-constexpr double M_PI_2 = (M_PI/2.0);
+const double M_PI_2 = (M_PI/2.0);
#endif

//! Square root of 3
constexpr double SQRT_3 = 1.7320508075688772935274463415059;

//! Conversion factor from radians to degrees
Expand All @@ -14,28 +24,50 @@
//! Numerical threshold for considering a value as "zero"
constexpr double ZERO_TOLERANCE = static_cast<double>(FLT_EPSILON);
diff --git a/libs/qCC_db/ccCameraSensor.cpp b/libs/qCC_db/ccCameraSensor.cpp
index 79a3f257..b591991b 100644
index e19b9804..d159de07 100644
--- a/libs/qCC_db/ccCameraSensor.cpp
+++ b/libs/qCC_db/ccCameraSensor.cpp
@@ -53,8 +53,8 @@ void ccCameraSensor::IntrinsicParameters::GetKinectDefaults(IntrinsicParameters&
@@ -53,9 +53,9 @@ void ccCameraSensor::IntrinsicParameters::GetKinectDefaults(IntrinsicParameters&
//default Kinect parameters from:
// "Accuracy and Resolution of Kinect Depth Data for Indoor Mapping Applications"
// Kourosh Khoshelham and Sander Oude Elberink
- constexpr float focal_mm = static_cast<float>(5.45 * 1.0e-3); // focal length (real distance in meter)
- constexpr float pixelSize_mm = static_cast<float>(9.3 * 1.0e-6); // pixel size (real distance in meter)
+ const float focal_mm = static_cast<float>(5.45 * 1.0e-3); // focal length (real distance in meter)
+ const float pixelSize_mm = static_cast<float>(9.3 * 1.0e-6); // pixel size (real distance in meter)

-
+ const float focal_mm = static_cast<float>(5.45 * 1.0e-3); // focal length (real distance in meter)
+ const float pixelSize_mm = static_cast<float>(9.3 * 1.0e-6); // pixel size (real distance in meter)
+
params.vertFocal_pix = ConvertFocalMMToPix(focal_mm, pixelSize_mm);
params.pixelSize_mm[0] = pixelSize_mm;
params.pixelSize_mm[1] = pixelSize_mm;
@@ -2400,7 +2400,7 @@ bool ccOctreeFrustumIntersector::build(CCLib::DgmOctree* octree)
{
cell.clear();
}
-
+
const CCLib::DgmOctree::cellsContainer& thePointsAndTheirCellCodes = octree->pointsAndTheirCellCodes();
CCLib::DgmOctree::cellsContainer::const_iterator it = thePointsAndTheirCellCodes.begin();

diff --git a/libs/qCC_db/ccColorTypes.h b/libs/qCC_db/ccColorTypes.h
index d456f3e8..f8925358 100644
--- a/libs/qCC_db/ccColorTypes.h
+++ b/libs/qCC_db/ccColorTypes.h
@@ -119,7 +119,7 @@ namespace ccColor

// Predefined colors (default type)
constexpr Rgb white (MAX, MAX, MAX);
- constexpr Rgb lightGrey (static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8));
+ const Rgb lightGrey (static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8));
constexpr Rgb darkGrey (MAX / 2, MAX / 2, MAX / 2);
constexpr Rgb red (MAX, 0, 0);
constexpr Rgb green (0, MAX, 0);
constexpr Rgb whiteRGB (MAX, MAX, MAX);
- constexpr Rgb lightGreyRGB (static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8));
+ const Rgb lightGreyRGB (static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8));
constexpr Rgb darkGreyRGB (MAX / 2, MAX / 2, MAX / 2);
constexpr Rgb redRGB (MAX, 0, 0);
constexpr Rgb greenRGB (0, MAX, 0);
@@ -133,7 +133,7 @@ namespace ccColor

// Predefined colors (default type)
constexpr Rgba white (MAX, MAX, MAX, MAX);
- constexpr Rgba lightGrey (static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), MAX);
+ const Rgba lightGrey (static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), static_cast<ColorCompType>(MAX*0.8), MAX);
constexpr Rgba darkGrey (MAX / 2, MAX / 2, MAX / 2, MAX);
constexpr Rgba red (MAX, 0, 0, MAX);
constexpr Rgba green (0, MAX, 0, MAX);

0 comments on commit 0c1d417

Please sign in to comment.