|
Hugintrunk
0.1
|
misc math function & classes used by other parts of the program More...
#include <hugin_shared.h>#include <cmath>#include <math.h>#include <iostream>#include <vigra/diff2d.hxx>

Go to the source code of this file.
Classes | |
| struct | hugin_utils::TDiff2D< T > |
Namespaces | |
| hugin_utils | |
| namespace for various utils | |
Macros | |
| #define | M_PI 3.14159265358979323846 |
| #define | PI 3.14159265358979323846 |
| #define | DEG_TO_RAD(x) ( (x) * 2.0 * PI / 360.0 ) |
| #define | RAD_TO_DEG(x) ( (x) * 360.0 / ( 2.0 * PI ) ) |
Typedefs | |
| typedef TDiff2D< double > | hugin_utils::FDiff2D |
Functions | |
| double | hugin_utils::round (double x) |
| float | hugin_utils::roundf (float x) |
| int | hugin_utils::ceili (double x) |
| int | hugin_utils::floori (double x) |
| template<class T > | |
| int | hugin_utils::roundi (T x) |
| template<class T > | |
| T | hugin_utils::simpleClipPoint (const T &point, const T &min, const T &max) |
| clip a point to fit int [min, max] does not do a mathematical clipping, just sets p.x and p.y to the borders if they are outside. More... | |
| template<class T > | |
| T | hugin_utils::sqr (T t) |
| template<class T > | |
| double | hugin_utils::norm (T t) |
| template<class InputIterator1 , class InputIterator2 > | |
| double | hugin_utils::euclid_dist (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
| calculate squared Euclidean distance between two vectors. More... | |
| template<class InputIterator1 , class InputIterator2 , class T > | |
| T | hugin_utils::sqr_dist (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T res) |
| calculate squared Euclidean distance between two vectors. More... | |
| template<class POINT > | |
| vigra::Rect2D | hugin_utils::calcCircleROIFromPoints (const POINT &p1, const POINT &p2) |
| calculate the bounding box of a circle that goes through both points. More... | |
| int | hugin_utils::gcd (int a, int b) |
| function to calculate greated common divisor using Euclidean algorithm both arguments should be >=0 More... | |
| template<class T > | |
| std::ostream & | operator<< (std::ostream &o, const hugin_utils::TDiff2D< T > &d) |
| hugin_utils::FDiff2D | operator/ (const hugin_utils::FDiff2D &lhs, double val) |
| vigra::Diff2D | operator* (const vigra::Diff2D &d, double scale) |
| vigra::Rect2D | operator* (const vigra::Rect2D &r, double scale) |
| uses floor for left and top and ceil for right and bottom -> extend image when rounding.. More... | |
misc math function & classes used by other parts of the program
This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU General Public License along with this software. If not, see http://www.gnu.org/licenses/.
$Id$
This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU General Public License along with this software. If not, see http://www.gnu.org/licenses/.
Definition in file hugin_math.h.
| #define DEG_TO_RAD | ( | x | ) | ( (x) * 2.0 * PI / 360.0 ) |
Definition at line 44 of file hugin_math.h.
Referenced by HuginLines::_getFilteredLines(), HuginBase::StraightenPanorama::calcStraighteningRotation(), HuginLines::FilterLines(), GetImageRotatedTo(), DragTool::getTranslationShift(), HuginBase::Nona::SpaceTransform::Init(), HuginBase::Nona::SpaceTransform::InitInv(), PanosphereOverviewToolHelper::MouseMoved(), PlaneOverviewToolHelper::MouseMoved(), PlaneOverviewCameraTool::MouseMoveEvent(), PreviewPanel::mousePressLMBEvent(), PreviewPanel::mousePressRMBEvent(), DragTool::ParamStore::Move(), PointFineTuneProjectionAware(), GLPanosphereOverviewRenderer::Resize(), HuginBase::RotatePanorama::rotatePano(), HuginBase::RotatePanorama::RotatePanorama(), and DragTool::SetRotationMatrix().
| #define M_PI 3.14159265358979323846 |
Definition at line 37 of file hugin_math.h.
| #define PI 3.14159265358979323846 |
Definition at line 41 of file hugin_math.h.
| #define RAD_TO_DEG | ( | x | ) | ( (x) * 360.0 / ( 2.0 * PI ) ) |
Definition at line 45 of file hugin_math.h.
Referenced by GetImageRotatedTo(), PreviewPanel::mousePressLMBEvent(), PreviewPanel::mousePressRMBEvent(), DragTool::ParamStore::Move(), vigra_ext::PointFineTuneRotSearch(), and HuginBase::RotatePanorama::rotatePano().
|
inline |
Definition at line 261 of file hugin_math.h.
|
inline |
uses floor for left and top and ceil for right and bottom -> extend image when rounding..
Definition at line 268 of file hugin_math.h.
|
inline |
Definition at line 255 of file hugin_math.h.
References hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
|
inline |
Definition at line 250 of file hugin_math.h.
1.8.5