OpenLexocad
27.0
|
#include <Ax2d.h>
Public Member Functions | |
Ax2d () | |
Creates an indefinite Ax2d More... | |
Ax2d (const Pnt2d &P, const Dir2d &V) | |
double | angle (const Ax2d &Other) const |
const Dir2d & | direction () const |
Returns the direction of <me>. More... | |
bool | isCoaxial (const Ax2d &Other, const double AngularTolerance, const double LinearTolerance) const |
bool | isNormal (const Ax2d &Other, const double AngularTolerance) const |
bool | isOpposite (const Ax2d &Other, const double AngularTolerance) const |
bool | isParallel (const Ax2d &Other, const double AngularTolerance) const |
const Pnt2d & | location () const |
Returns the origin of <me>. More... | |
void | mirror (const Pnt2d &P) |
void | mirror (const Ax2d &A) |
Ax2d | mirrored (const Pnt2d &P) const |
Ax2d | mirrored (const Ax2d &A) const |
void | reverse () |
Reverses the direction of <me> and assigns the result to this axis. More... | |
Ax2d | reversed () const |
void | rotate (const Pnt2d &P, const double Ang) |
Ax2d | rotated (const Pnt2d &P, const double Ang) const |
void | scale (const Pnt2d &P, const double S) |
Ax2d | scaled (const Pnt2d &P, const double S) const |
void | setDirection (const Dir2d &V) |
Changes the direction of <me>. More... | |
void | setLocation (const Pnt2d &Locat) |
Changes the "Location" point (origin) of <me>. More... | |
void | transform (const Trsf2d &T) |
Ax2d | transformed (const Trsf2d &T) const |
Transforms an axis placement with a Trsf. More... | |
void | translate (const Vec2d &V) |
Ax2d | translated (const Vec2d &V) const |
void | translate (const Pnt2d &P1, const Pnt2d &P2) |
Ax2d | translated (const Pnt2d &P1, const Pnt2d &P2) const |
Describes an axis in the plane (2D space).
An axis is defined by:
Geom::Ax2d::Ax2d | ( | ) |
Creates an indefinite Ax2d
Creates an Ax2d.
is the "Location" point of
the axis placement and V is the "Direction" of
the axis placement.
double Geom::Ax2d::angle | ( | const Ax2d & | Other | ) | const |
Computes the angle, in radians, between this axis and
the axis Other. The value of the angle is between -Pi and Pi.
const Dir2d& Geom::Ax2d::direction | ( | ) | const |
Returns the direction of <me>.
bool Geom::Ax2d::isCoaxial | ( | const Ax2d & | Other, |
const double | AngularTolerance, | ||
const double | LinearTolerance | ||
) | const |
Returns True if :
. the angle between <me> and <Other> is lower or equal
to <AngularTolerance> and
. the distance between <me>.Location() and <Other> is lower
or equal to <LinearTolerance> and
. the distance between <Other>.Location() and <me> is lower
or equal to LinearTolerance.
bool Geom::Ax2d::isNormal | ( | const Ax2d & | Other, |
const double | AngularTolerance | ||
) | const |
Returns true if this axis and the axis Other are normal to
each other. That is, if the angle between the two axes is equal to Pi/2 or -Pi/2.
Note: the tolerance criterion is given by AngularTolerance.
bool Geom::Ax2d::isOpposite | ( | const Ax2d & | Other, |
const double | AngularTolerance | ||
) | const |
Returns true if this axis and the axis Other are parallel,
and have opposite orientations. That is, if the angle
between the two axes is equal to Pi or -Pi.
Note: the tolerance criterion is given by AngularTolerance.
bool Geom::Ax2d::isParallel | ( | const Ax2d & | Other, |
const double | AngularTolerance | ||
) | const |
Returns true if this axis and the axis Other are parallel,
and have either the same or opposite orientations. That
is, if the angle between the two axes is equal to 0, Pi or -Pi.
Note: the tolerance criterion is given by AngularTolerance.
const Pnt2d& Geom::Ax2d::location | ( | ) | const |
Returns the origin of <me>.
void Geom::Ax2d::mirror | ( | const Pnt2d & | P | ) |
void Geom::Ax2d::mirror | ( | const Ax2d & | A | ) |
Performs the symmetrical transformation of an axis
placement with respect to the point P which is the
center of the symmetry.
Performs the symmetrical transformation of an axis
placement with respect to an axis placement which
is the axis of the symmetry.
void Geom::Ax2d::reverse | ( | ) |
Reverses the direction of <me> and assigns the result to this axis.
Ax2d Geom::Ax2d::reversed | ( | ) | const |
Computes a new axis placement with a direction opposite to
the direction of <me>.
void Geom::Ax2d::rotate | ( | const Pnt2d & | P, |
const double | Ang | ||
) |
Rotates an axis placement.
is the center of the
rotation . Ang is the angular value of the rotation
in radians.
void Geom::Ax2d::scale | ( | const Pnt2d & | P, |
const double | S | ||
) |
Applies a scaling transformation on the axis placement.
The "Location" point of the axis placement is modified.
The "Direction" is reversed if the scale is negative.
void Geom::Ax2d::setDirection | ( | const Dir2d & | V | ) |
Changes the direction of <me>.
void Geom::Ax2d::setLocation | ( | const Pnt2d & | Locat | ) |
Changes the "Location" point (origin) of <me>.
void Geom::Ax2d::transform | ( | const Trsf2d & | T | ) |
void Geom::Ax2d::translate | ( | const Vec2d & | V | ) |
Translates an axis placement in the direction of the vector
<V>. The magnitude of the translation is the vector's magnitude.
Translates an axis placement from the point <P1> to the
point <P2>.