33 #ifndef CXTRANSFORM3D_H_
34 #define CXTRANSFORM3D_H_
36 #include "cxResourceExport.h"
39 #include <boost/array.hpp>
40 #include <boost/shared_ptr.hpp>
48 namespace cx_transform3D_internal
50 cxResource_EXPORT boost::array<double, 16>
flatten(
const Eigen::Affine3d*
self);
52 cxResource_EXPORT
void fill(Eigen::Affine3d*
self,
const double* raw);
54 cxResource_EXPORT std::ostream&
put(
const Eigen::Affine3d*
self, std::ostream& s,
int indent,
char newline);
55 cxResource_EXPORT Eigen::Affine3d
fromString(
const QString& text,
bool* _ok);
62 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
63 std::ostream& operator<<(std::ostream& s, const Eigen::Transform<_Scalar, _Dim, _Mode, _Options>& t)
65 s << t.matrix().format(IOFormat());
70 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
73 return this->linear() * v;
76 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
79 return (this->linear() * v).normal();
82 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
88 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
91 return this->inverse();
94 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
100 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
106 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
112 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
118 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
124 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
130 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
131 Transform<_Scalar, _Dim, _Mode, _Options> Transform<_Scalar, _Dim, _Mode, _Options>::fromString(
const QString& text,
137 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
138 Transform<_Scalar, _Dim, _Mode, _Options> Transform<_Scalar, _Dim, _Mode, _Options>::fromVtkMatrix(
vtkMatrix4x4Ptr m)
140 Transform<_Scalar, _Dim, _Mode, _Options> retval;
150 class DoubleBoundingBox3D;
170 cxResource_EXPORT DoubleBoundingBox3D
transform(
const Transform3D& m,
const DoubleBoundingBox3D& bb);
vtkSmartPointer< class vtkMatrix4x4 > vtkMatrix4x4Ptr
DoubleBoundingBox3D transform(const Transform3D &m, const DoubleBoundingBox3D &bb)
Transform3D createTransformRotateY(const double angle)
Transform3D createTransformScale(const Vector3D &scale_)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< Transform3D > Transform3DPtr
cxResource_EXPORT Transform3D createTransformRotationBetweenVectors(Vector3D from, Vector3D to)
vtkSmartPointer< class vtkTransform > vtkTransformPtr
Transform3D createTransformNormalize(const DoubleBoundingBox3D &in, const DoubleBoundingBox3D &out)
bool similar(const DoubleBoundingBox3D &a, const DoubleBoundingBox3D &b, double tol)
Transform3D createTransformIJC(const Vector3D &ivec, const Vector3D &jvec, const Vector3D ¢er)
Transform3D createTransformTranslate(const Vector3D &translation)
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Transform3D createTransformRotateZ(const double angle)
Transform3D createTransformRotateX(const double angle)