Defines a right-handed or left-handed axis in 3D. More...
#include <cadex/Geom/Axis3d.hxx>
Public Member Functions | |
Axis3d () | |
Constructor. | |
Axis3d (const Point &theLocation, const Direction &theAxis) | |
Constructor. | |
Axis3d (const Point &theLocation, const Direction &theAxis, const Direction &theXRef) | |
Constructor. | |
const Point & | Location () const |
Returns an origin point. | |
const Direction & | Axis () const |
Returns a Z-direction of the axis. | |
const Direction & | XDirection () const |
Returns a X-direction of the axis. | |
const Direction & | YDirection () const |
Returns a Y-direction of the axis placement. | |
bool | IsRightHanded () const |
Returns true if the axis is right-handed. | |
void | Reverse () |
Axis3d | Reversed () const |
void | Transform (const Transformation &theTransformation) |
Axis3d | Transformed (const Transformation &theTransformation) const |
void | Scale (const Point &thePoint, double theScale) |
Sets scale to axis. | |
Axis3d | Scaled (const Point &thePoint, double theScale) const |
void | Rotate (const Axis1d &theAxis, double theAngle) |
Axis3d | Rotated (const Axis1d &theAxis, double theAngle) |
void | Translate (const Vector &theVector) |
Axis3d | Translated (const Vector &theVector) |
void | Mirror (const Point &thePoint) |
void | Mirror (const Axis1d &theAxis) |
void | Mirror (const Axis3d &theAxis) |
Axis3d | Mirrored (const Point &thePoint) |
Axis3d | Mirrored (const Axis1d &theAxis) |
Axis3d | Mirrored (const Axis3d &theAxis) |
Defines a right-handed or left-handed axis in 3D.
An axis is defined similar to Axis2d, however its directions can be reversed independently.
The following images depict examples of right- and left-handed axis:
cadex::Geom::Axis3d::Axis3d | ( | ) |
Constructor.
Creates an axis from X-direction (1., 0., 0.), Y-direction (0., 1., 0.) and Z-direction (0., 0., 1.).
const Geom::Direction & cadex::Geom::Axis3d::Axis | ( | ) | const |
Returns a Z-direction of the axis.
bool cadex::Geom::Axis3d::IsRightHanded | ( | ) | const |
Returns true if the axis is right-handed.
Returns true if (XDirection() ^ YDirection()) * ZDirection() > 0.
const Geom::Point & cadex::Geom::Axis3d::Location | ( | ) | const |
Returns an origin point.
Returns the value specified in the constructor.
void cadex::Geom::Axis3d::Scale | ( | const Point & | thePoint, |
double | theScale ) |
Sets scale to axis.
Location() = thePoint * (1.0 - theScale) + Location() * theScale. If theScale is less than zero than directions is reversed.
const Geom::Direction & cadex::Geom::Axis3d::XDirection | ( | ) | const |
Returns a X-direction of the axis.
const Geom::Direction & cadex::Geom::Axis3d::YDirection | ( | ) | const |
Returns a Y-direction of the axis placement.