OpenLexocad
27.0
|
#include <Ax22d.h>
Public Member Functions | |
Ax22d () | |
Creates an indefinite coordinate system. More... | |
Ax22d (const Pnt2d &P, const Dir2d &Vx, const Dir2d &Vy) | |
Ax22d (const Pnt2d &P, const Dir2d &V, const bool Sense=true) | |
Ax22d (const Ax2d &A, const bool Sense=true) | |
const Pnt2d & | location () const |
Returns the "location" point (origin) of <me>. More... | |
void | mirror (const Pnt2d &P) |
void | mirror (const Ax2d &A) |
Ax22d | mirrored (const Pnt2d &P) const |
Ax22d | mirrored (const Ax2d &A) const |
void | rotate (const Pnt2d &P, const double Ang) |
Ax22d | rotated (const Pnt2d &P, const double Ang) const |
void | scale (const Pnt2d &P, const double S) |
Ax22d | scaled (const Pnt2d &P, const double S) const |
void | setAxis (const Ax22d &A1) |
void | setLocation (const Pnt2d &P) |
Changes the "location" point (origin) of <me>. More... | |
void | setXAxis (const Ax2d &A1) |
void | setXDirection (const Dir2d &Vx) |
void | setYAxis (const Ax2d &A1) |
void | setYDirection (const Dir2d &Vy) |
void | transform (const Trsf2d &T) |
Ax22d | transformed (const Trsf2d &T) const |
void | translate (const Vec2d &V) |
void | translate (const Pnt2d &P1, const Pnt2d &P2) |
Ax22d | translated (const Vec2d &V) const |
Ax22d | translated (const Pnt2d &P1, const Pnt2d &P2) const |
Ax2d | xAxis () const |
const Dir2d & | xDirection () const |
Returns the "xDirection" of <me>. More... | |
Ax2d | yAxis () const |
const Dir2d & | yDirection () const |
Returns the "yDirection" of <me>. More... | |
const Pnt2d & | _CSFDB_GetAx22dpoint () const |
const Dir2d & | _CSFDB_GetAx22dvydir () const |
const Dir2d & | _CSFDB_GetAx22dvxdir () const |
bool | operator== (const Ax22d &other) const |
Describes a coordinate system in a plane (2D space).
A coordinate system is defined by:
Geom::Ax22d::Ax22d | ( | ) |
Creates an indefinite coordinate system.
Creates a coordinate system with origin P and where:
Creates - a coordinate system with origin P and "X Direction"
V, which is:
Geom::Ax22d::Ax22d | ( | const Ax2d & | A, |
const bool | Sense = true |
||
) |
Creates - a coordinate system where its origin is the origin of
A and its "X Direction" is the unit vector of A, which is:
|
inline |
|
inline |
|
inline |
const Pnt2d& Geom::Ax22d::location | ( | ) | const |
Returns the "location" point (origin) of <me>.
void Geom::Ax22d::mirror | ( | const Pnt2d & | P | ) |
void Geom::Ax22d::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.
Warnings :
The main direction of the axis placement is not changed.
The "xDirection" and the "yDirection" are reversed.
So the axis placement stay right handed.
Performs the symmetrical transformation of an axis
placement with respect to an axis placement which
is the axis of the symmetry.
The transformation is performed on the "location"
point, on the "xDirection" and "yDirection".
The resulting main "Direction" is the cross product between
the "xDirection" and the "yDirection" after transformation.
bool Geom::Ax22d::operator== | ( | const Ax22d & | other | ) | const |
void Geom::Ax22d::rotate | ( | const Pnt2d & | P, |
const double | Ang | ||
) |
Rotates an axis placement. <A1> is the axis of the
rotation . Ang is the angular value of the rotation
in radians.
void Geom::Ax22d::scale | ( | const Pnt2d & | P, |
const double | S | ||
) |
Applies a scaling transformation on the axis placement.
The "location" point of the axisplacement is modified.
Warnings :
If the scale <S> is negative :
. the main direction of the axis placement is not changed.
. The "xDirection" and the "yDirection" are reversed.
So the axis placement stay right handed.
void Geom::Ax22d::setAxis | ( | const Ax22d & | A1 | ) |
Assigns the origin and the two unit vectors of the
coordinate system A1 to this coordinate system.
void Geom::Ax22d::setLocation | ( | const Pnt2d & | P | ) |
Changes the "location" point (origin) of <me>.
void Geom::Ax22d::setXAxis | ( | const Ax2d & | A1 | ) |
Changes the xAxis and yAxis ("location" point and "Direction")
of <me>.
The "yDirection" is recomputed in the same sense as before.
void Geom::Ax22d::setXDirection | ( | const Dir2d & | Vx | ) |
Assigns Vx to the "X Direction" of
this coordinate system. The other unit vector of this
coordinate system is recomputed, normal to Vx ,
without modifying the orientation (right-handed or
left-handed) of this coordinate system.
void Geom::Ax22d::setYAxis | ( | const Ax2d & | A1 | ) |
Changes the xAxis and yAxis ("location" point and "Direction") of <me>.
The "xDirection" is recomputed in the same sense as before.
void Geom::Ax22d::setYDirection | ( | const Dir2d & | Vy | ) |
Assignsr Vy to the "Y Direction" of
this coordinate system. The other unit vector of this
coordinate system is recomputed, normal to Vy,
without modifying the orientation (right-handed or
left-handed) of this coordinate system.
void Geom::Ax22d::transform | ( | const Trsf2d & | T | ) |
Transforms an axis placement with a Trsf.
The "location" point, the "xDirection" and the
"yDirection" are transformed with T. The resulting
main "Direction" of <me> is the cross product between
the "xDirection" and the "yDirection" after transformation.
void Geom::Ax22d::translate | ( | const Vec2d & | V | ) |
Translates an axis plaxement 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>.
Ax2d Geom::Ax22d::xAxis | ( | ) | const |
Returns an axis, for which
const Dir2d& Geom::Ax22d::xDirection | ( | ) | const |
Returns the "xDirection" of <me>.
Ax2d Geom::Ax22d::yAxis | ( | ) | const |
Returns an axis, for which
const Dir2d& Geom::Ax22d::yDirection | ( | ) | const |
Returns the "yDirection" of <me>.