55 return a * (1-x) + b*x;
63 const Vec4 &lineStart,
65 Vec4 *nearestPoint=0);
76 Vec4 *nearestPoint=0);
105 double l =
::sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);
115 return a[0]*b[0] + a[1]*b[1]+ a[2]*b[2];
164 return a[0]*b[0] + a[1]*b[1]+ a[2]*b[2];
205 v1[2]*v2[0]-v1[0]*v2[2],
206 v1[0]*v2[1]-v1[1]*v2[0],
213 v1[2]*v2[0]-v1[0]*v2[2],
214 v1[0]*v2[1]-v1[1]*v2[0]);
ICLQt_API ImgQ sqrt(const ImgQ &image)
calls sqrt( each pixel)
ICLMath_API float dist_point_triangle(const Vec4 &p, const Vec4 &a, const Vec4 &b, const Vec4 &c, Vec4 *nearestPoint=0)
distance from point p to triangle (a - b - c)
ICLMath_API float dist_point_linesegment(const Vec4 &p, const Vec4 &lineStart, const Vec4 &lineEnd, Vec4 *nearestPoint=0)
distance from point p to line segment (lineStart -> lineEnd)
math::FixedColVector< T, 4 > normalize3(const math::FixedMatrix< T, 1, 4 > &v, const double &h=1)
normalize a vector to length 1
Definition: HomogeneousMath.h:104
FixedMatrixPart< T, ROWS, col_iterator > col(unsigned int idx)
returns a matrix col-reference iterator pair
Definition: FixedMatrix.h:781
float sqrnorm3(const Vec4 &a)
sqared norm for 4D homogeneous vectors (ignoring the homegeneous component)
Definition: HomogeneousMath.h:169
FixedMatrix< icl32f, 4, 4 > Mat4
typedef for 4x4 fixed matrices
Definition: HomogeneousMath.h:49
ICLMath_IMP FixedMatrix< T, 4, 4 > create_rot_4x4(T axisX, T axisY, T axisZ, T angle)
create 4D homogeneous matrix that rotates about given axis by given angle (defined for float and doub...
undocument this line if you encounter any issues!
Definition: Any.h:37
FixedMatrix< icl32f, 3, 3 > Mat3
typedef for 3x3 fixed matrices
Definition: HomogeneousMath.h:46
math::FixedColVector< T, 4 > cross(const math::FixedMatrix< T, 1, 4 > &v1, const math::FixedMatrix< T, 1, 4 > &v2)
homogeneous 3D cross-product
Definition: HomogeneousMath.h:203
#define ICLMath_API
Definition: CompatMacros.h:173
Vec4 rotate_vector(const Vec4 &axis, float angle, const Vec4 &vec)
rotates a vector around a given axis
Definition: HomogeneousMath.h:218
FixedColVector< icl32f, 4 > Vec4
another shortcut for 3D vectors
Definition: HomogeneousMath.h:43
float norm3(const Vec4 &a)
3D- euclidian norm for 4D homogeneous vectors (ignoring the homegeneous component)
Definition: HomogeneousMath.h:174
FixedMatrix< T, COLS, ROWS > normalized(T norm=2) const
create a normalized version of this matrix
Definition: FixedMatrix.h:850
Vec4 bilinear_interpolate(const Vec4 corners[4], float x, float y)
bilinear vector interpolation
Definition: HomogeneousMath.h:87
math::FixedColVector< T, 4 > homogenize(const math::FixedMatrix< T, 1, 4 > &v)
homogenize a vector by normalizing 4th component to 1
Definition: HomogeneousMath.h:186
float sprod3(const Vec3 &a, const Vec3 &b)
3D scalar (aka dot-) product for 4D homogeneous vectors (ignoring the homegeneous component)
Definition: HomogeneousMath.h:114
#define ICLASSERT_RETURN_VAL(X, VALUE)
Definition: Macros.h:148
double length(T norm=2) const
Calculates the length of the matrix data vector.
Definition: FixedMatrix.h:835
T linear_interpolate(const T &a, const T &b, float x)
linearly interpolates between a, b (x must be in range [0,1])
Definition: HomogeneousMath.h:54
math::FixedColVector< T, 4 > normalize(const math::FixedMatrix< T, 1, 4 > &v)
normalize a vector to length 1
Definition: HomogeneousMath.h:97
math::FixedColVector< T, 4 > project(math::FixedMatrix< T, 1, 4 > v, T z)
perform perspective projection
Definition: HomogeneousMath.h:192
axis
for flipping of images
Definition: Types.h:99
FixedMatrix< T, 3, 3 > gramSchmidtOrtho(FixedMatrix< T, 3, 3 > const &mat)
Definition: HomogeneousMath.h:119
FixedColVector< icl32f, 3 > Vec3
another shortcut for 3D vectors
Definition: HomogeneousMath.h:40
float dist3(const Vec4 &a, const Vec4 &b)
3d euclidian distance
Definition: HomogeneousMath.h:179