From 48b91715fc5c6f0f9ade1c45e7b61ac81d4a3671 Mon Sep 17 00:00:00 2001 From: Fabien Servant Date: Fri, 17 Jan 2025 13:00:26 +0100 Subject: [PATCH] rename meshIntersection methods --- src/aliceVision/mesh/MeshIntersection.cpp | 6 +++--- src/aliceVision/mesh/MeshIntersection.hpp | 14 +++++++------- .../sfm/pipeline/expanding/ExpansionChunk.cpp | 2 +- .../sfm/pipeline/expanding/PointFetcher.hpp | 2 +- src/software/pipeline/main_sfmBootstraping.cpp | 2 +- src/software/pipeline/main_sfmExpanding.cpp | 4 ++-- src/software/utils/main_depthMapRendering.cpp | 2 +- src/software/utils/main_normalMapRendering.cpp | 2 +- src/software/utils/main_sfmTransform.cpp | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/aliceVision/mesh/MeshIntersection.cpp b/src/aliceVision/mesh/MeshIntersection.cpp index c2dce3fef2..2c7d8e6189 100644 --- a/src/aliceVision/mesh/MeshIntersection.cpp +++ b/src/aliceVision/mesh/MeshIntersection.cpp @@ -28,7 +28,7 @@ bool MeshIntersection::initialize(const std::string & pathToModel) return true; } -bool MeshIntersection::peekPoint(Vec3 & output, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords) +bool MeshIntersection::pickPoint(Vec3 & output, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords) { const Vec3 posCamera = _pose.center(); const Vec3 wdir = intrinsic.backprojectTransform(imageCoords, true, _pose, 1.0); @@ -58,7 +58,7 @@ bool MeshIntersection::peekPoint(Vec3 & output, const camera::IntrinsicBase & in return true; } -bool MeshIntersection::peekNormal(Vec3 & output, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords) +bool MeshIntersection::pickNormal(Vec3 & output, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords) { const Vec3 posCamera = _pose.center(); const Vec3 wdir = intrinsic.backprojectTransform(imageCoords, true, _pose, 1.0); @@ -88,7 +88,7 @@ bool MeshIntersection::peekNormal(Vec3 & output, const camera::IntrinsicBase & i return true; } -bool MeshIntersection::peekPointAndNormal(Vec3 & point, Vec3 & normal, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords) +bool MeshIntersection::pickPointAndNormal(Vec3 & point, Vec3 & normal, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords) { const Vec3 posCamera = _pose.center(); const Vec3 wdir = intrinsic.backprojectTransform(imageCoords, true, _pose, 1.0); diff --git a/src/aliceVision/mesh/MeshIntersection.hpp b/src/aliceVision/mesh/MeshIntersection.hpp index bd1df86408..9f5c6f97da 100644 --- a/src/aliceVision/mesh/MeshIntersection.hpp +++ b/src/aliceVision/mesh/MeshIntersection.hpp @@ -22,7 +22,7 @@ class MeshIntersection bool initialize(const std::string & pathToModel); /** - * @brief Update pose to use for peeking + * @brief Update pose to use for picking * @param pose transformation to use (in aliceVision standard form) */ void setPose(const geometry::Pose3 & pose) @@ -31,32 +31,32 @@ class MeshIntersection } /** - * @brief peek a point on the mesh given a input camera observation + * @brief pick a point on the mesh given a input camera observation * @param output the output measured point * @param intrinsic the camera intrinsics to use for ray computation * @param imageCoords the camera observation we want to use to estimate its 'depth' * @return true if the ray intersect the mesh. */ - bool peekPoint(Vec3 & output, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords); + bool pickPoint(Vec3 & output, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords); /** - * @brief peek a point and get its normal on the mesh given a input camera observation + * @brief pick a point and get its normal on the mesh given a input camera observation * @param output the output measured normal * @param intrinsic the camera intrinsics to use for ray computation * @param imageCoords the camera observation we want to use to estimate its 'depth' * @return true if the ray intersect the mesh. */ - bool peekNormal(Vec3 & output, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords); + bool pickNormal(Vec3 & output, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords); /** - * @brief peek a point and get its normal on the mesh given a input camera observation + * @brief pick a point and get its normal on the mesh given a input camera observation * @param point the output measured point * @param normal the output measured normal * @param intrinsic the camera intrinsics to use for ray computation * @param imageCoords the camera observation we want to use to estimate its 'depth' * @return true if the ray intersect the mesh. */ - bool peekPointAndNormal(Vec3 & point, Vec3 & normal, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords); + bool pickPointAndNormal(Vec3 & point, Vec3 & normal, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords); private: GEO::Mesh _mesh; diff --git a/src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.cpp b/src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.cpp index 1282350032..b3fbfc9d3a 100644 --- a/src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.cpp +++ b/src/aliceVision/sfm/pipeline/expanding/ExpansionChunk.cpp @@ -234,7 +234,7 @@ void ExpansionChunk::setConstraints(sfmData::SfMData & sfmData, const track::Tra } Vec3 point, normal; - if (!_pointFetcherHandler->peekPointAndNormal(point, normal, intrinsics, trackItem.coords)) + if (!_pointFetcherHandler->pickPointAndNormal(point, normal, intrinsics, trackItem.coords)) { continue; } diff --git a/src/aliceVision/sfm/pipeline/expanding/PointFetcher.hpp b/src/aliceVision/sfm/pipeline/expanding/PointFetcher.hpp index 59fca5035c..a1ccacaa70 100644 --- a/src/aliceVision/sfm/pipeline/expanding/PointFetcher.hpp +++ b/src/aliceVision/sfm/pipeline/expanding/PointFetcher.hpp @@ -35,7 +35,7 @@ class PointFetcher * @param imageCoords the input image pixel coordinates in 2D. * @return false on error */ - virtual bool peekPointAndNormal(Vec3 & point, + virtual bool pickPointAndNormal(Vec3 & point, Vec3 & normal, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords) = 0; diff --git a/src/software/pipeline/main_sfmBootstraping.cpp b/src/software/pipeline/main_sfmBootstraping.cpp index 871a0cab2f..af70209461 100644 --- a/src/software/pipeline/main_sfmBootstraping.cpp +++ b/src/software/pipeline/main_sfmBootstraping.cpp @@ -87,7 +87,7 @@ bool landmarksFromMesh( const double scale = track.featPerView.at(referenceViewId).scale; Vec3 point; - if (!mi.peekPoint(point, intrinsic, refpt)) + if (!mi.pickPoint(point, intrinsic, refpt)) { continue; } diff --git a/src/software/pipeline/main_sfmExpanding.cpp b/src/software/pipeline/main_sfmExpanding.cpp index ffadaea5c7..a38ab3b4c4 100644 --- a/src/software/pipeline/main_sfmExpanding.cpp +++ b/src/software/pipeline/main_sfmExpanding.cpp @@ -66,12 +66,12 @@ class MeshPointFetcher : public sfm::PointFetcher * @param imageCoords the input image pixel coordinates in 2D. * @return false on error */ - bool peekPointAndNormal(Vec3 & point, + bool pickPointAndNormal(Vec3 & point, Vec3 & normal, const camera::IntrinsicBase & intrinsic, const Vec2 & imageCoords) override { - return _mi.peekPointAndNormal(point, normal, intrinsic, imageCoords); + return _mi.pickPointAndNormal(point, normal, intrinsic, imageCoords); } private: diff --git a/src/software/utils/main_depthMapRendering.cpp b/src/software/utils/main_depthMapRendering.cpp index e47720a06b..4cc2eb2fdd 100644 --- a/src/software/utils/main_depthMapRendering.cpp +++ b/src/software/utils/main_depthMapRendering.cpp @@ -117,7 +117,7 @@ int aliceVision_main(int argc, char** argv) //Find the 3d point //Which is the intersection of the ray and the mesh Vec3 pt3d; - if (!mi.peekPoint(pt3d, *intrinsic, pt)) + if (!mi.pickPoint(pt3d, *intrinsic, pt)) { continue; } diff --git a/src/software/utils/main_normalMapRendering.cpp b/src/software/utils/main_normalMapRendering.cpp index 61c758586d..58b261a606 100644 --- a/src/software/utils/main_normalMapRendering.cpp +++ b/src/software/utils/main_normalMapRendering.cpp @@ -109,7 +109,7 @@ int aliceVision_main(int argc, char** argv) //Which is the intersection of the ray and the mesh //And get its normal Vec3 normal; - if (!mi.peekNormal(normal, *intrinsic, pt)) + if (!mi.pickNormal(normal, *intrinsic, pt)) { continue; } diff --git a/src/software/utils/main_sfmTransform.cpp b/src/software/utils/main_sfmTransform.cpp index 05e5d7b4f4..55f5b3886e 100644 --- a/src/software/utils/main_sfmTransform.cpp +++ b/src/software/utils/main_sfmTransform.cpp @@ -409,7 +409,7 @@ bool parseLineUp(const std::string & lineUpFilename, const std::string & tracksF const Vec2 & imageCoords = trackitem.coords; Vec3 pt3d; - if (!meshIntersection.peekPoint(pt3d, *intrinsic, imageCoords)) + if (!meshIntersection.pickPoint(pt3d, *intrinsic, imageCoords)) { continue; }