Core 1.0
|
Symmetric ellipsoids, i.e., ellipsoids with the same radial coefficients. More...
#include <ellipse.h>
Public Member Functions | |
Ellipsoid () | |
Empty. | |
Ellipsoid (const Vector &, const Vector &, const double &, const double &) | |
Create an ellipsoid. More... | |
Ellipsoid (const Vector &, const Vector &, const double &) | |
Create an ellipsoid. More... | |
~Ellipsoid () | |
Empty. | |
Vector | Center () const |
Gets the center. | |
Vector | GetAxis () const |
Gets the center. | |
double | A () const |
Major radius of the ellipse. | |
double | B () const |
Minor radius of the ellipse. | |
Box | GetBox () const |
Compute the bouding box. | |
Ellipsoid | Rotated (const Matrix &) const |
Rotates an ellipsoid. More... | |
Ellipsoid | Translated (const Vector &) const |
Translates an ellipsoid. More... | |
double | R (const Vector &) const |
Compute the squared distance between a point and the ellipse. More... | |
double | Volume () const |
Compute the volume of an ellipsoid. | |
Protected Member Functions | |
double | Value (const Vector &) const |
Compute the field function value of an ellipsoid. More... | |
Protected Attributes | |
Vector | c = Vector::Null |
Center of the ellipsoid. | |
Vector | axis = Vector::Z |
Axis. | |
double | b = 1.0 |
Axis length, and radial length (revolution). | |
Symmetric ellipsoids, i.e., ellipsoids with the same radial coefficients.
Symmetric ellipsoids are surfaces of revolution, thus the Euclidean distance of a point or the signed distance can be computed analytically.
|
explicit |
Create an ellipsoid.
c | Center. |
axis | Axis (should be normalized). |
a,b | Axis length and radial length. |
Create an ellipsoid.
c | Center. |
axis | Axis of revolution, whose norm will define the first radius. |
r | Radial length. |
double Ellipsoid::R | ( | const Vector & | p | ) | const |
Compute the squared distance between a point and the ellipse.
It is possible to compute the closed form expression of the distance to an ellipsoid whenever the ellipsoid is symmetrical in one axis in which case the ellipsoid is a surface of revolution, and the distance boils down to evaluating the distance between a point and an ellipse.
p | Point. |
Rotates an ellipsoid.
r | Rotation matrix. |
Translates an ellipsoid.
t | Translation vector. |
|
protected |
Compute the field function value of an ellipsoid.
p | Point. |