Point.h File Reference

Define functions to treat a FixedArray as a point or vector. More...

#include "../defs.h"
#include "../../ads/array/FixedArray.h"
#include "Point.ipp"
#include <cassert>
#include <cmath>

Go to the source code of this file.

Functions

template<int N, typename T >
computeDotProduct (const ads::FixedArray< N, T > &x, const ads::FixedArray< N, T > &y)
 Return the dot product of x and y.
template<typename T >
ads::FixedArray< 3, T > computeCrossProduct (const ads::FixedArray< 3, T > &x, const ads::FixedArray< 3, T > &y)
 Return the cross product of x and y.
template<typename T >
void computeCrossProduct (const ads::FixedArray< 3, T > &x, const ads::FixedArray< 3, T > &y, ads::FixedArray< 3, T > *result)
 Compute the cross product of x and y.
template<typename T >
computeTripleProduct (const ads::FixedArray< 3, T > &a, const ads::FixedArray< 3, T > &b, const ads::FixedArray< 3, T > &c)
 The scalar triple product of three vectors: $a \cdot b \times c$.
template<typename T >
computeDiscriminant (const ads::FixedArray< 2, T > &p, const ads::FixedArray< 2, T > &q)
 Return the discriminant of the vectors.
template<typename T >
void computeAnOrthogonalVector (const ads::FixedArray< 3, T > &vector, ads::FixedArray< 3, T > *orthogonal)
 Compute an orthogonal vector.
template<int N, typename T >
computeSquaredMagnitude (const ads::FixedArray< N, T > &x)
 Return the squared magnitude of this vector.
template<int N, typename T >
computeMagnitude (const ads::FixedArray< N, T > &x)
 Return the magnitude of this vector.
template<int N, typename T >
void normalize (ads::FixedArray< N, T > *x)
 Normalize this vector so it has unit length.
template<int N, typename T >
computeSquaredDistance (const ads::FixedArray< N, T > &p, const ads::FixedArray< N, T > &q)
 Return the squared distance between two points.
template<typename T >
int computeSignOfTurn (const ads::FixedArray< 2, T > &p, const ads::FixedArray< 2, T > &q, const ads::FixedArray< 2, T > &r)
 Positive turn: return 1. No turn: return 0. Negative turn: return -1.
template<typename T >
int computeApproximateSignOfTurn (const ads::FixedArray< 2, T > &p, const ads::FixedArray< 2, T > &q, const ads::FixedArray< 2, T > &r)
 Positive turn: return 1. No turn: return 0. Negative turn: return -1.
template<typename T >
computePseudoAngle (const ads::FixedArray< 2, T > &vec)
 Return the pseudo-angle between vec and the x axis.
template<int N, typename T >
computeAngle (const ads::FixedArray< N, T > &a, const ads::FixedArray< N, T > &b)
 Return the angle between the two vectors.
template<typename T >
void rotatePiOver2 (ads::FixedArray< 2, T > *p)
 Rotate the vector + pi / 2.
template<typename T >
void rotateMinusPiOver2 (ads::FixedArray< 2, T > &p)
 Rotate the vector - pi / 2.

Detailed Description

Define functions to treat a FixedArray as a point or vector.

Generated on Thu Jun 30 02:14:57 2016 for Computational Geometry Package by  doxygen 1.6.3