Kig Python Scripting API Documentation

kigtransform.h

00001 
00022 #ifndef KIG_MISC_KIGTRANSFORM_H
00023 #define KIG_MISC_KIGTRANSFORM_H
00024 
00025 #include "coordinate.h"
00026 #include <vector>
00027 
00028 class LineData;
00029 
00037 class Transformation
00038 {
00039   double mdata[3][3];
00040   bool mIsHomothety;
00041   bool mIsAffine;
00042   Transformation();
00043 public:
00044   ~Transformation();
00045   Transformation( double data[3][3], bool ishomothety );
00046 
00053   const Coordinate apply( const double x0, const double x1, const double x2 ) const;
00054   const Coordinate apply( const Coordinate& c ) const;
00055   const Coordinate apply0( const Coordinate& c ) const;
00056 
00060   bool isHomothetic() const;
00061   bool isAffine() const;
00062   double getProjectiveIndicator( const Coordinate& c ) const;
00063   double getAffineDeterminant() const;
00064   double getRotationAngle() const;
00065   const Coordinate apply2by2only( const Coordinate& c ) const;
00074   double apply( double length ) const;
00075   double data( int r, int c ) const;
00080   const Transformation inverse( bool& valid ) const;
00081 
00086   static const Transformation identity();
00091   static const Transformation scalingOverPoint( double factor, const Coordinate& center = Coordinate() );
00097   static const Transformation scalingOverLine( double factor, const LineData& l );
00101   static const Transformation translation( const Coordinate& c );
00106   static const Transformation rotation( double angle, const Coordinate& center = Coordinate() );
00111   static const Transformation pointReflection( const Coordinate& c );
00116   static const Transformation lineReflection( const LineData& l );
00122   static const Transformation harmonicHomology( const Coordinate& center,
00123                                           const LineData& axis );
00128   static const Transformation affinityGI3P(
00129                 const std::vector<Coordinate>& FromPoints,
00130                 const std::vector<Coordinate>& ToPoints,
00131                 bool& valid );
00136   static const Transformation projectivityGI4P(
00137                 const std::vector<Coordinate>& FromPoints,
00138                 const std::vector<Coordinate>& ToPoints,
00139                 bool& valid );
00145   static const Transformation castShadow( const Coordinate& ls,
00146                                           const LineData& d );
00151   static const Transformation projectiveRotation( double alpha,
00152                                                   const Coordinate& d,
00153                                                   const Coordinate& t );
00154 
00159   static const Transformation similitude(
00160     const Coordinate& center, double theta, double factor );
00161 
00166   friend const Transformation operator*( const Transformation& a, const Transformation& b );
00167 
00171   friend bool operator==( const Transformation& lhs, const Transformation& rhs );
00172 };
00173 
00174 const Transformation operator*( const Transformation&, const Transformation& );
00175 bool operator==( const Transformation& lhs, const Transformation& rhs );
00176 
00177 // enum tWantArgsResult { tComplete, tNotComplete, tNotGood };
00178 
00179 // Transformation getProjectiveTransformation(
00180 //   int transformationsnum, Object *mtransformations[],
00181 //   bool& valid );
00182 
00183 // tWantArgsResult WantTransformation ( Objects::const_iterator& i,
00184 //          const Objects& os );
00185 
00186 // QString getTransformMessage ( const Objects& os, const Object *o );
00187 
00188 // bool isHomoteticTransformation ( double transformation[3][3] );
00189 
00190 #endif // KIG_MISC_KIGTRANSFORM_H
KDE Logo
This file is part of the documentation for kdelibs 0.10.7.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Jun 29 16:51:38 2008 by doxygen 1.5.6 written by Dimitri van Heesch, © 1997-2001