MeshLib
 
Loading...
Searching...
No Matches
MRMultiwayAligningTransform.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRRigidXf3.h"
5#include <memory>
6
7namespace MR
8{
9
13
18{
19public:
21 MRMESH_API explicit MultiwayAligningTransform( int numObjs = 0 );
22
25
27
29 MRMESH_API void reset( int numObjs );
30
33 MRMESH_API void add( int objA, const Vector3d& pA, int objB, const Vector3d& pB, double w = 1 );
34
37 void add( int objA, const Vector3f& pA, int objB, const Vector3f& pB, float w = 1 ) { add( objA, Vector3d( pA ), objB, Vector3d( pB ), w ); }
38
42 MRMESH_API void add( int objA, const Vector3d& pA, int objB, const Vector3d& pB, const Vector3d& n, double w = 1 );
43
47 void add( int objA, const Vector3f& pA, int objB, const Vector3f& pB, const Vector3f& n, float w = 1 ) { add( objA, Vector3d( pA ), objB, Vector3d( pB ), Vector3d( n ), w ); }
48
51
55 {
57 double rot = 0; // length units
58
60 double shift = 0; // dimensionless
61 };
62
66 [[nodiscard]] MRMESH_API std::vector<RigidXf3d> solve( const Stabilizer & stab ) const;
67 [[nodiscard]] std::vector<RigidXf3d> solve() const { return solve( {} ); }
68
69private:
70 class Impl;
71 std::unique_ptr<Impl> impl_;
72};
73
75
76} //namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
Definition MRMultiwayAligningTransform.h:18
void add(int objA, const Vector3f &pA, int objB, const Vector3f &pB, const Vector3f &n, float w=1)
Definition MRMultiwayAligningTransform.h:47
MRMESH_API void add(const MultiwayAligningTransform &r)
appends links accumulated in (r) into this
MRMESH_API MultiwayAligningTransform(int numObjs=0)
initializes internal data to start registering given number of objects
MRMESH_API void add(int objA, const Vector3d &pA, int objB, const Vector3d &pB, const Vector3d &n, double w=1)
std::vector< RigidXf3d > solve() const
Definition MRMultiwayAligningTransform.h:67
MRMESH_API void reset(int numObjs)
reinitializes internal data to start registering given number of objects
void add(int objA, const Vector3f &pA, int objB, const Vector3f &pB, float w=1)
Definition MRMultiwayAligningTransform.h:37
MRMESH_API void add(int objA, const Vector3d &pA, int objB, const Vector3d &pB, double w=1)
MRMESH_API MultiwayAligningTransform(MultiwayAligningTransform &&) noexcept
MRMESH_API std::vector< RigidXf3d > solve(const Stabilizer &stab) const
represents a 3-dimentional float-typed vector
Definition MRDotNet/MRVector3.h:8
Definition MRCameraOrientationPlugin.h:7
Definition MRMultiwayAligningTransform.h:55
double shift
any not-zero number stabilizes solution for translation
Definition MRMultiwayAligningTransform.h:60
double rot
any not-zero number stabilizes solution for rotation angles
Definition MRMultiwayAligningTransform.h:57