Core 1.0
|
A tubular object is a pierced cylinder. More...
#include <tubular.h>
Public Member Functions | |
Tubular () | |
Empty. | |
Tubular (const Vector &, const Vector &, const double &, const double &) | |
Creates a tube given vertices and radii. More... | |
~Tubular () | |
Empty. | |
double | Radius () const |
Gets the external radius. | |
double | InternalRadius () const |
Gets the external radius. | |
bool | Inside (const Vector &) const |
Check if a point is inside or outside the tube. More... | |
Vector | Normal (const Vector &) const |
Compute the normal vector to a tube. More... | |
double | R (const Vector &) const |
Compute the squared distance to a tube. More... | |
double | Signed (const Vector &) const |
Compute the signed Euclidean distance to a tube. More... | |
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. More... | |
void | Rotate (const Matrix &) |
Rotates a tube. More... | |
void | Scale (const double &) |
Scale a tube. More... | |
Box | GetBox () const |
Computes the axis-aligned bounding box of a tube. More... | |
Vector | Vertex (int) const |
Return one of the end vertexes of the axis. | |
Static Public Attributes | |
static const double | epsilon = 1.0e-4 |
Epsilon value for intersection tests. | |
Protected Attributes | |
double | ri = 1.0 |
External and internal radii. | |
Protected Attributes inherited from Axis | |
Vector | b = Vector::Z |
End vertices of the axis. | |
Vector | axis = Vector::Z |
Normalized axis vector. | |
double | length = 1.0 |
Length of the axis. | |
Friends | |
std::ostream & | operator<< (std::ostream &, const Tubular &) |
Overloaded. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Axis | |
double | Radial (const Vector &, Vector &, Vector &) const |
Compute the radial coordinates of a point. More... | |
Vector2 | Radial (const Vector &) const |
Compute the radial coordinates of a point. More... | |
Axis () | |
Empty. | |
Axis (const Vector &, const Vector &) | |
Creates an axis given end vertices. More... | |
~Axis () | |
Empty. | |
void | Rotate (const Matrix &) |
Rotates an axis. More... | |
void | Translate (const Vector &) |
Translates an axis. More... | |
void | Scale (const double &) |
Uniformly scales an axis. More... | |
void | Scale (const Vector &) |
Scales an axis. More... | |
Quadric | Equation (const Ray &) const |
Compute the polynomial equation of the Euclidean distance between a ray and the axis. More... | |
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. More... | |
Sphere | Symmetric (const Sphere &) const |
Symmetric sphere. More... | |
Vector | Normal (const Vector &) const |
Compute the normal vector between a point and its projection onto the edge. More... | |
double | R (const Vector &) const |
Compute the squared distance to the segment. More... | |
double | R (const Axis &) const |
Compute the squared distance between two axes. More... | |
double | R (const Vector &, double &) const |
Compute the squared distance to the axis. More... | |
Matrix | GetFrame () const |
Compute an orthonormal frame attached to the axis. More... | |
Static Protected Member Functions inherited from Axis | |
static Matrix | GetFrame (const Vector &) |
Compute an orthonormal frame attached to the axis. More... | |
static Vector | BoxVector (const Vector &) |
Compute the box vector extent of a unit circle with a given axis. More... | |
A tubular object is a pierced cylinder.
Note that only the radii are stored, the squared radii are computed on the fly whenever needed.
|
explicit |
Creates a tube given vertices and radii.
a,b | End vertices of the axis. |
ri,re | Internal and external radii. |
Box Tubular::GetBox | ( | ) | const |
Computes the axis-aligned bounding box of a tube.
bool Tubular::Inside | ( | const Vector & | p | ) | const |
Check if a point is inside or outside the tube.
p | Point. |
Compute the normal vector to a tube.
p | Point. |
double Tubular::R | ( | const Vector & | p | ) | const |
Compute the squared distance to a tube.
p | Point. |
void Tubular::Rotate | ( | const Matrix & | r | ) |
Rotates a tube.
r | Rotation matrix. |
void Tubular::Scale | ( | const double & | s | ) |
Scale a tube.
s | Scaling factor. |
double Tubular::Signed | ( | const Vector & | p | ) | const |
Compute the signed Euclidean distance to a tube.
p | Point. |
void Tubular::Translate | ( | const Vector & | t | ) |
Translate a tube.
t | Translation vector. |
|
friend |
Overloaded.
s | Stream. |
tubular | The tubular object. |