Class xlifepp::Transformation#

class Transformation#

handles mesh transformations

Subclassed by xlifepp::Reflection2d, xlifepp::Reflection3d, xlifepp::Rotation2d, xlifepp::Rotation3d, xlifepp::Scaling, xlifepp::Translation

Public Functions

Transformation(const Matrix<real_t> &M, const Vector<real_t> &b = Vector<real_t>(3, 0.))#

explicit constructor from matrix

Transformation(const string_t &nam = "", TransformType trt = _noTransform)#

basic constructor

Transformation(const Transformation &t)#

copy constructor

Transformation(real_t a11, real_t a12, real_t a13, real_t a21, real_t a22, real_t a23, real_t a31, real_t a32, real_t a33, real_t b1 = 0, real_t b2 = 0, real_t b3 = 0)#

explicit constructor from matrix coefficients

virtual ~Transformation()#

destructor

virtual Point apply(const Point &p) const#

computes the image of a point by the transformation

void buildMat()#

build mat_ and vec_ related to the linear transformation (general function)

inline virtual Transformation *clone() const#

virtual copy constructor

inline const Transformation *component(number_t i) const#

accessor to i-th component

inline const std::vector<const Transformation*> components() const#

accessor to components

inline virtual Homothety *homothety()#

access to child Homothety object

inline virtual const Homothety *homothety() const#

access to child Homothety object (const)

virtual Point inverse(const Point &p) const#

computes the image of a point by the inverse transformation (use matrix representation)

inline string_t name() const#

get the Transformation name

inline void name(const string_t &nm)#

set the Transformation name

Transformation &operator*=(const Transformation &t)#

composition of transformations (general case)

Transformation &operator=(const Transformation &t)#

assign operator

assign operator - deep copy

inline virtual PointReflection *pointReflection()#

access to child PointReflection object

inline virtual const PointReflection *pointReflection() const#

access to child PointReflection object (const)

virtual void print(std::ostream&) const#

build mat_ and vec_ related to the transformation (general function)

print Transformation

inline virtual Reflection2d *reflection2d()#

access to child Reflection object

inline virtual const Reflection2d *reflection2d() const#

access to child Reflection object (const)

inline virtual Reflection3d *reflection3d()#

access to child Reflection3d object

inline virtual const Reflection3d *reflection3d() const#

access to child Reflection3d object (const)

inline virtual Rotation2d *rotation2d()#

access to child Rotation2d object

inline virtual const Rotation2d *rotation2d() const#

access to child Rotation2d object (const)

inline virtual Rotation3d *rotation3d()#

access to child Rotation3d object

inline virtual const Rotation3d *rotation3d() const#

access to child Rotation3d object (const)

real_t scaleFactor() const#

return the scale factor (=1.

if no homotethy in)

inline TransformType transformType() const#

return the geometrical transformation

inline void transformType(TransformType tr)#

sets the geometrical shape

inline virtual Translation *translation()#

access to child Translation object

inline virtual const Translation *translation() const#

access to child Translation object (const)

Friends

friend Transformation composeCanonicalAndCanonical(const Transformation &t1, const Transformation &t2)#

composition of canonical transformations

friend Transformation composeCanonicalAndComposite(const Transformation &t1, const Transformation &t2)#

composition of a canonical transformation and a composite transformation

friend Transformation composeCompositeAndCanonical(const Transformation &t1, const Transformation &t2)#

composition of a composite transformation and a canonical transformation

friend Transformation composeCompositeAndComposite(const Transformation &t1, const Transformation &t2)#

composition of composite transformations

friend Transformation operator*(const Transformation &t1, const Transformation &t2)#

composition of transformations (general case)

friend std::ostream &operator<<(std::ostream&, const Transformation&)#

return the scale factor (=1.

output Transformation

if no homothety)

friend Transformation toComposite(const Transformation &t)#

conversion of a canonical Transformation into a composite Transformation with one component

return a composite Transformation with only one component: t

  • if t is canonical, the components_ vector contains only t

  • if t is composite, it does nothing

this function is necessary when initializing composite Transformation before using += operator