BALL  1.4.1
Functions
Analytical Geometry

Functions

template<typename T >
BALL_INLINEBALL::getDeterminant_ (const T *m, Size dim)
template<typename T >
BALL::getDeterminant (const T *m, Size dim)
template<typename T >
BALL_INLINEBALL::getDeterminant2 (const T *m)
template<typename T >
BALL_INLINEBALL::getDeterminant2 (const T &m00, const T &m01, const T &m10, const T &m11)
template<typename T >
BALL_INLINEBALL::getDeterminant3 (const T *m)
template<typename T >
BALL_INLINEBALL::getDeterminant3 (const T &m00, const T &m01, const T &m02, const T &m10, const T &m11, const T &m12, const T &m20, const T &m21, const T &m22)
template<typename T >
bool BALL::SolveSystem (const T *m, T *x, const Size dim)
template<typename T >
BALL_INLINE bool BALL::SolveSystem2 (const T &a1, const T &b1, const T &c1, const T &a2, const T &b2, const T &c2, T &x1, T &x2)
template<typename T >
short BALL::SolveQuadraticEquation (const T &a, const T &b, const T &c, T &x1, T &x2)
template<typename T >
BALL_INLINE TVector3< T > BALL::GetPartition (const TVector3< T > &a, const TVector3< T > &b)
template<typename T >
BALL_INLINE TVector3< T > BALL::GetPartition (const TVector3< T > &a, const TVector3< T > &b, const T &r, const T &s)
template<typename T >
BALL_INLINEBALL::GetDistance (const TVector3< T > &a, const TVector3< T > &b)
template<typename T >
BALL_INLINEBALL::GetDistance (const TLine3< T > &line, const TVector3< T > &point)
template<typename T >
BALL_INLINEBALL::GetDistance (const TVector3< T > &point, const TLine3< T > &line)
template<typename T >
BALL::GetDistance (const TLine3< T > &a, const TLine3< T > &b)
template<typename T >
BALL_INLINEBALL::GetDistance (const TVector3< T > &point, const TPlane3< T > &plane)
template<typename T >
BALL_INLINEBALL::GetDistance (const TPlane3< T > &plane, const TVector3< T > &point)
template<typename T >
BALL_INLINEBALL::GetDistance (const TLine3< T > &line, const TPlane3< T > &plane)
template<typename T >
BALL_INLINEBALL::GetDistance (const TPlane3< T > &plane, const TLine3< T > &line)
template<typename T >
BALL_INLINEBALL::GetDistance (const TPlane3< T > &a, const TPlane3< T > &b)
template<typename T >
BALL_INLINE bool BALL::GetAngle (const TVector3< T > &a, const TVector3< T > &b, TAngle< T > &intersection_angle)
template<typename T >
BALL_INLINE bool BALL::GetAngle (const TLine3< T > &a, const TLine3< T > &b, TAngle< T > &intersection_angle)
template<typename T >
BALL_INLINE bool BALL::GetAngle (const TPlane3< T > &plane, const TVector3< T > &vector, TAngle< T > &intersection_angle)
template<typename T >
BALL_INLINE bool BALL::GetAngle (const TVector3< T > &vector, const TPlane3< T > &plane, TAngle< T > &intersection_angle)
template<typename T >
BALL_INLINE bool BALL::GetAngle (const TPlane3< T > &plane, const TLine3< T > &line, TAngle< T > &intersection_angle)
template<typename T >
BALL_INLINE bool BALL::GetAngle (const TLine3< T > &line, const TPlane3< T > &plane, TAngle< T > &intersection_angle)
template<typename T >
BALL_INLINE bool BALL::GetAngle (const TPlane3< T > &a, const TPlane3< T > &b, TAngle< T > &intersection_angle)
template<typename T >
bool BALL::GetIntersection (const TLine3< T > &a, const TLine3< T > &b, TVector3< T > &point)
template<typename T >
BALL_INLINE bool BALL::GetIntersection (const TPlane3< T > &plane, const TLine3< T > &line, TVector3< T > &intersection_point)
template<typename T >
BALL_INLINE bool BALL::GetIntersection (const TLine3< T > &line, const TPlane3< T > &plane, TVector3< T > &intersection_point)
template<typename T >
bool BALL::GetIntersection (const TPlane3< T > &plane1, const TPlane3< T > &plane2, TLine3< T > &line)
template<typename T >
bool BALL::GetIntersection (const TSphere3< T > &sphere, const TLine3< T > &line, TVector3< T > &intersection_point1, TVector3< T > &intersection_point2)
template<typename T >
BALL_INLINE bool BALL::GetIntersection (const TLine3< T > &line, const TSphere3< T > &sphere, TVector3< T > &intersection_point1, TVector3< T > &intersection_point2)
template<typename T >
bool BALL::GetIntersection (const TSphere3< T > &sphere, const TPlane3< T > &plane, TCircle3< T > &intersection_circle)
template<typename T >
BALL_INLINE bool BALL::GetIntersection (const TPlane3< T > &plane, const TSphere3< T > &sphere, TCircle3< T > &intersection_circle)
template<typename T >
bool BALL::GetIntersection (const TSphere3< T > &a, const TSphere3< T > &b, TCircle3< T > &intersection_circle)
template<class T >
bool BALL::GetIntersection (const TSphere3< T > &s1, const TSphere3< T > &s2, const TSphere3< T > &s3, TVector3< T > &p1, TVector3< T > &p2, bool test=true)
template<typename T >
BALL_INLINE bool BALL::isCollinear (const TVector3< T > &a, const TVector3< T > &b)
template<typename T >
BALL_INLINE bool BALL::isComplanar (const TVector3< T > &a, const TVector3< T > &b, const TVector3< T > &c)
template<typename T >
BALL_INLINE bool BALL::isComplanar (const TVector3< T > &a, const TVector3< T > &b, const TVector3< T > &c, const TVector3< T > &d)
template<typename T >
BALL_INLINE bool BALL::isOrthogonal (const TVector3< T > &a, const TVector3< T > &b)
template<typename T >
BALL_INLINE bool BALL::isOrthogonal (const TVector3< T > &vector, const TLine3< T > &line)
template<typename T >
BALL_INLINE bool BALL::isOrthogonal (const TLine3< T > &line, const TVector3< T > &vector)
template<typename T >
BALL_INLINE bool BALL::isOrthogonal (const TLine3< T > &a, const TLine3< T > &b)
template<typename T >
BALL_INLINE bool BALL::isOrthogonal (const TVector3< T > &vector, const TPlane3< T > &plane)
template<typename T >
BALL_INLINE bool BALL::isOrthogonal (const TPlane3< T > &plane, const TVector3< T > &vector)
template<typename T >
BALL_INLINE bool BALL::isOrthogonal (const TPlane3< T > &a, const TPlane3< T > &b)
template<typename T >
BALL_INLINE bool BALL::isIntersecting (const TVector3< T > &point, const TLine3< T > &line)
template<typename T >
BALL_INLINE bool BALL::isIntersecting (const TLine3< T > &line, const TVector3< T > &point)
template<typename T >
BALL_INLINE bool BALL::isIntersecting (const TLine3< T > &a, const TLine3< T > &b)
template<typename T >
BALL_INLINE bool BALL::isIntersecting (const TVector3< T > &point, const TPlane3< T > &plane)
template<typename T >
BALL_INLINE bool BALL::isIntersecting (const TPlane3< T > &plane, const TVector3< T > &point)
template<typename T >
BALL_INLINE bool BALL::isIntersecting (const TLine3< T > &line, const TPlane3< T > &plane)
template<typename T >
BALL_INLINE bool BALL::isIntersecting (const TPlane3< T > &plane, const TLine3< T > &line)
template<typename T >
BALL_INLINE bool BALL::isIntersecting (const TPlane3< T > &a, const TPlane3< T > &b)
template<typename T >
BALL_INLINE bool BALL::isParallel (const TLine3< T > &line, const TPlane3< T > &plane)
template<typename T >
BALL_INLINE bool BALL::isParallel (const TPlane3< T > &plane, const TLine3< T > &line)
template<typename T >
BALL_INLINE bool BALL::isParallel (const TPlane3< T > &a, const TPlane3< T > &b)
template<typename T >
TAngle< T > BALL::getOrientedAngle (const T &ax, const T &ay, const T &az, const T &bx, const T &by, const T &bz, const T &nx, const T &ny, const T &nz)
template<typename T >
BALL_INLINE TAngle< T > BALL::getOrientedAngle (const TVector3< T > &a, const TVector3< T > &b, const TVector3< T > &normal)
template<typename T >
TAngle< T > BALL::getTorsionAngle (const T &ax, const T &ay, const T &az, const T &bx, const T &by, const T &bz, const T &cx, const T &cy, const T &cz, const T &dx, const T &dy, const T &dz)

Detailed Description

representation of analytical geometry functions, using the classes: TAngle, TCircle3, TLine3, TPlane3, TSphere3, TVector3.


Function Documentation

template<typename T >
BALL_INLINE bool BALL::GetAngle ( const TVector3< T > &  a,
const TVector3< T > &  b,
TAngle< T > &  intersection_angle 
)

Get the angle between two Vector3.

Parameters:
athe first vector
bthe second vector
intersection_anglethe resulting angle
Returns:
bool, always true

Definition at line 551 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::GetAngle ( const TLine3< T > &  a,
const TLine3< T > &  b,
TAngle< T > &  intersection_angle 
)

Get the angle between two lines.

Parameters:
athe first line
bthe second line
intersection_anglethe resulting angle
Returns:
bool, true if an angle can be calculated, otherwise false

Definition at line 570 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::GetAngle ( const TPlane3< T > &  plane,
const TVector3< T > &  vector,
TAngle< T > &  intersection_angle 
)

Get the angle between a plane and a Vector3.

Parameters:
planethe plane
vectorthe Vector3
intersection_anglethe resulting angle
Returns:
bool, true if an angle can be calculated, otherwise false

Definition at line 590 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::GetAngle ( const TVector3< T > &  vector,
const TPlane3< T > &  plane,
TAngle< T > &  intersection_angle 
)

Get the angle between a vector3 and a plane.

Parameters:
vectorthe vector3
planethe plane
intersection_anglethe resulting angle
Returns:
bool, true if an angle can be calculated, otherwise false

Definition at line 613 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::GetAngle ( const TPlane3< T > &  plane,
const TLine3< T > &  line,
TAngle< T > &  intersection_angle 
)

Get the angle between a plane and a line.

Parameters:
planethe plane
linethe line
intersection_anglethe resulting angle
Returns:
bool, true if an angle can be calculated, otherwise false

Definition at line 626 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::GetAngle ( const TLine3< T > &  line,
const TPlane3< T > &  plane,
TAngle< T > &  intersection_angle 
)

Get the angle between a line and a plane.

Parameters:
linethe line
planethe plane
intersection_anglethe resulting angle
Returns:
bool, true if an angle can be calculated, otherwise false

Definition at line 647 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::GetAngle ( const TPlane3< T > &  a,
const TPlane3< T > &  b,
TAngle< T > &  intersection_angle 
)

Get the angle between two planes.

Parameters:
athe first plane
bthe second plane
intersection_anglethe resulting angle
Returns:
bool, true if an angle can be calculated, otherwise false

Definition at line 661 of file analyticalGeometry.h.

template<typename T >
T BALL::getDeterminant ( const T *  m,
Size  dim 
)

Get the determinant of any matrix.

Parameters:
mpointer to matrix
dimdimension of the matrix

Definition at line 93 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE T BALL::getDeterminant2 ( const T *  m)

Get the determinant of an 2x2 matrix.

Parameters:
mpointer to matrix

Definition at line 119 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE T BALL::getDeterminant2 ( const T &  m00,
const T &  m01,
const T &  m10,
const T &  m11 
)

Get the determinant of an 2x2 matrix.

Parameters:
m00first value of the matrix
m01second value of the matrix
m10third value of the matrix
m11fourth value of the matrix

Definition at line 133 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE T BALL::getDeterminant3 ( const T *  m)

Get the determinant of an 3x3 matrix.

Parameters:
mpointer to matrix

Definition at line 143 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE T BALL::getDeterminant3 ( const T &  m00,
const T &  m01,
const T &  m02,
const T &  m10,
const T &  m11,
const T &  m12,
const T &  m20,
const T &  m21,
const T &  m22 
)

Get the determinant of an 3x3 matrix.

Parameters:
m00,m01,m02,m10,m11,m12,m20,m21,m22the elements of the matrix

Definition at line 159 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE T BALL::getDeterminant_ ( const T *  m,
Size  dim 
)

Subroutine to get the determinant of any matrix. Direct usage of this function should be avoided. Instead use T getDeterminant(const T* m, Size dim)

Parameters:
mpointer to matrix
dimdimension of the matrix

Definition at line 57 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE T BALL::GetDistance ( const TVector3< T > &  a,
const TVector3< T > &  b 
)

Get the distance between two points.

Parameters:
athe first point
bthe second point
Returns:
T the distance

Definition at line 387 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE T BALL::GetDistance ( const TLine3< T > &  line,
const TVector3< T > &  point 
)

Get the distance between a line and a point.

Parameters:
linethe line
pointthe point
Returns:
T the distance
Exceptions:
Exception::DivisionByZeroif the line has length 0

Definition at line 404 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE T BALL::GetDistance ( const TVector3< T > &  point,
const TLine3< T > &  line 
)

Get the distance between a point and a line.

Parameters:
pointthe point
linethe line
Returns:
T the distance
Exceptions:
Exception::DivisionByZeroif the line has length 0

Definition at line 421 of file analyticalGeometry.h.

template<typename T >
T BALL::GetDistance ( const TLine3< T > &  a,
const TLine3< T > &  b 
)

Get the distance between two lines.

Parameters:
athe first line
bthe second line
Returns:
T the distance
Exceptions:
Exception::DivisionByZeroif the lines are parallel and a has length 0

Definition at line 433 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE T BALL::GetDistance ( const TVector3< T > &  point,
const TPlane3< T > &  plane 
)

Get the distance between a point and a plane.

Parameters:
pointthe point
planethe plane
Returns:
T the distance
Exceptions:
Exception::DivisionByZeroif the normal vector of plane has zero length

Definition at line 470 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE T BALL::GetDistance ( const TPlane3< T > &  plane,
const TVector3< T > &  point 
)

Get the distance between a plane and a point.

Parameters:
planethe plane
pointthe point
Returns:
T the distance
Exceptions:
Exception::DivisionByZeroif the normal vector of plane has zero length

Definition at line 489 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE T BALL::GetDistance ( const TLine3< T > &  line,
const TPlane3< T > &  plane 
)

Get the distance between a line and a plane.

Parameters:
linethe line
planethe plane
Returns:
T the distance
Exceptions:
Exception::DivisionByZeroif the normal vector of plane has zero length

Definition at line 502 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE T BALL::GetDistance ( const TPlane3< T > &  plane,
const TLine3< T > &  line 
)

Get the distance between a plane and a line.

Parameters:
planethe plane
linethe line
Returns:
T the distance
Exceptions:
Exception::DivisionByZeroif the normal vector of plane has zero length

Definition at line 520 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE T BALL::GetDistance ( const TPlane3< T > &  a,
const TPlane3< T > &  b 
)

Get the distance between two planes.

Parameters:
athe first plane
bthe second plane
Returns:
T the distance
Exceptions:
Exception::DivisionByZeroif the normal vector of a has zero length

Definition at line 533 of file analyticalGeometry.h.

template<typename T >
bool BALL::GetIntersection ( const TLine3< T > &  a,
const TLine3< T > &  b,
TVector3< T > &  point 
)

Get the intersection point between two lines.

Parameters:
athe first line
bthe second line
pointthe resulting intersection
Returns:
bool, true if an intersection can be calculated, otherwise false

Definition at line 681 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::GetIntersection ( const TPlane3< T > &  plane,
const TLine3< T > &  line,
TVector3< T > &  intersection_point 
)

Get the intersection point between a plane and a line.

Parameters:
planethe plane
linethe line
intersection_pointthe resulting intersection
Returns:
bool, true if an intersection can be calculated, otherwise false

Definition at line 701 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::GetIntersection ( const TLine3< T > &  line,
const TPlane3< T > &  plane,
TVector3< T > &  intersection_point 
)

Get the intersection point between a line and a plane.

Parameters:
linethe line
planethe plane
intersection_pointthe resulting intersection
Returns:
bool, true if an intersection can be calculated, otherwise false

Definition at line 720 of file analyticalGeometry.h.

template<typename T >
bool BALL::GetIntersection ( const TPlane3< T > &  plane1,
const TPlane3< T > &  plane2,
TLine3< T > &  line 
)

Get the intersection line between two planes.

Parameters:
plane1the first plane
plane2the second plane
linethe resulting intersection
Returns:
bool, true if an intersection can be calculated, otherwise false

Definition at line 732 of file analyticalGeometry.h.

template<typename T >
bool BALL::GetIntersection ( const TSphere3< T > &  sphere,
const TLine3< T > &  line,
TVector3< T > &  intersection_point1,
TVector3< T > &  intersection_point2 
)

Get the intersection point between a sphere and a line.

Parameters:
spherethe sphere
linethe line
intersection_point1the first intersection point
intersection_point2the second intersection point
Returns:
bool, true if an intersection can be calculated, otherwise false

Definition at line 799 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::GetIntersection ( const TLine3< T > &  line,
const TSphere3< T > &  sphere,
TVector3< T > &  intersection_point1,
TVector3< T > &  intersection_point2 
)

Get the intersection point between a line and a sphere.

Parameters:
linethe line
spherethe sphere
intersection_point1the first intersection point
intersection_point2the second intersection point
Returns:
bool, true if an intersection can be calculated, otherwise false

Definition at line 824 of file analyticalGeometry.h.

template<typename T >
bool BALL::GetIntersection ( const TSphere3< T > &  sphere,
const TPlane3< T > &  plane,
TCircle3< T > &  intersection_circle 
)

Get the intersection circle between a sphere and a plane.

Parameters:
spherethe sphere
planethe plane
intersection_circlethe intersection circle
Returns:
bool, true if an intersection can be calculated, otherwise false

Definition at line 836 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::GetIntersection ( const TPlane3< T > &  plane,
const TSphere3< T > &  sphere,
TCircle3< T > &  intersection_circle 
)

Get the intersection circle between a plane and a sphere.

Parameters:
planethe plane
spherethe sphere
intersection_circlethe intersection circle
Returns:
bool, true if an intersection can be calculated, otherwise false

Definition at line 870 of file analyticalGeometry.h.

template<typename T >
bool BALL::GetIntersection ( const TSphere3< T > &  a,
const TSphere3< T > &  b,
TCircle3< T > &  intersection_circle 
)

Get the intersection circle between two spheres. This methods returns false, if the two spheres are identical, since then no intersection circle exists.

Parameters:
athe first sphere
bthe second sphere
intersection_circlethe intersection circle
Returns:
bool, true if an intersection can be calculated, otherwise false

Definition at line 884 of file analyticalGeometry.h.

template<class T >
bool BALL::GetIntersection ( const TSphere3< T > &  s1,
const TSphere3< T > &  s2,
const TSphere3< T > &  s3,
TVector3< T > &  p1,
TVector3< T > &  p2,
bool  test = true 
)

Get the intersection points between three spheres.

Parameters:
s1the first sphere
s2the second sphere
s3the third sphere
p1the first intersection point
p2the second intersection point
test
Returns:
bool, true if an intersection can be calculated, otherwise false

Definition at line 929 of file analyticalGeometry.h.

template<typename T >
TAngle<T> BALL::getOrientedAngle ( const T &  ax,
const T &  ay,
const T &  az,
const T &  bx,
const T &  by,
const T &  bz,
const T &  nx,
const T &  ny,
const T &  nz 
)

Return the oriented angle of two vectors with a normal vector.

Exceptions:
Exception::DivisionByZeroif at least one vector is zero

Definition at line 1259 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE TAngle<T> BALL::getOrientedAngle ( const TVector3< T > &  a,
const TVector3< T > &  b,
const TVector3< T > &  normal 
)

Return the oriented angle of two vectors with a normal vector.

Exceptions:
Exception::DivisionByZeroif at least one vector is zero

Definition at line 1300 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE TVector3<T> BALL::GetPartition ( const TVector3< T > &  a,
const TVector3< T > &  b 
)

Get the partition of two vectors.

Parameters:
athe first vector
bthe second vector
Returns:
TVector3 the partition

Definition at line 351 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE TVector3<T> BALL::GetPartition ( const TVector3< T > &  a,
const TVector3< T > &  b,
const T &  r,
const T &  s 
)

Get the partition of two vectors, calculated with two ratio factors.

Parameters:
athe first vector
bthe second vector
rthe ratio factor of the first vector
sthe ratio factor of the second vector
Returns:
TVector3 the partition
Exceptions:
Exception::DivisionByZeroif r+s == 0

Definition at line 367 of file analyticalGeometry.h.

template<typename T >
TAngle<T> BALL::getTorsionAngle ( const T &  ax,
const T &  ay,
const T &  az,
const T &  bx,
const T &  by,
const T &  bz,
const T &  cx,
const T &  cy,
const T &  cz,
const T &  dx,
const T &  dy,
const T &  dz 
)

Return the torsion angle of four points to each other.

Parameters:
ax1. vector x component
ay1. vector y component
az1. vector z component
bx2. vector x component
by2. vector y component
bz2. vector z component
cx3. vector x component
cy3. vector y component
cz3. vector z component
dx4. vector x component
dy4. vector y component
dz4. vector z component
Returns:
TAngle the torsion angle
Exceptions:
Exception::DivisionByZeroif one of the outer vectors is collinear with the middle one

Definition at line 1323 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isCollinear ( const TVector3< T > &  a,
const TVector3< T > &  b 
)

Test whether two vector3 are collinear

Parameters:
athe first vector3
bthe second vector3
Returns:
bool, true or false

Definition at line 1006 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isComplanar ( const TVector3< T > &  a,
const TVector3< T > &  b,
const TVector3< T > &  c 
)

Test whether three vector3 are complanar

Parameters:
athe first vector3
bthe second vector3
cthe third vector3
Returns:
bool, true or false

Definition at line 1019 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isComplanar ( const TVector3< T > &  a,
const TVector3< T > &  b,
const TVector3< T > &  c,
const TVector3< T > &  d 
)

Test whether four vector3 are complanar

Parameters:
athe first vector3
bthe second vector3
cthe third vector3
dthe fourth vector3
Returns:
bool, true or false

Definition at line 1033 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isIntersecting ( const TVector3< T > &  point,
const TLine3< T > &  line 
)

Test whether a line is intersecting a point.

Parameters:
pointthe point
linethe line
Returns:
bool, true or false

Definition at line 1129 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isIntersecting ( const TLine3< T > &  line,
const TVector3< T > &  point 
)

Test whether a line is intersecting a point.

Parameters:
linethe line
pointthe point
Returns:
bool, true or false

Definition at line 1141 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isIntersecting ( const TLine3< T > &  a,
const TLine3< T > &  b 
)

Test whether two lines are intersecting.

Parameters:
athe first line
bthe second line
Returns:
bool, true or false

Definition at line 1153 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isIntersecting ( const TVector3< T > &  point,
const TPlane3< T > &  plane 
)

Test whether a point lies in a plane.

Parameters:
pointthe point
planethe plane
Returns:
bool, true or false

Definition at line 1165 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isIntersecting ( const TPlane3< T > &  plane,
const TVector3< T > &  point 
)

Test whether a point lies in a plane.

Parameters:
planethe plane
pointthe point
Returns:
bool, true or false

Definition at line 1177 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isIntersecting ( const TLine3< T > &  line,
const TPlane3< T > &  plane 
)

Test whether a line is intersecting a plane.

Parameters:
linethe line
planethe plane
Returns:
bool, true or false

Definition at line 1189 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isIntersecting ( const TPlane3< T > &  plane,
const TLine3< T > &  line 
)

Test whether a plane is intersecting a line.

Parameters:
planethe plane
linethe line
Returns:
bool, true or false

Definition at line 1201 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isIntersecting ( const TPlane3< T > &  a,
const TPlane3< T > &  b 
)

Test whether two planes are intersecting.

Parameters:
athe first plane
bthe second plane
Returns:
bool, true or false

Definition at line 1213 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isOrthogonal ( const TVector3< T > &  a,
const TVector3< T > &  b 
)

Test whether two vector3 are orthogonal

Parameters:
athe first vector3
bthe second vector3
Returns:
bool, true or false

Definition at line 1045 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isOrthogonal ( const TVector3< T > &  vector,
const TLine3< T > &  line 
)

Test whether a vector3 and a line are orthogonal

Parameters:
vectorthe vector
linethe line
Returns:
bool, true or false

Definition at line 1057 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isOrthogonal ( const TLine3< T > &  line,
const TVector3< T > &  vector 
)

Test whether a line and a vector3 are orthogonal

Parameters:
linethe line
vectorthe vector
Returns:
bool, true or false

Definition at line 1069 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isOrthogonal ( const TLine3< T > &  a,
const TLine3< T > &  b 
)

Test whether two lines are orthogonal.

Parameters:
athe first line
bthe second line
Returns:
bool, true or false

Definition at line 1081 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isOrthogonal ( const TVector3< T > &  vector,
const TPlane3< T > &  plane 
)

Test whether a vector3 and a plane are orthogonal.

Parameters:
vectorthe vector3
planethe plane
Returns:
bool, true or false

Definition at line 1093 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isOrthogonal ( const TPlane3< T > &  plane,
const TVector3< T > &  vector 
)

Test whether a plane and a vector3 are orthogonal.

Parameters:
planethe plane
vectorthe vector3
Returns:
bool, true or false

Definition at line 1105 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isOrthogonal ( const TPlane3< T > &  a,
const TPlane3< T > &  b 
)

Test whether two planes are orthogonal.

Parameters:
athe first plane
bthe second plane
Returns:
bool, true or false

Definition at line 1117 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isParallel ( const TLine3< T > &  line,
const TPlane3< T > &  plane 
)

Test whether a line and a plane are parallel.

Parameters:
linethe line
planethe plane
Returns:
bool, true or false

Definition at line 1225 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isParallel ( const TPlane3< T > &  plane,
const TLine3< T > &  line 
)

Test whether a plane and a line are parallel.

Parameters:
planethe plane
linethe line
Returns:
bool, true or false

Definition at line 1237 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::isParallel ( const TPlane3< T > &  a,
const TPlane3< T > &  b 
)

Test whether two planes are parallel.

Parameters:
athe first plane
bthe second plane
Returns:
bool, true or false

Definition at line 1249 of file analyticalGeometry.h.

template<typename T >
short BALL::SolveQuadraticEquation ( const T &  a,
const T &  b,
const T &  c,
T &  x1,
T &  x2 
)

Solve a quadratic equation of the form a $x^2 + b x + c = 0$.

Parameters:
a
b
c
x1the first solution
x2the second solution
Returns:
short the number of solutions (0 - 2)

Definition at line 310 of file analyticalGeometry.h.

template<typename T >
bool BALL::SolveSystem ( const T *  m,
T *  x,
const Size  dim 
)

Solve a system of linear equations. Given a system of linear equations

$ \begin{array}{ccccccccc} a_{1,1} x_1 & + & a_{1,2} x_2 & + & \ldots & + & a_{1,n} x_n & = & a_{1,(n+1)} \\ a_{2,1} x_1 & + & a_{2,2} x_2 & + & \ldots & + & a_{2,n} x_n & = & a_{2,(n+1)} \\ \vdots & & \vdots & & \ddots & & \vdots & & \vdots \\ a_{n,1} x_1 & + & a_{n,2} x_2 & + & \ldots & + & a_{n,n} x_n & = & a_{n,(n+1)} \\ \end{array} $
in matrix form, identify the solution $x = (x_1, x_2,\ldots x_N)$.
m should point to a C-style array containing the $n\times(n+1)$ matrix A.
The elements of A are row-ordered, i.e., they are ordered like this:
$ a_{1,1}, a_{1,2}, \cdot, a_{1,(n+1)}, a_{2,1}, \ldots a_{n,(n+1)} $
x points to a C-style array that will contain the solution vector x upon successful termination of the function.
If there is no solution or the system is under-determined, return false.
Parameters:
mpointer to the factors in the equations
xpointer in which the results are stored
dimthe dimension of the equation system (number of variables)
Returns:
bool true if a solution is found

Definition at line 191 of file analyticalGeometry.h.

template<typename T >
BALL_INLINE bool BALL::SolveSystem2 ( const T &  a1,
const T &  b1,
const T &  c1,
const T &  a2,
const T &  b2,
const T &  c2,
T &  x1,
T &  x2 
)

Solve a system of two equations of the form $a_1 x_1 + b_1 x_2 = c_1$ and $a_2 x_1 + b_2 x_2 = c_2$.

Parameters:
a1,b1,c1,a2,b2,c2constants of the system
x1the first solution
x2the second solution
Returns:
bool true if a solution is found

Definition at line 285 of file analyticalGeometry.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines