• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kig

Public Member Functions | Static Public Member Functions | Friends | List of all members
Transformation Class Reference

#include <kigtransform.h>

Public Member Functions

 Transformation (double data[3][3], bool ishomothety)
 
 ~Transformation ()
 
const Coordinate apply (const double x0, const double x1, const double x2) const
 
const Coordinate apply (const Coordinate &c) const
 
double apply (double length) const
 
const Coordinate apply0 (const Coordinate &c) const
 
const Coordinate apply2by2only (const Coordinate &c) const
 
double data (int r, int c) const
 
double getAffineDeterminant () const
 
double getProjectiveIndicator (const Coordinate &c) const
 
double getRotationAngle () const
 
const Transformation inverse (bool &valid) const
 
bool isAffine () const
 
bool isHomothetic () const
 

Static Public Member Functions

static const Transformation affinityGI3P (const std::vector< Coordinate > &FromPoints, const std::vector< Coordinate > &ToPoints, bool &valid)
 
static const Transformation castShadow (const Coordinate &ls, const LineData &d)
 
static const Transformation harmonicHomology (const Coordinate &center, const LineData &axis)
 
static const Transformation identity ()
 
static const Transformation lineReflection (const LineData &l)
 
static const Transformation pointReflection (const Coordinate &c)
 
static const Transformation projectiveRotation (double alpha, const Coordinate &d, const Coordinate &t)
 
static const Transformation projectivityGI4P (const std::vector< Coordinate > &FromPoints, const std::vector< Coordinate > &ToPoints, bool &valid)
 
static const Transformation rotation (double angle, const Coordinate &center=Coordinate())
 
static const Transformation scalingOverLine (double factor, const LineData &l)
 
static const Transformation scalingOverPoint (double factor, const Coordinate &center=Coordinate())
 
static const Transformation similitude (const Coordinate &center, double theta, double factor)
 
static const Transformation translation (const Coordinate &c)
 

Friends

const Transformation operator* (const Transformation &a, const Transformation &b)
 
bool operator== (const Transformation &lhs, const Transformation &rhs)
 

Detailed Description

Class representing a transformation.

More specifically, this class represents a pretty generic 2-dimensional transformation. Various common transformations can be used. Construct a Transformation by using one of its static members, and use it either with its Transformation::apply method, or the ObjectImp::transform method.

Definition at line 37 of file kigtransform.h.

Constructor & Destructor Documentation

Transformation::~Transformation ( )

Definition at line 760 of file kigtransform.cpp.

Transformation::Transformation ( double  data[3][3],
bool  ishomothety 
)

Definition at line 772 of file kigtransform.cpp.

Member Function Documentation

const Transformation Transformation::affinityGI3P ( const std::vector< Coordinate > &  FromPoints,
const std::vector< Coordinate > &  ToPoints,
bool &  valid 
)
static

Affinity given the image of 3 points.

Returns the unique affinity that transforms 3 given points into 3 given points.

Definition at line 391 of file kigtransform.cpp.

const Coordinate Transformation::apply ( const double  x0,
const double  x1,
const double  x2 
) const

Apply this Tranformation.

Apply this transformation to the Coordinate c. Can return an invalid Coordinate. apply0 assumes that c indicates a point at infinity, having [0, c.x, c.y] as homogeneous coordinates

Definition at line 611 of file kigtransform.cpp.

const Coordinate Transformation::apply ( const Coordinate &  c) const

Definition at line 633 of file kigtransform.cpp.

double Transformation::apply ( double  length) const

a homothetic transformation maintains the ratio's of lengths.

This means that every length is multiplied by a fixed number when it is projected... This function does that calculation for you..

Definition at line 764 of file kigtransform.cpp.

const Coordinate Transformation::apply0 ( const Coordinate &  c) const

Definition at line 653 of file kigtransform.cpp.

const Coordinate Transformation::apply2by2only ( const Coordinate &  c) const

Definition at line 723 of file kigtransform.cpp.

const Transformation Transformation::castShadow ( const Coordinate &  ls,
const LineData &  d 
)
static

Cast Shadow.

Returns a Transformation that transforms points in such a way that it appears to cast a shadow, given a certain light source, and a line indicating a plane.

Definition at line 550 of file kigtransform.cpp.

double Transformation::data ( int  r,
int  c 
) const

Definition at line 732 of file kigtransform.cpp.

double Transformation::getAffineDeterminant ( ) const

Definition at line 711 of file kigtransform.cpp.

double Transformation::getProjectiveIndicator ( const Coordinate &  c) const

Definition at line 703 of file kigtransform.cpp.

double Transformation::getRotationAngle ( ) const

Definition at line 718 of file kigtransform.cpp.

const Transformation Transformation::harmonicHomology ( const Coordinate &  center,
const LineData &  axis 
)
static

Harmonic Homology.

Returns a Transformation that transforms points in such a way that it appears to cast a shadow, given a certain light source (center), and a line (axis) indicating a plane.

Definition at line 344 of file kigtransform.cpp.

const Transformation Transformation::identity ( )
static

Identity.

Returns the Identity Transformation, i.e. a Transformation that doesn't do anything.

Definition at line 250 of file kigtransform.cpp.

const Transformation Transformation::inverse ( bool &  valid) const

The inverse Transformation.

Returns the inverse Transformation of this Transformation.

Definition at line 737 of file kigtransform.cpp.

bool Transformation::isAffine ( ) const

Definition at line 686 of file kigtransform.cpp.

bool Transformation::isHomothetic ( ) const

Returns whether this is a homothetic (affine) transformation.

Definition at line 681 of file kigtransform.cpp.

const Transformation Transformation::lineReflection ( const LineData &  l)
static

Line Reflection.

Returns a reflection over a line

Note
This equals scaling( -1, l );

Definition at line 316 of file kigtransform.cpp.

const Transformation Transformation::pointReflection ( const Coordinate &  c)
static

Point Reflection.

Returns a reflection over a point

Note
This equals scaling( -1, c );

Definition at line 285 of file kigtransform.cpp.

const Transformation Transformation::projectiveRotation ( double  alpha,
const Coordinate &  d,
const Coordinate &  t 
)
static

Projective Rotation.

This is really only a test example of a projective non-affine transformation...

Definition at line 591 of file kigtransform.cpp.

const Transformation Transformation::projectivityGI4P ( const std::vector< Coordinate > &  FromPoints,
const std::vector< Coordinate > &  ToPoints,
bool &  valid 
)
static

Projectivity given the image of 4 points.

Returns the unique projectivity that transforms 4 given points into 4 given points.

Definition at line 482 of file kigtransform.cpp.

const Transformation Transformation::rotation ( double  angle,
const Coordinate &  center = Coordinate() 
)
static

Rotation.

Returns a Rotation by a certain angle, around a certain center.

Definition at line 658 of file kigtransform.cpp.

const Transformation Transformation::scalingOverLine ( double  factor,
const LineData &  l 
)
static

Scaling over Line.

Returns a Transformation that scales points by a certain factor with relation to a line. Note: This is not a homothetic transformation.

Definition at line 324 of file kigtransform.cpp.

const Transformation Transformation::scalingOverPoint ( double  factor,
const Coordinate &  center = Coordinate() 
)
static

Scaling over Point.

Returns a Transformation that scales points by a certain factor with relation to a center point.

Definition at line 260 of file kigtransform.cpp.

const Transformation Transformation::similitude ( const Coordinate &  center,
double  theta,
double  factor 
)
static

Similitude.

Sequence of a rotation and a scaling with relation to a certain center.

Definition at line 794 of file kigtransform.cpp.

const Transformation Transformation::translation ( const Coordinate &  c)
static

Translation.

Returns a Translation by a vector c.

Definition at line 273 of file kigtransform.cpp.

Friends And Related Function Documentation

const Transformation operator* ( const Transformation &  a,
const Transformation &  b 
)
friend

Sequence.

This creates a Transformation that executes first transformation b, and then a.

Definition at line 292 of file kigtransform.cpp.

bool operator== ( const Transformation &  lhs,
const Transformation &  rhs 
)
friend

Equality.

Tests two Transformation's for equality.

Definition at line 785 of file kigtransform.cpp.


The documentation for this class was generated from the following files:
  • kigtransform.h
  • kigtransform.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal