kigtransform.h Source File (Kig Python Scripting API)

| # Kig Python Scripting API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members

kigtransform.h
1
21
22#ifndef KIG_MISC_KIGTRANSFORM_H
23#define KIG_MISC_KIGTRANSFORM_H
24
25#include "coordinate.h"
26#include <vector>
27
28class LineData;
29
37 class Transformation
38{
39 double mdata[3][3];
40 bool mIsHomothety;
41 bool mIsAffine;
42 Transformation();
43public:
44 ~Transformation();
45 Transformation( double data[3][3], bool ishomothety );
46
53 const Coordinate apply( const double x0, const double x1, const double x2 ) const;
54 const Coordinate apply( const Coordinate& c ) const;
55 const Coordinate apply0( const Coordinate& c ) const;
56
60 bool isHomothetic() const;
61 bool isAffine() const;
62 double getProjectiveIndicator( const Coordinate& c ) const;
63 double getAffineDeterminant() const;
64 double getRotationAngle() const;
65 const Coordinate apply2by2only( const Coordinate& c ) const;
74 double apply( double length ) const;
75 double data( int r, int c ) const;
80 const Transformation inverse( bool& valid ) const;
81
86 static const Transformation identity();
91 static const Transformation scalingOverPoint( double factor, const Coordinate& center = Coordinate() );
97 static const Transformation scalingOverLine( double factor, const LineData& l );
101 static const Transformation translation( const Coordinate& c );
106 static const Transformation rotation( double angle, const Coordinate& center = Coordinate() );
111 static const Transformation pointReflection( const Coordinate& c );
116 static const Transformation lineReflection( const LineData& l );
122 static const Transformation harmonicHomology( const Coordinate& center,
123 const LineData& axis );
128 static const Transformation affinityGI3P(
129 const std::vector<Coordinate>& FromPoints,
130 const std::vector<Coordinate>& ToPoints,
131 bool& valid );
136 static const Transformation projectivityGI4P(
137 const std::vector<Coordinate>& FromPoints,
138 const std::vector<Coordinate>& ToPoints,
139 bool& valid );
145 static const Transformation castShadow( const Coordinate& ls,
146 const LineData& d );
151 static const Transformation projectiveRotation( double alpha,
152 const Coordinate& d,
153 const Coordinate& t );
154
159 static const Transformation similitude(
160 const Coordinate& center, double theta, double factor );
161
166 friend const Transformation operator*( const Transformation& a, const Transformation& b );
167
171 friend bool operator==( const Transformation& lhs, const Transformation& rhs );
172};
173
174const Transformation operator*( const Transformation&, const Transformation& );
175bool operator==( const Transformation& lhs, const Transformation& rhs );
176
177// enum tWantArgsResult { tComplete, tNotComplete, tNotGood };
178
179// Transformation getProjectiveTransformation(
180// int transformationsnum, Object *mtransformations[],
181// bool& valid );
182
183// tWantArgsResult WantTransformation ( Objects::const_iterator& i,
184// const Objects& os );
185
186// TQString getTransformMessage ( const Objects& os, const Object *o );
187
188// bool isHomoteticTransformation ( double transformation[3][3] );
189
190#endif // KIG_MISC_KIGTRANSFORM_H
Coordinate
The Coordinate class is the basic class representing a 2D location by its x and y components.
Definition coordinate.h:34
LineData
Simple class representing a line.
Definition common.h:49
Transformation
Class representing a transformation.
Definition kigtransform.h:38
Transformation::inverse
const Transformation inverse(bool &valid) const
The inverse Transformation.
Transformation::lineReflection
static const Transformation lineReflection(const LineData &l)
Line Reflection.
Transformation::identity
static const Transformation identity()
Identity.
Transformation::projectivityGI4P
static const Transformation projectivityGI4P(const std::vector< Coordinate > &FromPoints, const std::vector< Coordinate > &ToPoints, bool &valid)
Projectivity given the image of 4 points.
Transformation::rotation
static const Transformation rotation(double angle, const Coordinate &center=Coordinate())
Rotation.
Transformation::apply
const Coordinate apply(const double x0, const double x1, const double x2) const
Apply this Tranformation.
Transformation::isHomothetic
bool isHomothetic() const
Returns whether this is a homothetic (affine) transformation.
Transformation::apply
double apply(double length) const
Transformation::projectiveRotation
static const Transformation projectiveRotation(double alpha, const Coordinate &d, const Coordinate &t)
Projective Rotation.
Transformation::affinityGI3P
static const Transformation affinityGI3P(const std::vector< Coordinate > &FromPoints, const std::vector< Coordinate > &ToPoints, bool &valid)
Affinity given the image of 3 points.
Transformation::operator*
friend const Transformation operator*(const Transformation &a, const Transformation &b)
Sequence.
Transformation::operator==
friend bool operator==(const Transformation &lhs, const Transformation &rhs)
Equality.
Transformation::scalingOverLine
static const Transformation scalingOverLine(double factor, const LineData &l)
Scaling over Line.
Transformation::castShadow
static const Transformation castShadow(const Coordinate &ls, const LineData &d)
Cast Shadow.
Transformation::scalingOverPoint
static const Transformation scalingOverPoint(double factor, const Coordinate &center=Coordinate())
Scaling over Point.
Transformation::harmonicHomology
static const Transformation harmonicHomology(const Coordinate &center, const LineData &axis)
Harmonic Homology.
Transformation::similitude
static const Transformation similitude(const Coordinate &center, double theta, double factor)
Similitude.
Transformation::pointReflection
static const Transformation pointReflection(const Coordinate &c)
Point Reflection.
Transformation::translation
static const Transformation translation(const Coordinate &c)
Translation.
This file is part of the documentation for tdelibs .
Documentation copyright © 1996-2002 the KDE developers.
Generated on by doxygen 1.16.1 written by Dimitri van Heesch, © 1997-2001