Hide menu
Loading...
Searching...
No Matches
cadex::Geom::Axis3d Class Reference

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 PointLocation () const
 Returns an origin point.
 
const DirectionAxis () const
 Returns a Z-direction of the axis.
 
const DirectionXDirection () const
 Returns a X-direction of the axis.
 
const DirectionYDirection () 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)
 

Detailed Description

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:

Axis3d (right-handed)
Axis3d (left-handed)

Constructor & Destructor Documentation

◆ Axis3d()

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.).

Member Function Documentation

◆ Axis()

const Geom::Direction & cadex::Geom::Axis3d::Axis ( ) const

◆ IsRightHanded()

bool cadex::Geom::Axis3d::IsRightHanded ( ) const

Returns true if the axis is right-handed.

Returns true if (XDirection() ^ YDirection()) * ZDirection() > 0.

◆ Location()

const Geom::Point & cadex::Geom::Axis3d::Location ( ) const

Returns an origin point.

Returns the value specified in the constructor.

◆ Scale()

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.

◆ XDirection()

const Geom::Direction & cadex::Geom::Axis3d::XDirection ( ) const

Returns a X-direction of the axis.

See also
Axis(), YDirection().

◆ YDirection()

const Geom::Direction & cadex::Geom::Axis3d::YDirection ( ) const

Returns a Y-direction of the axis placement.

See also
Axis(), XDirection().