Core 1.0
Ellipsoid Class Reference

Ellipsoids. More...

#include <ellipse.h>

Public Member Functions

 Ellipsoid ()
 Empty.
 
 Ellipsoid (const double &, const double &, const double &)
 Create an ellipsoid.
 
 Ellipsoid (const Vector &, const Vector &, const Vector &, const double &, const double &, const double &)
 Create an ellipsoid.
 
 Ellipsoid (const Frame &, const double &, const double &, const double &)
 Create an ellipsoid.
 
 Ellipsoid (const Spheroid &)
 Create an ellipsoid.
 
 Ellipsoid (const Matrix &, const Vector &)
 Create an ellipsoid.
 
 ~Ellipsoid ()
 Empty.
 
Vector Center () const
 Return the center.
 
Frame GetFrame () const
 Return the frame.
 
FrameScaled GetFrameScaled () const
 Return the scaled frame.
 
double A () const
 X radius of the ellipsoid.
 
double B () const
 Y radius of the ellipsoid.
 
double C () const
 Z radius of the ellipsoid.
 
Box GetBox () const
 Compute the bouding box.
 
Sphere GetSphere () const
 Compute the bouding sphere.
 
double Signed (const Vector &) const
 Compute the (conserevative, not Euclidean) signed distance bound to the ellipsoid.
 
Ellipsoid Rotated (const Matrix &) const
 Rotates an ellipsoid.
 
Ellipsoid Translated (const Vector &) const
 Translates an ellipsoid.
 
double Volume () const
 Compute the volume of an ellipsoid.
 

Static Public Member Functions

static Ellipsoid FromPoints (const std::vector< Vector > &, const double &=0.05)
 Builds an ellipsoid enveloping a point cloud, using a Minium Volume Ellipsoid algorithm.
 

Protected Member Functions

double Value (const Vector &) const
 Compute the field function value of an ellipsoid.
 

Protected Attributes

Frame frame
 Frame.
 
double c = 1.0
 % Radii.
 

Friends

std::ostream & operator<< (std::ostream &s, const Ellipsoid &ellipsoid)
 Overloaded stream operator.
 

Detailed Description

Ellipsoids.

See also
Spheroid

Constructor & Destructor Documentation

◆ Ellipsoid() [1/5]

Ellipsoid::Ellipsoid ( const double & a,
const double & b,
const double & c )
explicit

Create an ellipsoid.

Parameters
a,b,cAxis lengths.

◆ Ellipsoid() [2/5]

Ellipsoid::Ellipsoid ( const Vector & e,
const Vector & x,
const Vector & y,
const double & a,
const double & b,
const double & c )
explicit

Create an ellipsoid.

Parameters
eCenter.
x,yAxes, should be normalized.
a,b,cAxis lengths.

◆ Ellipsoid() [3/5]

Ellipsoid::Ellipsoid ( const Frame & frame,
const double & a,
const double & b,
const double & c )
explicit

Create an ellipsoid.

Parameters
frameThe frame.
a,b,cAxis lengths.

◆ Ellipsoid() [4/5]

Ellipsoid::Ellipsoid ( const Spheroid & e)
explicit

Create an ellipsoid.

Parameters
eSpheroid.

◆ Ellipsoid() [5/5]

Ellipsoid::Ellipsoid ( const Matrix & A,
const Vector & center )
explicit

Create an ellipsoid.

(p - c)^t . A . (p - c)

Parameters
AEllipsoid matrix (symmetric positive-definite).
centerEllipsoid center.

Member Function Documentation

◆ FromPoints()

Ellipsoid Ellipsoid::FromPoints ( const std::vector< Vector > & p,
const double & t = 0.05 )
static

Builds an ellipsoid enveloping a point cloud, using a Minium Volume Ellipsoid algorithm.

Parameters
pPoints.
tTolerance

◆ Rotated()

Ellipsoid Ellipsoid::Rotated ( const Matrix & r) const

Rotates an ellipsoid.

Parameters
rRotation matrix.

◆ Signed()

double Ellipsoid::Signed ( const Vector & p) const

Compute the (conserevative, not Euclidean) signed distance bound to the ellipsoid.

Parameters
pPoint.

◆ Translated()

Ellipsoid Ellipsoid::Translated ( const Vector & t) const

Translates an ellipsoid.

Parameters
tTranslation vector.

◆ Value()

double Ellipsoid::Value ( const Vector & p) const
protected

Compute the field function value of an ellipsoid.

Parameters
pPoint.

◆ Volume()

double Ellipsoid::Volume ( ) const
inline

Compute the volume of an ellipsoid.

Note that the surface area of a general (triaxial) ellipsoid involves incomplete elliptic integrals of the first and second kind respectively.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & s,
const Ellipsoid & ellipsoid )
friend

Overloaded stream operator.

Parameters
sStream.
ellipsoidEllipsoid.