Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/libmv/libmv/simple_pipeline/reconstruction.cc')
-rw-r--r--intern/libmv/libmv/simple_pipeline/reconstruction.cc67
1 files changed, 34 insertions, 33 deletions
diff --git a/intern/libmv/libmv/simple_pipeline/reconstruction.cc b/intern/libmv/libmv/simple_pipeline/reconstruction.cc
index 851eedb5bb1..584f7440caf 100644
--- a/intern/libmv/libmv/simple_pipeline/reconstruction.cc
+++ b/intern/libmv/libmv/simple_pipeline/reconstruction.cc
@@ -19,20 +19,21 @@
// IN THE SOFTWARE.
#include "libmv/simple_pipeline/reconstruction.h"
-#include "libmv/numeric/numeric.h"
#include "libmv/logging/logging.h"
+#include "libmv/numeric/numeric.h"
namespace libmv {
-EuclideanReconstruction::EuclideanReconstruction() {}
+EuclideanReconstruction::EuclideanReconstruction() {
+}
EuclideanReconstruction::EuclideanReconstruction(
- const EuclideanReconstruction &other) {
+ const EuclideanReconstruction& other) {
image_to_cameras_map_ = other.image_to_cameras_map_;
points_ = other.points_;
}
-EuclideanReconstruction &EuclideanReconstruction::operator=(
- const EuclideanReconstruction &other) {
+EuclideanReconstruction& EuclideanReconstruction::operator=(
+ const EuclideanReconstruction& other) {
if (&other != this) {
image_to_cameras_map_ = other.image_to_cameras_map_;
points_ = other.points_;
@@ -41,9 +42,9 @@ EuclideanReconstruction &EuclideanReconstruction::operator=(
}
void EuclideanReconstruction::InsertCamera(int image,
- const Mat3 &R,
- const Vec3 &t) {
- LG << "InsertCamera " << image << ":\nR:\n"<< R << "\nt:\n" << t;
+ const Mat3& R,
+ const Vec3& t) {
+ LG << "InsertCamera " << image << ":\nR:\n" << R << "\nt:\n" << t;
EuclideanCamera camera;
camera.image = image;
@@ -53,7 +54,7 @@ void EuclideanReconstruction::InsertCamera(int image,
image_to_cameras_map_.insert(make_pair(image, camera));
}
-void EuclideanReconstruction::InsertPoint(int track, const Vec3 &X) {
+void EuclideanReconstruction::InsertPoint(int track, const Vec3& X) {
LG << "InsertPoint " << track << ":\n" << X;
if (track >= points_.size()) {
points_.resize(track + 1);
@@ -62,13 +63,12 @@ void EuclideanReconstruction::InsertPoint(int track, const Vec3 &X) {
points_[track].X = X;
}
-EuclideanCamera *EuclideanReconstruction::CameraForImage(int image) {
- return const_cast<EuclideanCamera *>(
- static_cast<const EuclideanReconstruction *>(
- this)->CameraForImage(image));
+EuclideanCamera* EuclideanReconstruction::CameraForImage(int image) {
+ return const_cast<EuclideanCamera*>(
+ static_cast<const EuclideanReconstruction*>(this)->CameraForImage(image));
}
-const EuclideanCamera *EuclideanReconstruction::CameraForImage(
+const EuclideanCamera* EuclideanReconstruction::CameraForImage(
int image) const {
ImageToCameraMap::const_iterator it = image_to_cameras_map_.find(image);
if (it == image_to_cameras_map_.end()) {
@@ -86,16 +86,16 @@ vector<EuclideanCamera> EuclideanReconstruction::AllCameras() const {
return cameras;
}
-EuclideanPoint *EuclideanReconstruction::PointForTrack(int track) {
- return const_cast<EuclideanPoint *>(
- static_cast<const EuclideanReconstruction *>(this)->PointForTrack(track));
+EuclideanPoint* EuclideanReconstruction::PointForTrack(int track) {
+ return const_cast<EuclideanPoint*>(
+ static_cast<const EuclideanReconstruction*>(this)->PointForTrack(track));
}
-const EuclideanPoint *EuclideanReconstruction::PointForTrack(int track) const {
+const EuclideanPoint* EuclideanReconstruction::PointForTrack(int track) const {
if (track < 0 || track >= points_.size()) {
return NULL;
}
- const EuclideanPoint *point = &points_[track];
+ const EuclideanPoint* point = &points_[track];
if (point->track == -1) {
return NULL;
}
@@ -112,8 +112,8 @@ vector<EuclideanPoint> EuclideanReconstruction::AllPoints() const {
return points;
}
-void ProjectiveReconstruction::InsertCamera(int image, const Mat34 &P) {
- LG << "InsertCamera " << image << ":\nP:\n"<< P;
+void ProjectiveReconstruction::InsertCamera(int image, const Mat34& P) {
+ LG << "InsertCamera " << image << ":\nP:\n" << P;
ProjectiveCamera camera;
camera.image = image;
@@ -122,7 +122,7 @@ void ProjectiveReconstruction::InsertCamera(int image, const Mat34 &P) {
image_to_cameras_map_.insert(make_pair(image, camera));
}
-void ProjectiveReconstruction::InsertPoint(int track, const Vec4 &X) {
+void ProjectiveReconstruction::InsertPoint(int track, const Vec4& X) {
LG << "InsertPoint " << track << ":\n" << X;
if (track >= points_.size()) {
points_.resize(track + 1);
@@ -131,17 +131,17 @@ void ProjectiveReconstruction::InsertPoint(int track, const Vec4 &X) {
points_[track].X = X;
}
-ProjectiveCamera *ProjectiveReconstruction::CameraForImage(int image) {
- return const_cast<ProjectiveCamera *>(
- static_cast<const ProjectiveReconstruction *>(
- this)->CameraForImage(image));
+ProjectiveCamera* ProjectiveReconstruction::CameraForImage(int image) {
+ return const_cast<ProjectiveCamera*>(
+ static_cast<const ProjectiveReconstruction*>(this)->CameraForImage(
+ image));
}
-const ProjectiveCamera *ProjectiveReconstruction::CameraForImage(
+const ProjectiveCamera* ProjectiveReconstruction::CameraForImage(
int image) const {
ImageToCameraMap::const_iterator it = image_to_cameras_map_.find(image);
if (it == image_to_cameras_map_.end()) {
- return NULL;
+ return NULL;
}
return &it->second;
}
@@ -155,16 +155,17 @@ vector<ProjectiveCamera> ProjectiveReconstruction::AllCameras() const {
return cameras;
}
-ProjectivePoint *ProjectiveReconstruction::PointForTrack(int track) {
- return const_cast<ProjectivePoint *>(
- static_cast<const ProjectiveReconstruction *>(this)->PointForTrack(track));
+ProjectivePoint* ProjectiveReconstruction::PointForTrack(int track) {
+ return const_cast<ProjectivePoint*>(
+ static_cast<const ProjectiveReconstruction*>(this)->PointForTrack(track));
}
-const ProjectivePoint *ProjectiveReconstruction::PointForTrack(int track) const {
+const ProjectivePoint* ProjectiveReconstruction::PointForTrack(
+ int track) const {
if (track < 0 || track >= points_.size()) {
return NULL;
}
- const ProjectivePoint *point = &points_[track];
+ const ProjectivePoint* point = &points_[track];
if (point->track == -1) {
return NULL;
}