2 #ifndef vgl_norm_trans_3d_hxx_ 3 #define vgl_norm_trans_3d_hxx_ 10 #include <vnl/vnl_vector_fixed.h> 12 # include <vcl_msvc_warnings.h> 79 this->center_of_mass(points, cx, cy, cz);
81 std::vector<vgl_homg_point_3d<T> > temp;
83 pit = points.begin(); pit != points.end(); pit++)
89 if (!this->scale_xyzroot2(temp, radius))
108 unsigned n = in.size();
109 for (
unsigned i = 0; i < n; ++i)
111 if (in[i].ideal(tol))
145 for (
unsigned i = 0; i < in.size(); ++i)
147 if (in[i].ideal(tol))
150 vnl_vector_fixed<T, 3>
v(p.
x(), p.
y(), p.
z());
151 magnitude +=
v.magnitude();
157 radius = magnitude / numfinite;
164 #undef VGL_NORM_TRANS_3D_INSTANTIATE 165 #define VGL_NORM_TRANS_3D_INSTANTIATE(T) \ 166 template class vgl_norm_trans_3d<T > 168 #endif // vgl_norm_trans_3d_hxx_ vgl_h_matrix_3d & set_scale(T scale)
compose the current transform with a uniform scaling transformation, S.
vgl_h_matrix_3d & set_translation(T tx, T ty, T tz)
set H[0][3] = tx, H[1][3] = ty, and H[2][3] = tz, other elements unaltered.
vgl_norm_trans_3d()
Default constructor.
Represents a homogeneous 3D point.
~vgl_norm_trans_3d()
Destructor.
bool compute_from_points(std::vector< vgl_homg_point_3d< T > > const &points)
compute the normalizing transform.
a point in 3D nonhomogeneous space
A class to hold a 3-d projective transformation matrix and to perform common operations using it e....
vgl_h_matrix_3d & set_identity()
initialize the transformation to identity.
static bool scale_xyzroot2(std::vector< vgl_homg_point_3d< T > > const &in, T &radius)
static void center_of_mass(std::vector< vgl_homg_point_3d< T > > const &points, T &cx, T &cy, T &cz)
The similarity transform that normalizes a 3-d point set.