A core axis class.
More...
#include <axis.h>
|
| 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.
|
|
A core axis class.
The class includes the two end vertices Axis::a and Axis::b, the normalized direction Axis::axis and the length Axis::length. It is used in several geometric classes such as Cylinder, Capsule, Cone and deformations such as Taper or Twist.
◆ Axis()
Creates an axis given end vertices.
- Parameters
-
a,b | End vertices of the axis. |
◆ BoxVector()
◆ Equation()
Compute the polynomial equation of the Euclidean distance between a ray and the axis.
- Parameters
-
◆ GetFrame() [1/2]
Matrix Axis::GetFrame |
( |
| ) |
const |
◆ GetFrame() [2/2]
Compute an orthonormal frame attached to the axis.
The axes of the frame are defined as the column vectors of the returned matrix.
for (int i=0;i<16;i++)
{
}
Matrix GetFrame() const
Compute an orthonormal frame attached to the axis.
Definition axis.cpp:204
This class implements 32 matrix.
Definition matrix.h:266
Vectors in three dimensions.
Definition evector.h:20
- Parameters
-
z | Vector, which should be unit. |
- See also
- Axis::GetFrame()
◆ Normal()
Compute the normal vector between a point and its projection onto the edge.
- Parameters
-
◆ R() [1/3]
double Axis::R |
( |
const Axis & | axis | ) |
const |
Compute the squared distance between two axes.
- Parameters
-
◆ R() [2/3]
double Axis::R |
( |
const Vector & | p | ) |
const |
◆ R() [3/3]
double Axis::R |
( |
const Vector & | p, |
|
|
double & | s ) const |
Compute the squared distance to the axis.
- Parameters
-
p | Point. |
s | Signed distance of the projection of argument point p onto the edge. |
◆ Radial() [1/2]
Compute the radial coordinates of a point.
- Parameters
-
- Returns
- A vector (x,y) where x is the radial coordinate and y the axial coordinate.
◆ Radial() [2/2]
Compute the radial coordinates of a point.
- Parameters
-
p | Point. |
av | Returned axis vector. |
rv | Returned radial vector. |
- Returns
- Axial coordinate.
◆ Rotate()
void Axis::Rotate |
( |
const Matrix & | r | ) |
|
Rotates an axis.
Only the vertices and the axis vector are modified, whereas the length is perserved.
- Parameters
-
◆ Scale() [1/2]
void Axis::Scale |
( |
const double & | s | ) |
|
Uniformly scales an axis.
- Parameters
-
◆ Scale() [2/2]
void Axis::Scale |
( |
const Vector & | s | ) |
|
◆ Symmetric() [1/2]
Symmetric sphere.
- Parameters
-
◆ Symmetric() [2/2]
Symmetric point.
- Parameters
-
◆ Translate()
void Axis::Translate |
( |
const Vector & | t | ) |
|
Translates an axis.
- Parameters
-
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | s, |
|
|
const Axis & | axis ) |
|
friend |