A core axis class.
More...
#include <axis.h>
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:202
This class implements 32 matrix.
Definition: matrix.h:14
Vectors in three dimensions.
Definition: evector.h:21
- 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 | ) |
|
Scales an axis.
- Parameters
-
◆ 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 |