Core 1.0
RevolutionQuadricTube Class Reference

Surface of revolution with a quadric curve. More...

#include <revolution.h>

Inheritance diagram for RevolutionQuadricTube:
Tubular Axis

Public Member Functions

 RevolutionQuadricTube (const Vector &, const Vector &, const Quadric &, const Quadric &)
 Creates a surface of revolution based on a quadric parametric profile curve.
 RevolutionQuadricTube (const Vector &, const Vector &, const QuadricCurve2 &)
 Creates a surface of revolution based on a quadric profile curve.
virtual ~RevolutionQuadricTube ()
 Destructor.
void Translate (const Vector &)
 Translation.
void Rotate (const Matrix &)
 Rotation.
void Scale (const double &)
 Scaling.
Vector Normal (const Vector &) const
 Compute the distance vector between a point and the surface.
double R (const Vector &) const
 Compute the squared distance between a point and the surface of revolution.
double Signed (const Vector &) const
 Compute the (unsigned) Euclidean distance to the surface.
Box GetBox () const
 Compute the bounding box.
Cylinder GetCylinder () const
 Compute the bounding cylinder.

Protected Attributes

Quadric y
 Quadric profile curves.
Quadric xy
 Constant coefficients used to speed-up queries.
double yb
 Range of values for the y quadric profile curve.
Protected Attributes inherited from Tubular
double ri = 1.0
 External and internal radii.
Protected Attributes inherited from Axis
Vector b = Vector::Z
 End vertexes of the axis.
Vector axis = Vector::Z
 Normalized axis vector.
double length = 1.0
 Length of the axis.

Additional Inherited Members

Protected Member Functions inherited from Tubular
 Tubular ()
 Empty.
 Tubular (const Vector &, const Vector &, const double &, const double &)
 Creates a tube given vertices and radii.
 Tubular (const double &, const double &, const double &, const double &)
 Creates a vertical tube given heights and radii.
 ~Tubular ()
 Empty.
double Radius () const
 Gets the external radius.
double InternalRadius () const
 Gets the internal radius.
bool Inside (const Vector &) const
 Check if a point is inside or outside the tube.
Vector Normal (const Vector &) const
 Compute the normal vector to a tube.
double R (const Vector &) const
 Compute the squared distance to a tube.
double Signed (const Vector &) const
 Compute the signed Euclidean distance to a tube.
double Volume () const
 Computes the volume of a tube.
double Area () const
 Compute the surface area of a tube.
void Translate (const Vector &)
 Translate a tube.
void Rotate (const Matrix &)
 Rotates a tube.
void Scale (const double &)
 Scale a tube.
Tubular Translated (const Vector &) const
 Translate a tube.
Box GetBox () const
 Computes the axis-aligned bounding box of a tube.
Vector Vertex (int) const
 Return one of the end vertexes of the axis.
Protected Member Functions inherited from Axis
double Radial (const Vector &, Vector &, Vector &) const
 Compute the radial coordinates of a point.
 Axis ()
 Empty.
 Axis (const Vector &, const Vector &)
 Creates an axis given end vertices.
 ~Axis ()
 Empty.
void Rotate (const Matrix &)
 Rotates an axis.
void Translate (const Vector &)
 Translates an axis.
void Scale (const double &)
 Uniformly scales an axis.
void Scale (const Vector &)
 Scales an axis.
Quadric Equation (const Ray &) const
 Compute the polynomial equation of the Euclidean distance between a ray and the axis.
Vector Vertex (int) const
 Return one of the end vertexes of the axis.
Vector Point (const double &) const
 Compute a point on the axis.
Vector GetAxis () const
 Returns the normalized axis vector.
double Length () const
 Return the axis length.
Vector Symmetric (const Vector &) const
 Symmetric point.
Sphere Symmetric (const Sphere &) const
 Symmetric sphere.
Vector Normal (const Vector &) const
 Compute the normal vector between a point and its projection onto the edge.
double R (const Vector &) const
 Compute the squared distance to the segment.
double R (const Axis &) const
 Compute the squared distance between two axes.
double R (const Vector &, double &) const
 Compute the squared distance to the axis.
Matrix GetFrame () const
 Compute an orthonormal frame attached to the axis.
Vector2 Radial (const Vector &) const
 Compute the radial coordinates of a point.
Static Protected Member Functions inherited from Axis
static Matrix GetFrame (const Vector &)
 Compute an orthonormal frame attached to the axis.
static Vector BoxVector (const Vector &)
 Compute the box vector extent of a unit circle with a given axis.
Static Protected Attributes inherited from Tubular
static constexpr double epsilon = 1.0e-4
 Epsilon value for intersection tests.
Static Protected Attributes inherited from Axis
static const Axis Z
 Axes from origin, identical to Axis(Vector::Null,Vector::X) ...

Detailed Description

Surface of revolution with a quadric curve.

Constructor & Destructor Documentation

◆ RevolutionQuadricTube() [1/2]

RevolutionQuadricTube::RevolutionQuadricTube ( const Vector & a,
const Vector & b,
const Quadric & x,
const Quadric & y )
explicit

Creates a surface of revolution based on a quadric parametric profile curve.

Parameters
a,bAxis vertices.
x,yParametric equation of the quadric profile curve.

◆ RevolutionQuadricTube() [2/2]

RevolutionQuadricTube::RevolutionQuadricTube ( const Vector & a,
const Vector & b,
const QuadricCurve2 & c )
explicit

Creates a surface of revolution based on a quadric profile curve.

Parameters
a,bAxis vertices.
cQuadric curve.

Member Function Documentation

◆ Normal()

Vector RevolutionQuadricTube::Normal ( const Vector & p) const

Compute the distance vector between a point and the surface.

The vector goes from the closest point of the surface to the point. The closest point is searched among the end points of the profile curve and the critical points of the squared distance to the curve, which are the roots of a cubic polynomial.

Parameters
pPoint.

◆ R()

double RevolutionQuadricTube::R ( const Vector & p) const

Compute the squared distance between a point and the surface of revolution.

Parameters
pPoint.

◆ Rotate()

void RevolutionQuadricTube::Rotate ( const Matrix & r)

Rotation.

Parameters
rRotation matrix.

◆ Scale()

void RevolutionQuadricTube::Scale ( const double & s)

Scaling.

Parameters
sScaling factor.

◆ Signed()

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

Compute the (unsigned) Euclidean distance to the surface.

Despite its name, the function returns a non negative distance, computed as the distance to the profile curve in the radial frame.

Parameters
pPoint.

◆ Translate()

void RevolutionQuadricTube::Translate ( const Vector & t)

Translation.

Parameters
tTranslation vector.