Public Types | Public Member Functions

ellipsoid Class Reference

#include <ellipsoid.h>

List of all members.

Public Types

typedef double real_type
typedef vector3 vector3_type

Public Member Functions

 ellipsoid ()
 ellipsoid (vector3 C, vector3 a0, vector3 a1, vector3 a2, double _r0, double _r1, double _r2)
void init (vector3 C, vector3 a0, vector3 a1, vector3 a2, double _r0, double _r1, double _r2)
void project_point (const vector3 &input, vector3 &output, ELLIPSOID_PROJECTION_TYPE proj_type=MAHALANOBIS) const
void project_point (const vector3 &input, vector3 &output, double &N, ELLIPSOID_PROJECTION_TYPE proj_type=MAHALANOBIS) const
double euc_mahalanobis2 (const vector3 &p) const
double euc_mahalanobis2 (const vector3 &p, const vector3 &center) const
void show () const
const vector3center () const
const vector3axis0 () const
const vector3axis1 () const
const vector3axis2 () const
const double & radius0 () const
const double & radius1 () const
const double & radius2 () const

Detailed Description

A basic class for representing ellipsoids in 3D.


Member Typedef Documentation

typedef double ellipsoid::real_type

Constructor & Destructor Documentation

ellipsoid::ellipsoid (  )  [inline]

Default constructor that assigns radius 0 to the ellipsoid

ellipsoid::ellipsoid ( vector3  C,
vector3  a0,
vector3  a1,
vector3  a2,
double  _r0,
double  _r1,
double  _r2 
) [inline]
Parameters:
[in] C The 3D point corresponding to the center of the ellipsoid.
[in] a0 The 3D vector corresponding to the first principal axis of the ellipsoid.
[in] a1 The 3D vector corresponding to the second principal axis of the ellipsoid.
[in] a2 The 3D vector corresponding to the third principal axis of the ellipsoid.
[in] _r0 The length of the first principal axis.
[in] _r1 The length of the first principal axis.
[in] _r2 The length of the first principal axis.

Member Function Documentation

const vector3& ellipsoid::axis0 (  )  const [inline]
const vector3& ellipsoid::axis1 (  )  const [inline]
const vector3& ellipsoid::axis2 (  )  const [inline]
const vector3& ellipsoid::center (  )  const [inline]
double ellipsoid::euc_mahalanobis2 ( const vector3 p,
const vector3 center 
) const [inline]
double ellipsoid::euc_mahalanobis2 ( const vector3 p  )  const [inline]
void ellipsoid::init ( vector3  C,
vector3  a0,
vector3  a1,
vector3  a2,
double  _r0,
double  _r1,
double  _r2 
) [inline]

Initialises the parameters of an ellipsoid. Useful when the ellipsoid has been created using the default constructor.

Parameters:
[in] C The 3D point corresponding to the center of the ellipsoid.
[in] a0 The 3D vector corresponding to the first principal axis of the ellipsoid.
[in] a1 The 3D vector corresponding to the second principal axis of the ellipsoid.
[in] a2 The 3D vector corresponding to the third principal axis of the ellipsoid.
[in] _r0 The length of the first principal axis.
[in] _r1 The length of the first principal axis.
[in] _r2 The length of the first principal axis.
void ellipsoid::project_point ( const vector3 input,
vector3 output,
ELLIPSOID_PROJECTION_TYPE  proj_type = MAHALANOBIS 
) const [inline]

Project a point onto the ellipsoid.

Parameters:
[in] input The point to be projected.
[out] output The result of the projection.
[in] proj_type The choice of projection type.
void ellipsoid::project_point ( const vector3 input,
vector3 output,
double &  N,
ELLIPSOID_PROJECTION_TYPE  proj_type = MAHALANOBIS 
) const [inline]

Project a point onto the ellipsoid.

Parameters:
[in] input The point to be projected.
[out] output The result of the projection.
[out] N 
[in] proj_type The choice of projection type.
const double& ellipsoid::radius0 (  )  const [inline]
const double& ellipsoid::radius1 (  )  const [inline]
const double& ellipsoid::radius2 (  )  const [inline]
void ellipsoid::show (  )  const [inline]

The documentation for this class was generated from the following file: