hugin_base/hugin_math/hugin_math.h File Reference
#include <hugin_shared.h>
#include <cmath>
#include <math.h>
#include <iostream>
#include <vigra/diff2d.hxx>
Include dependency graph for hugin_math.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
|
Namespaces |
| namespace | hugin_utils |
Classes |
| struct | hugin_utils::TDiff2D< T > |
Defines |
| #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 > | FDiff2D |
Functions |
| double | log2 (double x) |
| double | round (double x) |
| float | roundf (float x) |
| int | ceili (double x) |
| int | floori (double x) |
| template<class T> |
| int | roundi (T x) |
| int | isnan (double x) |
| template<class T> |
| T | 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.
|
| template<class T> |
| T | sqr (T t) |
| template<class T> |
| double | norm (T t) |
| template<class InputIterator1, class InputIterator2> |
| double | euclid_dist (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) |
| | calculate squared Euclidean distance between two vectors.
|
| template<class InputIterator1, class InputIterator2, class T> |
| T | sqr_dist (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T res) |
| | calculate squared Euclidean distance between two vectors.
|
| template<class POINT> |
| vigra::Rect2D | calcCircleROIFromPoints (const POINT &p1, const POINT &p2) |
| | calculate the bounding box of a circle that goes through both points.
|
| 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..
|
Define Documentation
| #define DEG_TO_RAD |
( |
x |
|
) |
( (x) * 2.0 * PI / 360.0 ) |
|
| #define M_PI 3.14159265358979323846 |
|
| #define PI 3.14159265358979323846 |
|
| #define RAD_TO_DEG |
( |
x |
|
) |
( (x) * 360.0 / ( 2.0 * PI ) ) |
|
Typedef Documentation
Function Documentation
|
template<class POINT> |
| vigra::Rect2D calcCircleROIFromPoints |
( |
const POINT & |
p1, |
|
|
const POINT & |
p2 |
|
) |
|
|
|
|
calculate the bounding box of a circle that goes through both points.
the center of the circle is halfway between the two points |
| int ceili |
( |
double |
x |
) |
[inline] |
|
|
template<class InputIterator1, class InputIterator2> |
| double euclid_dist |
( |
InputIterator1 |
first1, |
|
|
InputIterator1 |
last1, |
|
|
InputIterator2 |
first2 |
|
) |
|
|
|
|
calculate squared Euclidean distance between two vectors.
|
| int floori |
( |
double |
x |
) |
[inline] |
|
| int isnan |
( |
double |
x |
) |
[inline] |
|
|
template<class T> |
| double norm |
( |
T |
t |
) |
|
|
| vigra::Rect2D operator * |
( |
const vigra::Rect2D & |
r, |
|
|
double |
scale |
|
) |
[inline] |
|
|
|
uses floor for left and top and ceil for right and bottom -> extend image when rounding..
|
| vigra::Diff2D operator * |
( |
const vigra::Diff2D & |
d, |
|
|
double |
scale |
|
) |
[inline] |
|
|
template<class T> |
| std::ostream& operator<< |
( |
std::ostream & |
o, |
|
|
const hugin_utils::TDiff2D< T > & |
d |
|
) |
[inline] |
|
| float hugin_utils::roundf |
( |
float |
x |
) |
[inline] |
|
|
template<class T> |
| int roundi |
( |
T |
x |
) |
[inline] |
|
|
template<class T> |
| T 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.
|
|
template<class T> |
| T sqr |
( |
T |
t |
) |
|
|
|
template<class InputIterator1, class InputIterator2, class T> |
| T sqr_dist |
( |
InputIterator1 |
first1, |
|
|
InputIterator1 |
last1, |
|
|
InputIterator2 |
first2, |
|
|
T |
res |
|
) |
|
|
|
|
calculate squared Euclidean distance between two vectors.
|