Class xlifepp::Transformation#

class Transformation#

Inheritence diagram for xlifepp::Transformation:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "7" [label="xlifepp::Homothety" tooltip="xlifepp::Homothety"] "8" [label="xlifepp::PointReflection" tooltip="xlifepp::PointReflection"] "2" [label="xlifepp::Reflection2d" tooltip="xlifepp::Reflection2d"] "3" [label="xlifepp::Reflection3d" tooltip="xlifepp::Reflection3d"] "4" [label="xlifepp::Rotation2d" tooltip="xlifepp::Rotation2d"] "5" [label="xlifepp::Rotation3d" tooltip="xlifepp::Rotation3d"] "6" [label="xlifepp::Scaling" tooltip="xlifepp::Scaling"] "1" [label="xlifepp::Transformation" tooltip="xlifepp::Transformation" fillcolor="#BFBFBF"] "9" [label="xlifepp::Translation" tooltip="xlifepp::Translation"] "7" -> "6" [dir=forward tooltip="public-inheritance"] "8" -> "7" [dir=forward tooltip="public-inheritance"] "2" -> "1" [dir=forward tooltip="public-inheritance"] "3" -> "1" [dir=forward tooltip="public-inheritance"] "4" -> "1" [dir=forward tooltip="public-inheritance"] "5" -> "1" [dir=forward tooltip="public-inheritance"] "6" -> "1" [dir=forward tooltip="public-inheritance"] "9" -> "1" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::Transformation:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="xlifepp::Matrix< real_t >" tooltip="xlifepp::Matrix< real_t >"] "7" [label="xlifepp::Vector< real_t >" tooltip="xlifepp::Vector< real_t >"] "4" [label="std::vector< T >" tooltip="std::vector< T >"] "6" [label="std::vector< K >" tooltip="std::vector< K >"] "9" [label="std::vector< const xlifepp::Transformation * >" tooltip="std::vector< const xlifepp::Transformation * >"] "3" [label="std::vector< real_t >" tooltip="std::vector< real_t >"] "5" [label="xlifepp::Matrix< K >" tooltip="xlifepp::Matrix< K >"] "1" [label="xlifepp::Transformation" tooltip="xlifepp::Transformation" fillcolor="#BFBFBF"] "8" [label="xlifepp::Vector< K >" tooltip="xlifepp::Vector< K >"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "2" -> "5" [dir=forward tooltip="template-instance"] "7" -> "3" [dir=forward tooltip="public-inheritance"] "7" -> "8" [dir=forward tooltip="template-instance"] "6" -> "4" [dir=forward tooltip="template-instance"] "9" -> "4" [dir=forward tooltip="template-instance"] "3" -> "4" [dir=forward tooltip="template-instance"] "5" -> "6" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="usage"] "1" -> "7" [dir=forward tooltip="usage"] "1" -> "9" [dir=forward tooltip="usage"] "8" -> "6" [dir=forward tooltip="public-inheritance"] }

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