1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0032250: Documentation - pseudographics within gp_Trsf description is not properly escaped

Added @code tags to documentation of several classes in the package gp.
This commit is contained in:
kgv 2021-03-27 14:45:06 +03:00 committed by bugmaster
parent 5443dd2ffa
commit 08eda8e30d
18 changed files with 208 additions and 114 deletions

View File

@ -43,7 +43,9 @@ class gp_Vec;
//! This coordinate system is the "local coordinate system" //! This coordinate system is the "local coordinate system"
//! of the ellipse. In this coordinate system, the equation of //! of the ellipse. In this coordinate system, the equation of
//! the ellipse is: //! the ellipse is:
//! @code
//! X*X / (MajorRadius**2) + Y*Y / (MinorRadius**2) = 1.0 //! X*X / (MajorRadius**2) + Y*Y / (MinorRadius**2) = 1.0
//! @endcode
//! The "main Direction" of the local coordinate system gives //! The "main Direction" of the local coordinate system gives
//! the normal vector to the plane of the ellipse. This vector //! the normal vector to the plane of the ellipse. This vector
//! gives an implicit orientation to the ellipse (definition of the //! gives an implicit orientation to the ellipse (definition of the

View File

@ -44,7 +44,9 @@ class gp_Vec2d;
//! of the ellipse. Its orientation (direct or indirect) gives an //! of the ellipse. Its orientation (direct or indirect) gives an
//! implicit orientation to the ellipse. In this coordinate //! implicit orientation to the ellipse. In this coordinate
//! system, the equation of the ellipse is: //! system, the equation of the ellipse is:
//! @code
//! X*X / (MajorRadius**2) + Y*Y / (MinorRadius**2) = 1.0 //! X*X / (MajorRadius**2) + Y*Y / (MinorRadius**2) = 1.0
//! @endcode
//! See Also //! See Also
//! gce_MakeElips2d which provides functions for more //! gce_MakeElips2d which provides functions for more
//! complex ellipse constructions //! complex ellipse constructions

View File

@ -41,34 +41,29 @@ class gp_Ax2;
//! Defines a non-persistent transformation in 3D space. //! Defines a non-persistent transformation in 3D space.
//! This transformation is a general transformation. //! This transformation is a general transformation.
//! It can be a Trsf from gp, an affinity, or you can define //! It can be a gp_Trsf, an affinity, or you can define
//! your own transformation giving the matrix of transformation. //! your own transformation giving the matrix of transformation.
//! //!
//! With a Gtrsf you can transform only a triplet of coordinates //! With a gp_GTrsf you can transform only a triplet of coordinates gp_XYZ.
//! XYZ. It is not possible to transform other geometric objects //! It is not possible to transform other geometric objects
//! because these transformations can change the nature of non- //! because these transformations can change the nature of non-elementary geometric objects.
//! elementary geometric objects. //! The transformation gp_GTrsf can be represented as follow:
//! The transformation GTrsf can be represented as follow : //! @code
//! //! V1 V2 V3 T XYZ XYZ
//! V1 V2 V3 T XYZ XYZ
//! | a11 a12 a13 a14 | | x | | x'| //! | a11 a12 a13 a14 | | x | | x'|
//! | a21 a22 a23 a24 | | y | | y'| //! | a21 a22 a23 a24 | | y | | y'|
//! | a31 a32 a33 a34 | | z | = | z'| //! | a31 a32 a33 a34 | | z | = | z'|
//! | 0 0 0 1 | | 1 | | 1 | //! | 0 0 0 1 | | 1 | | 1 |
//! //! @endcode
//! where {V1, V2, V3} define the vectorial part of the //! where {V1, V2, V3} define the vectorial part of the
//! transformation and T defines the translation part of the //! transformation and T defines the translation part of the transformation.
//! transformation.
//! Warning //! Warning
//! A GTrsf transformation is only applicable to //! A gp_GTrsf transformation is only applicable to coordinates.
//! coordinates. Be careful if you apply such a //! Be careful if you apply such a transformation to all points of a geometric object,
//! transformation to all points of a geometric object, as //! as this can change the nature of the object and thus render it incoherent!
//! this can change the nature of the object and thus //! Typically, a circle is transformed into an ellipse by an affinity transformation.
//! render it incoherent! //! To avoid modifying the nature of an object, use a gp_Trsf transformation instead,
//! Typically, a circle is transformed into an ellipse by an //! as objects of this class respect the nature of geometric objects.
//! affinity transformation. To avoid modifying the nature of
//! an object, use a gp_Trsf transformation instead, as
//! objects of this class respect the nature of geometric objects.
class gp_GTrsf class gp_GTrsf
{ {
public: public:
@ -153,10 +148,12 @@ public:
//! verify and set the shape of the GTrsf Other or CompoundTrsf //! verify and set the shape of the GTrsf Other or CompoundTrsf
//! Ex : //! Ex :
//! @code
//! myGTrsf.SetValue(row1,col1,val1); //! myGTrsf.SetValue(row1,col1,val1);
//! myGTrsf.SetValue(row2,col2,val2); //! myGTrsf.SetValue(row2,col2,val2);
//! ... //! ...
//! myGTrsf.SetForm(); //! myGTrsf.SetForm();
//! @endcode
Standard_EXPORT void SetForm(); Standard_EXPORT void SetForm();
//! Returns the translation part of the GTrsf. //! Returns the translation part of the GTrsf.
@ -188,16 +185,18 @@ public:
//! Computes the transformation composed from T and <me>. //! Computes the transformation composed from T and <me>.
//! In a C++ implementation you can also write Tcomposed = <me> * T. //! In a C++ implementation you can also write Tcomposed = <me> * T.
//! Example : //! Example :
//! GTrsf T1, T2, Tcomp; ............... //! @code
//! gp_GTrsf T1, T2, Tcomp; ...............
//! //composition : //! //composition :
//! Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1) //! Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1)
//! // transformation of a point //! // transformation of a point
//! XYZ P(10.,3.,4.); //! gp_XYZ P(10.,3.,4.);
//! XYZ P1(P); //! gp_XYZ P1(P);
//! Tcomp.Transforms(P1); //using Tcomp //! Tcomp.Transforms(P1); //using Tcomp
//! XYZ P2(P); //! gp_XYZ P2(P);
//! T1.Transforms(P2); //using T1 then T2 //! T1.Transforms(P2); //using T1 then T2
//! T2.Transforms(P2); // P1 = P2 !!! //! T2.Transforms(P2); // P1 = P2 !!!
//! @endcode
Standard_NODISCARD gp_GTrsf Multiplied (const gp_GTrsf& T) const; Standard_NODISCARD gp_GTrsf Multiplied (const gp_GTrsf& T) const;
Standard_NODISCARD gp_GTrsf operator * (const gp_GTrsf& T) const Standard_NODISCARD gp_GTrsf operator * (const gp_GTrsf& T) const
{ {

View File

@ -36,34 +36,28 @@ class gp_Ax2d;
//! Defines a non persistent transformation in 2D space. //! Defines a non persistent transformation in 2D space.
//! This transformation is a general transformation. //! This transformation is a general transformation.
//! It can be a Trsf2d from package gp, an affinity, or you can //! It can be a gp_Trsf2d, an affinity, or you can
//! define your own transformation giving the corresponding //! define your own transformation giving the corresponding matrix of transformation.
//! matrix of transformation.
//! //!
//! With a GTrsf2d you can transform only a doublet of coordinates //! With a gp_GTrsf2d you can transform only a doublet of coordinates gp_XY.
//! XY. It is not possible to transform other geometric objects //! It is not possible to transform other geometric objects
//! because these transformations can change the nature of non- //! because these transformations can change the nature of non-elementary geometric objects.
//! elementary geometric objects. //! A gp_GTrsf2d is represented with a 2 rows * 3 columns matrix:
//! A GTrsf2d is represented with a 2 rows * 3 columns matrix : //! @code
//! //! V1 V2 T XY XY
//! V1 V2 T XY XY
//! | a11 a12 a14 | | x | | x'| //! | a11 a12 a14 | | x | | x'|
//! | a21 a22 a24 | | y | | y'| //! | a21 a22 a24 | | y | = | y'|
//! | 0 0 1 | | 1 | | 1 | //! | 0 0 1 | | 1 | | 1 |
//! //! @endcode
//! where {V1, V2} defines the vectorial part of the //! where {V1, V2} defines the vectorial part of the
//! transformation and T defines the translation part of //! transformation and T defines the translation part of the transformation.
//! the transformation.
//! Warning //! Warning
//! A GTrsf2d transformation is only applicable on //! A gp_GTrsf2d transformation is only applicable on coordinates.
//! coordinates. Be careful if you apply such a //! Be careful if you apply such a transformation to all the points of a geometric object,
//! transformation to all the points of a geometric object, //! as this can change the nature of the object and thus render it incoherent!
//! as this can change the nature of the object and thus //! Typically, a circle is transformed into an ellipse by an affinity transformation.
//! render it incoherent! //! To avoid modifying the nature of an object, use a gp_Trsf2d transformation instead,
//! Typically, a circle is transformed into an ellipse by an //! as objects of this class respect the nature of geometric objects.
//! affinity transformation. To avoid modifying the nature of
//! an object, use a gp_Trsf2d transformation instead, as
//! objects of this class respect the nature of geometric objects.
class gp_GTrsf2d class gp_GTrsf2d
{ {
public: public:
@ -98,7 +92,7 @@ public:
//! Raises OutOfRange if Row < 1 or Row > 2 or Col < 1 or Col > 3 //! Raises OutOfRange if Row < 1 or Row > 2 or Col < 1 or Col > 3
void SetValue (const Standard_Integer Row, const Standard_Integer Col, const Standard_Real Value); void SetValue (const Standard_Integer Row, const Standard_Integer Col, const Standard_Real Value);
//! Replacesthe translation part of this //! Replaces the translation part of this
//! transformation by the coordinates of the number pair Coord. //! transformation by the coordinates of the number pair Coord.
Standard_EXPORT void SetTranslationPart (const gp_XY& Coord); Standard_EXPORT void SetTranslationPart (const gp_XY& Coord);
@ -162,16 +156,18 @@ public:
//! Computes the transformation composed with T and <me>. //! Computes the transformation composed with T and <me>.
//! In a C++ implementation you can also write Tcomposed = <me> * T. //! In a C++ implementation you can also write Tcomposed = <me> * T.
//! Example : //! Example :
//! GTrsf2d T1, T2, Tcomp; ............... //! @code
//! gp_GTrsf2d T1, T2, Tcomp; ...............
//! //composition : //! //composition :
//! Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1) //! Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1)
//! // transformation of a point //! // transformation of a point
//! XY P(10.,3.); //! gp_XY P(10.,3.);
//! XY P1(P); //! gp_XY P1(P);
//! Tcomp.Transforms(P1); //using Tcomp //! Tcomp.Transforms(P1); //using Tcomp
//! XY P2(P); //! gp_XY P2(P);
//! T1.Transforms(P2); //using T1 then T2 //! T1.Transforms(P2); //using T1 then T2
//! T2.Transforms(P2); // P1 = P2 !!! //! T2.Transforms(P2); // P1 = P2 !!!
//! @endcode
Standard_NODISCARD gp_GTrsf2d Multiplied (const gp_GTrsf2d& T) const; Standard_NODISCARD gp_GTrsf2d Multiplied (const gp_GTrsf2d& T) const;
Standard_NODISCARD gp_GTrsf2d operator * (const gp_GTrsf2d& T) const Standard_NODISCARD gp_GTrsf2d operator * (const gp_GTrsf2d& T) const
{ {

View File

@ -57,7 +57,7 @@ class gp_Vec;
//! and in it, the respective positions of the three branches of //! and in it, the respective positions of the three branches of
//! hyperbolas constructed with the functions OtherBranch, //! hyperbolas constructed with the functions OtherBranch,
//! ConjugateBranch1, and ConjugateBranch2: //! ConjugateBranch1, and ConjugateBranch2:
//! //! @code
//! ^YAxis //! ^YAxis
//! | //! |
//! FirstConjugateBranch //! FirstConjugateBranch
@ -69,6 +69,7 @@ class gp_Vec;
//! | //! |
//! SecondConjugateBranch //! SecondConjugateBranch
//! | ^YAxis //! | ^YAxis
//! @endcode
//! Warning //! Warning
//! The major radius can be less than the minor radius. //! The major radius can be less than the minor radius.
//! See Also //! See Also

View File

@ -53,6 +53,7 @@ class gp_Vec2d;
//! and in it, the respective positions of the three branches of //! and in it, the respective positions of the three branches of
//! hyperbolas constructed with the functions OtherBranch, //! hyperbolas constructed with the functions OtherBranch,
//! ConjugateBranch1, and ConjugateBranch2: //! ConjugateBranch1, and ConjugateBranch2:
//! @code
//! ^YAxis //! ^YAxis
//! | //! |
//! FirstConjugateBranch //! FirstConjugateBranch
@ -64,7 +65,7 @@ class gp_Vec2d;
//! | //! |
//! SecondConjugateBranch //! SecondConjugateBranch
//! | //! |
//! //! @endcode
//! Warning //! Warning
//! The major radius can be less than the minor radius. //! The major radius can be less than the minor radius.
//! See Also //! See Also

View File

@ -72,9 +72,11 @@ public:
//! Modifies the main diagonal of the matrix. //! Modifies the main diagonal of the matrix.
//! @code
//! <me>.Value (1, 1) = X1 //! <me>.Value (1, 1) = X1
//! <me>.Value (2, 2) = X2 //! <me>.Value (2, 2) = X2
//! <me>.Value (3, 3) = X3 //! <me>.Value (3, 3) = X3
//! @endcode
//! The other coefficients of the matrix are not modified. //! The other coefficients of the matrix are not modified.
void SetDiagonal (const Standard_Real X1, const Standard_Real X2, const Standard_Real X3); void SetDiagonal (const Standard_Real X1, const Standard_Real X2, const Standard_Real X3);
@ -107,9 +109,11 @@ public:
//! Modifies the matrix so that it represents //! Modifies the matrix so that it represents
//! a scaling transformation, where S is the scale factor. : //! a scaling transformation, where S is the scale factor. :
//! | S 0.0 0.0 | //! @code
//! | S 0.0 0.0 |
//! <me> = | 0.0 S 0.0 | //! <me> = | 0.0 S 0.0 |
//! | 0.0 0.0 S | //! | 0.0 0.0 S |
//! @endcode
void SetScale (const Standard_Real S); void SetScale (const Standard_Real S);
//! Assigns <Value> to the coefficient of row Row, column Col of this matrix. //! Assigns <Value> to the coefficient of row Row, column Col of this matrix.

View File

@ -56,8 +56,10 @@ public:
//! Modifies the main diagonal of the matrix. //! Modifies the main diagonal of the matrix.
//! @code
//! <me>.Value (1, 1) = X1 //! <me>.Value (1, 1) = X1
//! <me>.Value (2, 2) = X2 //! <me>.Value (2, 2) = X2
//! @endcode
//! The other coefficients of the matrix are not modified. //! The other coefficients of the matrix are not modified.
void SetDiagonal (const Standard_Real X1, const Standard_Real X2); void SetDiagonal (const Standard_Real X1, const Standard_Real X2);
@ -65,7 +67,7 @@ public:
void SetIdentity(); void SetIdentity();
//! Modifies this matrix, so that it representso a rotation. Ang is the angular //! Modifies this matrix, so that it represents a rotation. Ang is the angular
//! value in radian of the rotation. //! value in radian of the rotation.
void SetRotation (const Standard_Real Ang); void SetRotation (const Standard_Real Ang);
@ -79,8 +81,10 @@ public:
//! Modifies the matrix such that it //! Modifies the matrix such that it
//! represents a scaling transformation, where S is the scale factor : //! represents a scaling transformation, where S is the scale factor :
//! | S 0.0 | //! @code
//! | S 0.0 |
//! <me> = | 0.0 S | //! <me> = | 0.0 S |
//! @endcode
void SetScale (const Standard_Real S); void SetScale (const Standard_Real S);
//! Assigns <Value> to the coefficient of row Row, column Col of this matrix. //! Assigns <Value> to the coefficient of row Row, column Col of this matrix.
@ -135,7 +139,9 @@ public:
//! Computes the sum of this matrix and the matrix //! Computes the sum of this matrix and the matrix
//! Other.for each coefficient of the matrix : //! Other.for each coefficient of the matrix :
//! @code
//! <me>.Coef(i,j) + <Other>.Coef(i,j) //! <me>.Coef(i,j) + <Other>.Coef(i,j)
//! @endcode
//! Note: //! Note:
//! - operator += assigns the result to this matrix, while //! - operator += assigns the result to this matrix, while
//! - operator + creates a new one. //! - operator + creates a new one.
@ -212,7 +218,9 @@ public:
//! Computes for each coefficient of the matrix : //! Computes for each coefficient of the matrix :
//! @code
//! <me>.Coef(i,j) - <Other>.Coef(i,j) //! <me>.Coef(i,j) - <Other>.Coef(i,j)
//! @endcode
Standard_NODISCARD gp_Mat2d Subtracted (const gp_Mat2d& Other) const; Standard_NODISCARD gp_Mat2d Subtracted (const gp_Mat2d& Other) const;
Standard_NODISCARD gp_Mat2d operator - (const gp_Mat2d& Other) const Standard_NODISCARD gp_Mat2d operator - (const gp_Mat2d& Other) const
{ {

View File

@ -45,7 +45,9 @@ class gp_Vec;
//! coordinate system define the plane of the parabola. //! coordinate system define the plane of the parabola.
//! The equation of the parabola in this coordinate system, //! The equation of the parabola in this coordinate system,
//! which is the "local coordinate system" of the parabola, is: //! which is the "local coordinate system" of the parabola, is:
//! @code
//! Y**2 = (2*P) * X. //! Y**2 = (2*P) * X.
//! @endcode
//! where P, referred to as the parameter of the parabola, is //! where P, referred to as the parameter of the parabola, is
//! the distance between the focus and the directrix (P is //! the distance between the focus and the directrix (P is
//! twice the focal length). //! twice the focal length).

View File

@ -44,7 +44,9 @@ class gp_Vec2d;
//! of the parabola. Its orientation (direct or indirect sense) //! of the parabola. Its orientation (direct or indirect sense)
//! gives an implicit orientation to the parabola. //! gives an implicit orientation to the parabola.
//! In this coordinate system, the equation for the parabola is: //! In this coordinate system, the equation for the parabola is:
//! @code
//! Y**2 = (2*P) * X. //! Y**2 = (2*P) * X.
//! @endcode
//! where P, referred to as the parameter of the parabola, is //! where P, referred to as the parameter of the parabola, is
//! the distance between the focus and the directrix (P is //! the distance between the focus and the directrix (P is
//! twice the focal length). //! twice the focal length).
@ -126,7 +128,9 @@ public:
//! Computes the coefficients of the implicit equation of the parabola //! Computes the coefficients of the implicit equation of the parabola
//! (in WCS - World Coordinate System). //! (in WCS - World Coordinate System).
//! @code
//! A * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0. //! A * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.
//! @endcode
Standard_EXPORT void Coefficients (Standard_Real& A, Standard_Real& B, Standard_EXPORT void Coefficients (Standard_Real& A, Standard_Real& B,
Standard_Real& C, Standard_Real& D, Standard_Real& C, Standard_Real& D,
Standard_Real& E, Standard_Real& F) const; Standard_Real& E, Standard_Real& F) const;

View File

@ -82,13 +82,17 @@ public:
//! Creates a plane from its cartesian equation : //! Creates a plane from its cartesian equation :
//! @code
//! A * X + B * Y + C * Z + D = 0.0 //! A * X + B * Y + C * Z + D = 0.0
//! @endcode
//! Raises ConstructionError if Sqrt (A*A + B*B + C*C) <= Resolution from gp. //! Raises ConstructionError if Sqrt (A*A + B*B + C*C) <= Resolution from gp.
Standard_EXPORT gp_Pln(const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D); Standard_EXPORT gp_Pln(const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D);
//! Returns the coefficients of the plane's cartesian equation : //! Returns the coefficients of the plane's cartesian equation :
//! @code
//! A * X + B * Y + C * Z + D = 0. //! A * X + B * Y + C * Z + D = 0.
//! @endcode
void Coefficients (Standard_Real& A, Standard_Real& B, Standard_Real& C, Standard_Real& D) const; void Coefficients (Standard_Real& A, Standard_Real& B, Standard_Real& C, Standard_Real& D) const;
//! Modifies this plane, by redefining its local coordinate system so that //! Modifies this plane, by redefining its local coordinate system so that

View File

@ -28,12 +28,12 @@ class gp_Vec;
class gp_Mat; class gp_Mat;
//! Represents operation of rotation in 3d space as queternion //! Represents operation of rotation in 3d space as quaternion
//! and implements operations with rotations basing on //! and implements operations with rotations basing on
//! quaternion mathematics. //! quaternion mathematics.
//! //!
//! In addition, provides methods for conversion to and from other //! In addition, provides methods for conversion to and from other
//! representatons of rotation (3*3 matrix, vector and //! representations of rotation (3*3 matrix, vector and
//! angle, Euler angles) //! angle, Euler angles)
class gp_Quaternion class gp_Quaternion
{ {
@ -191,25 +191,29 @@ Standard_NODISCARD gp_Quaternion operator - (const gp_Quaternion& theOther) cons
} }
//! Multiply function - work the same as Matrices multiplying. //! Multiply function - work the same as Matrices multiplying.
//! @code
//! qq' = (cross(v,v') + wv' + w'v, ww' - dot(v,v')) //! qq' = (cross(v,v') + wv' + w'v, ww' - dot(v,v'))
//! @endcode
//! Result is rotation combination: q' than q (here q=this, q'=theQ). //! Result is rotation combination: q' than q (here q=this, q'=theQ).
//! Notices than: //! Notices that:
//! @code
//! qq' != q'q; //! qq' != q'q;
//! qq^-1 = q; //! qq^-1 = q;
//! @endcode
Standard_NODISCARD gp_Quaternion Multiplied (const gp_Quaternion& theOther) const; Standard_NODISCARD gp_Quaternion Multiplied (const gp_Quaternion& theOther) const;
Standard_NODISCARD gp_Quaternion operator * (const gp_Quaternion& theOther) const Standard_NODISCARD gp_Quaternion operator * (const gp_Quaternion& theOther) const
{ {
return Multiplied(theOther); return Multiplied(theOther);
} }
//! Adds componnets of other quaternion; result is "rotations mix" //! Adds components of other quaternion; result is "rotations mix"
void Add (const gp_Quaternion& theOther); void Add (const gp_Quaternion& theOther);
void operator += (const gp_Quaternion& theOther) void operator += (const gp_Quaternion& theOther)
{ {
Add(theOther); Add(theOther);
} }
//! Subtracts componnets of other quaternion; result is "rotations mix" //! Subtracts components of other quaternion; result is "rotations mix"
void Subtract (const gp_Quaternion& theOther); void Subtract (const gp_Quaternion& theOther);
void operator -= (const gp_Quaternion& theOther) void operator -= (const gp_Quaternion& theOther)
{ {

View File

@ -84,14 +84,16 @@ public:
void SetRadius (const Standard_Real R); void SetRadius (const Standard_Real R);
//! Computes the aera of the sphere. //! Computes the area of the sphere.
Standard_Real Area() const; Standard_Real Area() const;
//! Computes the coefficients of the implicit equation of the quadric //! Computes the coefficients of the implicit equation of the quadric
//! in the absolute cartesian coordinates system : //! in the absolute cartesian coordinates system :
//! @code
//! A1.X**2 + A2.Y**2 + A3.Z**2 + 2.(B1.X.Y + B2.X.Z + B3.Y.Z) + //! A1.X**2 + A2.Y**2 + A3.Z**2 + 2.(B1.X.Y + B2.X.Z + B3.Y.Z) +
//! 2.(C1.X + C2.Y + C3.Z) + D = 0.0 //! 2.(C1.X + C2.Y + C3.Z) + D = 0.0
//! @endcode
Standard_EXPORT void Coefficients (Standard_Real& A1, Standard_Real& A2, Standard_Real& A3, Standard_Real& B1, Standard_Real& B2, Standard_Real& B3, Standard_Real& C1, Standard_Real& C2, Standard_Real& C3, Standard_Real& D) const; Standard_EXPORT void Coefficients (Standard_Real& A1, Standard_Real& A2, Standard_Real& A3, Standard_Real& B1, Standard_Real& B2, Standard_Real& B3, Standard_Real& C1, Standard_Real& C2, Standard_Real& C3, Standard_Real& D) const;
//! Reverses the U parametrization of the sphere //! Reverses the U parametrization of the sphere

View File

@ -130,6 +130,7 @@ public:
//! Computes the coefficients of the implicit equation of the surface //! Computes the coefficients of the implicit equation of the surface
//! in the absolute Cartesian coordinate system: //! in the absolute Cartesian coordinate system:
//! @code
//! Coef(1) * X^4 + Coef(2) * Y^4 + Coef(3) * Z^4 + //! Coef(1) * X^4 + Coef(2) * Y^4 + Coef(3) * Z^4 +
//! Coef(4) * X^3 * Y + Coef(5) * X^3 * Z + Coef(6) * Y^3 * X + //! Coef(4) * X^3 * Y + Coef(5) * X^3 * Z + Coef(6) * Y^3 * X +
//! Coef(7) * Y^3 * Z + Coef(8) * Z^3 * X + Coef(9) * Z^3 * Y + //! Coef(7) * Y^3 * Z + Coef(8) * Z^3 * X + Coef(9) * Z^3 * Y +
@ -144,6 +145,7 @@ public:
//! Coef(29) * X * Y + Coef(30) * X * Z + Coef(31) * Y * Z + //! Coef(29) * X * Y + Coef(30) * X * Z + Coef(31) * Y * Z +
//! Coef(32) * X + Coef(33) * Y + Coef(34) * Z + //! Coef(32) * X + Coef(33) * Y + Coef(34) * Z +
//! Coef(35) = 0.0 //! Coef(35) = 0.0
//! @endcode
//! Raises DimensionError if the length of Coef is lower than 35. //! Raises DimensionError if the length of Coef is lower than 35.
Standard_EXPORT void Coefficients (TColStd_Array1OfReal& Coef) const; Standard_EXPORT void Coefficients (TColStd_Array1OfReal& Coef) const;

View File

@ -50,13 +50,13 @@ class gp_Vec;
//! previous elementary transformations using the method //! previous elementary transformations using the method
//! Multiply. //! Multiply.
//! The transformations can be represented as follow : //! The transformations can be represented as follow :
//! //! @code
//! V1 V2 V3 T XYZ XYZ //! V1 V2 V3 T XYZ XYZ
//! | a11 a12 a13 a14 | | x | | x'| //! | a11 a12 a13 a14 | | x | | x'|
//! | a21 a22 a23 a24 | | y | | y'| //! | a21 a22 a23 a24 | | y | | y'|
//! | a31 a32 a33 a34 | | z | = | z'| //! | a31 a32 a33 a34 | | z | = | z'|
//! | 0 0 0 1 | | 1 | | 1 | //! | 0 0 0 1 | | 1 | | 1 |
//! //! @endcode
//! where {V1, V2, V3} defines the vectorial part of the //! where {V1, V2, V3} defines the vectorial part of the
//! transformation and T defines the translation part of the //! transformation and T defines the translation part of the
//! transformation. //! transformation.
@ -156,16 +156,16 @@ public:
//! The transformation is from the coordinate //! The transformation is from the coordinate
//! system "FromSystem1" to the coordinate system "ToSystem2". //! system "FromSystem1" to the coordinate system "ToSystem2".
//! Example : //! Example :
//! In a C++ implementation : //! @code
//! Real x1, y1, z1; // are the coordinates of a point in the //! gp_Ax3 FromSystem1, ToSystem2;
//! // local system FromSystem1 //! double x1, y1, z1; // are the coordinates of a point in the local system FromSystem1
//! Real x2, y2, z2; // are the coordinates of a point in the //! double x2, y2, z2; // are the coordinates of a point in the local system ToSystem2
//! // local system ToSystem2
//! gp_Pnt P1 (x1, y1, z1) //! gp_Pnt P1 (x1, y1, z1)
//! Trsf T; //! gp_Trsf T;
//! T.SetTransformation (FromSystem1, ToSystem2); //! T.SetTransformation (FromSystem1, ToSystem2);
//! gp_Pnt P2 = P1.Transformed (T); //! gp_Pnt P2 = P1.Transformed (T);
//! P2.Coord (x2, y2, z2); //! P2.Coord (x2, y2, z2);
//! @endcode
Standard_EXPORT void SetTransformation (const gp_Ax3& FromSystem1, const gp_Ax3& ToSystem2); Standard_EXPORT void SetTransformation (const gp_Ax3& FromSystem1, const gp_Ax3& ToSystem2);
//! Modifies this transformation so that it transforms the //! Modifies this transformation so that it transforms the
@ -174,7 +174,9 @@ public:
//! are relative to a target coordinate system, but which //! are relative to a target coordinate system, but which
//! represent the same point //! represent the same point
//! The transformation is from the default coordinate system //! The transformation is from the default coordinate system
//! @code
//! {P(0.,0.,0.), VX (1.,0.,0.), VY (0.,1.,0.), VZ (0., 0. ,1.) } //! {P(0.,0.,0.), VX (1.,0.,0.), VY (0.,1.,0.), VZ (0., 0. ,1.) }
//! @endcode
//! to the local coordinate system defined with the Ax3 ToSystem. //! to the local coordinate system defined with the Ax3 ToSystem.
//! Use in the same way as the previous method. FromSystem1 is //! Use in the same way as the previous method. FromSystem1 is
//! defaulted to the absolute coordinate system. //! defaulted to the absolute coordinate system.
@ -206,11 +208,11 @@ public:
//! Sets the coefficients of the transformation. The //! Sets the coefficients of the transformation. The
//! transformation of the point x,y,z is the point //! transformation of the point x,y,z is the point
//! x',y',z' with : //! x',y',z' with :
//! //! @code
//! x' = a11 x + a12 y + a13 z + a14 //! x' = a11 x + a12 y + a13 z + a14
//! y' = a21 x + a22 y + a23 z + a24 //! y' = a21 x + a22 y + a23 z + a24
//! z' = a31 x + a32 y + a33 z + a34 //! z' = a31 x + a32 y + a33 z + a34
//! //! @endcode
//! The method Value(i,j) will return aij. //! The method Value(i,j) will return aij.
//! Raises ConstructionError if the determinant of the aij is null. //! Raises ConstructionError if the determinant of the aij is null.
//! The matrix is orthogonalized before future using. //! The matrix is orthogonalized before future using.
@ -279,12 +281,14 @@ public:
//! Computes the transformation composed with T and <me>. //! Computes the transformation composed with T and <me>.
//! In a C++ implementation you can also write Tcomposed = <me> * T. //! In a C++ implementation you can also write Tcomposed = <me> * T.
//! Example : //! Example :
//! Trsf T1, T2, Tcomp; ............... //! @code
//! gp_Trsf T1, T2, Tcomp; ...............
//! Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1) //! Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1)
//! Pnt P1(10.,3.,4.); //! gp_Pnt P1(10.,3.,4.);
//! Pnt P2 = P1.Transformed(Tcomp); //using Tcomp //! gp_Pnt P2 = P1.Transformed(Tcomp); // using Tcomp
//! Pnt P3 = P1.Transformed(T1); //using T1 then T2 //! gp_Pnt P3 = P1.Transformed(T1); // using T1 then T2
//! P3.Transform(T2); // P3 = P2 !!! //! P3.Transform(T2); // P3 = P2 !!!
//! @endcode
Standard_NODISCARD gp_Trsf Inverted() const; Standard_NODISCARD gp_Trsf Inverted() const;
Standard_NODISCARD gp_Trsf Multiplied (const gp_Trsf& T) const; Standard_NODISCARD gp_Trsf Multiplied (const gp_Trsf& T) const;

View File

@ -39,17 +39,17 @@ class gp_Mat2d;
//! Defines a non-persistent transformation in 2D space. //! Defines a non-persistent transformation in 2D space.
//! The following transformations are implemented : //! The following transformations are implemented :
//! . Translation, Rotation, Scale //! - Translation, Rotation, Scale
//! . Symmetry with respect to a point and a line. //! - Symmetry with respect to a point and a line.
//! Complex transformations can be obtained by combining the //! Complex transformations can be obtained by combining the
//! previous elementary transformations using the method Multiply. //! previous elementary transformations using the method Multiply.
//! The transformations can be represented as follow : //! The transformations can be represented as follow :
//! //! @code
//! V1 V2 T XY XY //! V1 V2 T XY XY
//! | a11 a12 a13 | | x | | x'| //! | a11 a12 a13 | | x | | x'|
//! | a21 a22 a23 | | y | | y'| //! | a21 a22 a23 | | y | | y'|
//! | 0 0 1 | | 1 | | 1 | //! | 0 0 1 | | 1 | | 1 |
//! //! @endcode
//! where {V1, V2} defines the vectorial part of the transformation //! where {V1, V2} defines the vectorial part of the transformation
//! and T defines the translation part of the transformation. //! and T defines the translation part of the transformation.
//! This transformation never change the nature of the objects. //! This transformation never change the nature of the objects.
@ -206,10 +206,10 @@ void operator *= (const gp_Trsf2d& T)
//! Sets the coefficients of the transformation. The //! Sets the coefficients of the transformation. The
//! transformation of the point x,y is the point //! transformation of the point x,y is the point
//! x',y' with : //! x',y' with :
//! //! @code
//! x' = a11 x + a12 y + a13 //! x' = a11 x + a12 y + a13
//! y' = a21 x + a22 y + a23 //! y' = a21 x + a22 y + a23
//! //! @endcode
//! The method Value(i,j) will return aij. //! The method Value(i,j) will return aij.
//! Raises ConstructionError if the determinant of the aij is null. //! Raises ConstructionError if the determinant of the aij is null.
//! If the matrix as not a uniform scale it will be orthogonalized before future using. //! If the matrix as not a uniform scale it will be orthogonalized before future using.

View File

@ -98,8 +98,10 @@ public:
Standard_EXPORT Standard_Boolean IsEqual (const gp_XY& Other, const Standard_Real Tolerance) const; Standard_EXPORT Standard_Boolean IsEqual (const gp_XY& Other, const Standard_Real Tolerance) const;
//! Computes the sum of this number pair and number pair Other //! Computes the sum of this number pair and number pair Other
//! @code
//! <me>.X() = <me>.X() + Other.X() //! <me>.X() = <me>.X() + Other.X()
//! <me>.Y() = <me>.Y() + Other.Y() //! <me>.Y() = <me>.Y() + Other.Y()
//! @endcode
void Add (const gp_XY& Other); void Add (const gp_XY& Other);
void operator += (const gp_XY& Other) void operator += (const gp_XY& Other)
{ {
@ -107,8 +109,10 @@ public:
} }
//! Computes the sum of this number pair and number pair Other //! Computes the sum of this number pair and number pair Other
//! @code
//! new.X() = <me>.X() + Other.X() //! new.X() = <me>.X() + Other.X()
//! new.Y() = <me>.Y() + Other.Y() //! new.Y() = <me>.Y() + Other.Y()
//! @endcode
Standard_NODISCARD gp_XY Added (const gp_XY& Other) const; Standard_NODISCARD gp_XY Added (const gp_XY& Other) const;
Standard_NODISCARD gp_XY operator + (const gp_XY& Other) const Standard_NODISCARD gp_XY operator + (const gp_XY& Other) const
{ {
@ -116,7 +120,9 @@ public:
} }
//! Real D = <me>.X() * Other.Y() - <me>.Y() * Other.X() //! @code
//! double D = <me>.X() * Other.Y() - <me>.Y() * Other.X()
//! @endcode
Standard_NODISCARD Standard_Real Crossed (const gp_XY& Right) const; Standard_NODISCARD Standard_Real Crossed (const gp_XY& Right) const;
Standard_NODISCARD Standard_Real operator ^ (const gp_XY& Right) const Standard_NODISCARD Standard_Real operator ^ (const gp_XY& Right) const
{ {
@ -155,71 +161,84 @@ public:
} }
//! @code
//! <me>.X() = <me>.X() * Scalar; //! <me>.X() = <me>.X() * Scalar;
//! <me>.Y() = <me>.Y() * Scalar; //! <me>.Y() = <me>.Y() * Scalar;
//! @endcode
void Multiply (const Standard_Real Scalar); void Multiply (const Standard_Real Scalar);
void operator *= (const Standard_Real Scalar) void operator *= (const Standard_Real Scalar)
{ {
Multiply(Scalar); Multiply(Scalar);
} }
//! @code
//! <me>.X() = <me>.X() * Other.X(); //! <me>.X() = <me>.X() * Other.X();
//! <me>.Y() = <me>.Y() * Other.Y(); //! <me>.Y() = <me>.Y() * Other.Y();
//! @endcode
void Multiply (const gp_XY& Other); void Multiply (const gp_XY& Other);
void operator *= (const gp_XY& Other) void operator *= (const gp_XY& Other)
{ {
Multiply(Other); Multiply(Other);
} }
//! @code
//! <me> = Matrix * <me> //! <me> = Matrix * <me>
//! @endcode
void Multiply (const gp_Mat2d& Matrix); void Multiply (const gp_Mat2d& Matrix);
void operator *= (const gp_Mat2d& Matrix) void operator *= (const gp_Mat2d& Matrix)
{ {
Multiply(Matrix); Multiply(Matrix);
} }
//! @code
//! New.X() = <me>.X() * Scalar; //! New.X() = <me>.X() * Scalar;
//! New.Y() = <me>.Y() * Scalar; //! New.Y() = <me>.Y() * Scalar;
//! @endcode
Standard_NODISCARD gp_XY Multiplied (const Standard_Real Scalar) const; Standard_NODISCARD gp_XY Multiplied (const Standard_Real Scalar) const;
Standard_NODISCARD gp_XY operator * (const Standard_Real Scalar) const Standard_NODISCARD gp_XY operator * (const Standard_Real Scalar) const
{ {
return Multiplied(Scalar); return Multiplied(Scalar);
} }
//! @code
//! new.X() = <me>.X() * Other.X(); //! new.X() = <me>.X() * Other.X();
//! new.Y() = <me>.Y() * Other.Y(); //! new.Y() = <me>.Y() * Other.Y();
//! @endcode
Standard_NODISCARD gp_XY Multiplied (const gp_XY& Other) const; Standard_NODISCARD gp_XY Multiplied (const gp_XY& Other) const;
//! @code
//! New = Matrix * <me> //! New = Matrix * <me>
//! @endcode
Standard_NODISCARD gp_XY Multiplied (const gp_Mat2d& Matrix) const; Standard_NODISCARD gp_XY Multiplied (const gp_Mat2d& Matrix) const;
Standard_NODISCARD gp_XY operator * (const gp_Mat2d& Matrix) const Standard_NODISCARD gp_XY operator * (const gp_Mat2d& Matrix) const
{ {
return Multiplied(Matrix); return Multiplied(Matrix);
} }
//! @code
//! <me>.X() = <me>.X()/ <me>.Modulus() //! <me>.X() = <me>.X()/ <me>.Modulus()
//! <me>.Y() = <me>.Y()/ <me>.Modulus() //! <me>.Y() = <me>.Y()/ <me>.Modulus()
//! @endcode
//! Raises ConstructionError if <me>.Modulus() <= Resolution from gp //! Raises ConstructionError if <me>.Modulus() <= Resolution from gp
void Normalize(); void Normalize();
//! @code
//! New.X() = <me>.X()/ <me>.Modulus() //! New.X() = <me>.X()/ <me>.Modulus()
//! New.Y() = <me>.Y()/ <me>.Modulus() //! New.Y() = <me>.Y()/ <me>.Modulus()
//! @endcode
//! Raises ConstructionError if <me>.Modulus() <= Resolution from gp //! Raises ConstructionError if <me>.Modulus() <= Resolution from gp
Standard_NODISCARD gp_XY Normalized() const; Standard_NODISCARD gp_XY Normalized() const;
//! @code
//! <me>.X() = -<me>.X() //! <me>.X() = -<me>.X()
//! <me>.Y() = -<me>.Y() //! <me>.Y() = -<me>.Y()
//! @endcode
void Reverse(); void Reverse();
//! @code
//! New.X() = -<me>.X() //! New.X() = -<me>.X()
//! New.Y() = -<me>.Y() //! New.Y() = -<me>.Y()
//! @endcode
Standard_NODISCARD gp_XY Reversed() const; Standard_NODISCARD gp_XY Reversed() const;
Standard_NODISCARD gp_XY operator -() const Standard_NODISCARD gp_XY operator -() const
{ {
@ -229,39 +248,49 @@ public:
//! Computes the following linear combination and //! Computes the following linear combination and
//! assigns the result to this number pair: //! assigns the result to this number pair:
//! @code
//! A1 * XY1 + A2 * XY2 //! A1 * XY1 + A2 * XY2
//! @endcode
void SetLinearForm (const Standard_Real A1, const gp_XY& XY1, const Standard_Real A2, const gp_XY& XY2); void SetLinearForm (const Standard_Real A1, const gp_XY& XY1, const Standard_Real A2, const gp_XY& XY2);
//! -- Computes the following linear combination and //! -- Computes the following linear combination and
//! assigns the result to this number pair: //! assigns the result to this number pair:
//! @code
//! A1 * XY1 + A2 * XY2 + XY3 //! A1 * XY1 + A2 * XY2 + XY3
//! @endcode
void SetLinearForm (const Standard_Real A1, const gp_XY& XY1, const Standard_Real A2, const gp_XY& XY2, const gp_XY& XY3); void SetLinearForm (const Standard_Real A1, const gp_XY& XY1, const Standard_Real A2, const gp_XY& XY2, const gp_XY& XY3);
//! Computes the following linear combination and //! Computes the following linear combination and
//! assigns the result to this number pair: //! assigns the result to this number pair:
//! @code
//! A1 * XY1 + XY2 //! A1 * XY1 + XY2
//! @endcode
void SetLinearForm (const Standard_Real A1, const gp_XY& XY1, const gp_XY& XY2); void SetLinearForm (const Standard_Real A1, const gp_XY& XY1, const gp_XY& XY2);
//! Computes the following linear combination and //! Computes the following linear combination and
//! assigns the result to this number pair: //! assigns the result to this number pair:
//! @code
//! XY1 + XY2 //! XY1 + XY2
//! @endcode
void SetLinearForm (const gp_XY& XY1, const gp_XY& XY2); void SetLinearForm (const gp_XY& XY1, const gp_XY& XY2);
//! @code
//! <me>.X() = <me>.X() - Other.X() //! <me>.X() = <me>.X() - Other.X()
//! <me>.Y() = <me>.Y() - Other.Y() //! <me>.Y() = <me>.Y() - Other.Y()
//! @endcode
void Subtract (const gp_XY& Right); void Subtract (const gp_XY& Right);
void operator -= (const gp_XY& Right) void operator -= (const gp_XY& Right)
{ {
Subtract(Right); Subtract(Right);
} }
//! @code
//! new.X() = <me>.X() - Other.X() //! new.X() = <me>.X() - Other.X()
//! new.Y() = <me>.Y() - Other.Y() //! new.Y() = <me>.Y() - Other.Y()
//! @endcode
Standard_NODISCARD gp_XY Subtracted (const gp_XY& Right) const; Standard_NODISCARD gp_XY Subtracted (const gp_XY& Right) const;
Standard_NODISCARD gp_XY operator - (const gp_XY& Right) const Standard_NODISCARD gp_XY operator - (const gp_XY& Right) const
{ {

View File

@ -119,40 +119,44 @@ public:
//! abs(<me>.Z() - Other.Z()) <= Tolerance. //! abs(<me>.Z() - Other.Z()) <= Tolerance.
Standard_EXPORT Standard_Boolean IsEqual (const gp_XYZ& Other, const Standard_Real Tolerance) const; Standard_EXPORT Standard_Boolean IsEqual (const gp_XYZ& Other, const Standard_Real Tolerance) const;
//! @code
//! <me>.X() = <me>.X() + Other.X() //! <me>.X() = <me>.X() + Other.X()
//! <me>.Y() = <me>.Y() + Other.Y() //! <me>.Y() = <me>.Y() + Other.Y()
//! <me>.Z() = <me>.Z() + Other.Z() //! <me>.Z() = <me>.Z() + Other.Z()
//! @endcode
void Add (const gp_XYZ& Other); void Add (const gp_XYZ& Other);
void operator += (const gp_XYZ& Other) void operator += (const gp_XYZ& Other)
{ {
Add(Other); Add(Other);
} }
//! @code
//! new.X() = <me>.X() + Other.X() //! new.X() = <me>.X() + Other.X()
//! new.Y() = <me>.Y() + Other.Y() //! new.Y() = <me>.Y() + Other.Y()
//! new.Z() = <me>.Z() + Other.Z() //! new.Z() = <me>.Z() + Other.Z()
//! @endcode
Standard_NODISCARD gp_XYZ Added (const gp_XYZ& Other) const; Standard_NODISCARD gp_XYZ Added (const gp_XYZ& Other) const;
Standard_NODISCARD gp_XYZ operator + (const gp_XYZ& Other) const Standard_NODISCARD gp_XYZ operator + (const gp_XYZ& Other) const
{ {
return Added(Other); return Added(Other);
} }
//! @code
//! <me>.X() = <me>.Y() * Other.Z() - <me>.Z() * Other.Y() //! <me>.X() = <me>.Y() * Other.Z() - <me>.Z() * Other.Y()
//! <me>.Y() = <me>.Z() * Other.X() - <me>.X() * Other.Z() //! <me>.Y() = <me>.Z() * Other.X() - <me>.X() * Other.Z()
//! <me>.Z() = <me>.X() * Other.Y() - <me>.Y() * Other.X() //! <me>.Z() = <me>.X() * Other.Y() - <me>.Y() * Other.X()
//! @endcode
void Cross (const gp_XYZ& Right); void Cross (const gp_XYZ& Right);
void operator ^= (const gp_XYZ& Right) void operator ^= (const gp_XYZ& Right)
{ {
Cross(Right); Cross(Right);
} }
//! @code
//! new.X() = <me>.Y() * Other.Z() - <me>.Z() * Other.Y() //! new.X() = <me>.Y() * Other.Z() - <me>.Z() * Other.Y()
//! new.Y() = <me>.Z() * Other.X() - <me>.X() * Other.Z() //! new.Y() = <me>.Z() * Other.X() - <me>.X() * Other.Z()
//! new.Z() = <me>.X() * Other.Y() - <me>.Y() * Other.X() //! new.Z() = <me>.X() * Other.Y() - <me>.Y() * Other.X()
//! @endcode
Standard_NODISCARD gp_XYZ Crossed (const gp_XYZ& Right) const; Standard_NODISCARD gp_XYZ Crossed (const gp_XYZ& Right) const;
Standard_NODISCARD gp_XYZ operator ^ (const gp_XYZ& Right) const Standard_NODISCARD gp_XYZ operator ^ (const gp_XYZ& Right) const
{ {
@ -200,97 +204,111 @@ public:
//! computes the triple scalar product //! computes the triple scalar product
Standard_Real DotCross (const gp_XYZ& Coord1, const gp_XYZ& Coord2) const; Standard_Real DotCross (const gp_XYZ& Coord1, const gp_XYZ& Coord2) const;
//! @code
//! <me>.X() = <me>.X() * Scalar; //! <me>.X() = <me>.X() * Scalar;
//! <me>.Y() = <me>.Y() * Scalar; //! <me>.Y() = <me>.Y() * Scalar;
//! <me>.Z() = <me>.Z() * Scalar; //! <me>.Z() = <me>.Z() * Scalar;
//! @endcode
void Multiply (const Standard_Real Scalar); void Multiply (const Standard_Real Scalar);
void operator *= (const Standard_Real Scalar) void operator *= (const Standard_Real Scalar)
{ {
Multiply(Scalar); Multiply(Scalar);
} }
//! @code
//! <me>.X() = <me>.X() * Other.X(); //! <me>.X() = <me>.X() * Other.X();
//! <me>.Y() = <me>.Y() * Other.Y(); //! <me>.Y() = <me>.Y() * Other.Y();
//! <me>.Z() = <me>.Z() * Other.Z(); //! <me>.Z() = <me>.Z() * Other.Z();
//! @endcode
void Multiply (const gp_XYZ& Other); void Multiply (const gp_XYZ& Other);
void operator *= (const gp_XYZ& Other) void operator *= (const gp_XYZ& Other)
{ {
Multiply(Other); Multiply(Other);
} }
//! @code
//! <me> = Matrix * <me> //! <me> = Matrix * <me>
//! @endcode
void Multiply (const gp_Mat& Matrix); void Multiply (const gp_Mat& Matrix);
void operator *= (const gp_Mat& Matrix) void operator *= (const gp_Mat& Matrix)
{ {
Multiply(Matrix); Multiply(Matrix);
} }
//! @code
//! New.X() = <me>.X() * Scalar; //! New.X() = <me>.X() * Scalar;
//! New.Y() = <me>.Y() * Scalar; //! New.Y() = <me>.Y() * Scalar;
//! New.Z() = <me>.Z() * Scalar; //! New.Z() = <me>.Z() * Scalar;
//! @endcode
Standard_NODISCARD gp_XYZ Multiplied (const Standard_Real Scalar) const; Standard_NODISCARD gp_XYZ Multiplied (const Standard_Real Scalar) const;
Standard_NODISCARD gp_XYZ operator * (const Standard_Real Scalar) const Standard_NODISCARD gp_XYZ operator * (const Standard_Real Scalar) const
{ {
return Multiplied(Scalar); return Multiplied(Scalar);
} }
//! @code
//! new.X() = <me>.X() * Other.X(); //! new.X() = <me>.X() * Other.X();
//! new.Y() = <me>.Y() * Other.Y(); //! new.Y() = <me>.Y() * Other.Y();
//! new.Z() = <me>.Z() * Other.Z(); //! new.Z() = <me>.Z() * Other.Z();
//! @endcode
Standard_NODISCARD gp_XYZ Multiplied (const gp_XYZ& Other) const; Standard_NODISCARD gp_XYZ Multiplied (const gp_XYZ& Other) const;
//! @code
//! New = Matrix * <me> //! New = Matrix * <me>
//! @endcode
Standard_NODISCARD gp_XYZ Multiplied (const gp_Mat& Matrix) const; Standard_NODISCARD gp_XYZ Multiplied (const gp_Mat& Matrix) const;
Standard_NODISCARD gp_XYZ operator * (const gp_Mat& Matrix) const Standard_NODISCARD gp_XYZ operator * (const gp_Mat& Matrix) const
{ {
return Multiplied(Matrix); return Multiplied(Matrix);
} }
//! @code
//! <me>.X() = <me>.X()/ <me>.Modulus() //! <me>.X() = <me>.X()/ <me>.Modulus()
//! <me>.Y() = <me>.Y()/ <me>.Modulus() //! <me>.Y() = <me>.Y()/ <me>.Modulus()
//! <me>.Z() = <me>.Z()/ <me>.Modulus() //! <me>.Z() = <me>.Z()/ <me>.Modulus()
//! @endcode
//! Raised if <me>.Modulus() <= Resolution from gp //! Raised if <me>.Modulus() <= Resolution from gp
void Normalize(); void Normalize();
//! @code
//! New.X() = <me>.X()/ <me>.Modulus() //! New.X() = <me>.X()/ <me>.Modulus()
//! New.Y() = <me>.Y()/ <me>.Modulus() //! New.Y() = <me>.Y()/ <me>.Modulus()
//! New.Z() = <me>.Z()/ <me>.Modulus() //! New.Z() = <me>.Z()/ <me>.Modulus()
//! @endcode
//! Raised if <me>.Modulus() <= Resolution from gp //! Raised if <me>.Modulus() <= Resolution from gp
Standard_NODISCARD gp_XYZ Normalized() const; Standard_NODISCARD gp_XYZ Normalized() const;
//! @code
//! <me>.X() = -<me>.X() //! <me>.X() = -<me>.X()
//! <me>.Y() = -<me>.Y() //! <me>.Y() = -<me>.Y()
//! <me>.Z() = -<me>.Z() //! <me>.Z() = -<me>.Z()
//! @endcode
void Reverse(); void Reverse();
//! @code
//! New.X() = -<me>.X() //! New.X() = -<me>.X()
//! New.Y() = -<me>.Y() //! New.Y() = -<me>.Y()
//! New.Z() = -<me>.Z() //! New.Z() = -<me>.Z()
//! @endcode
Standard_NODISCARD gp_XYZ Reversed() const; Standard_NODISCARD gp_XYZ Reversed() const;
//! @code
//! <me>.X() = <me>.X() - Other.X() //! <me>.X() = <me>.X() - Other.X()
//! <me>.Y() = <me>.Y() - Other.Y() //! <me>.Y() = <me>.Y() - Other.Y()
//! <me>.Z() = <me>.Z() - Other.Z() //! <me>.Z() = <me>.Z() - Other.Z()
//! @endcode
void Subtract (const gp_XYZ& Right); void Subtract (const gp_XYZ& Right);
void operator -= (const gp_XYZ& Right) void operator -= (const gp_XYZ& Right)
{ {
Subtract(Right); Subtract(Right);
} }
//! @code
//! new.X() = <me>.X() - Other.X() //! new.X() = <me>.X() - Other.X()
//! new.Y() = <me>.Y() - Other.Y() //! new.Y() = <me>.Y() - Other.Y()
//! new.Z() = <me>.Z() - Other.Z() //! new.Z() = <me>.Z() - Other.Z()
//! @endcode
Standard_NODISCARD gp_XYZ Subtracted (const gp_XYZ& Right) const; Standard_NODISCARD gp_XYZ Subtracted (const gp_XYZ& Right) const;
Standard_NODISCARD gp_XYZ operator - (const gp_XYZ& Right) const Standard_NODISCARD gp_XYZ operator - (const gp_XYZ& Right) const
{ {
@ -299,32 +317,44 @@ public:
//! <me> is set to the following linear form : //! <me> is set to the following linear form :
//! @code
//! A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3 + XYZ4 //! A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3 + XYZ4
//! @endcode
void SetLinearForm (const Standard_Real A1, const gp_XYZ& XYZ1, const Standard_Real A2, const gp_XYZ& XYZ2, const Standard_Real A3, const gp_XYZ& XYZ3, const gp_XYZ& XYZ4); void SetLinearForm (const Standard_Real A1, const gp_XYZ& XYZ1, const Standard_Real A2, const gp_XYZ& XYZ2, const Standard_Real A3, const gp_XYZ& XYZ3, const gp_XYZ& XYZ4);
//! <me> is set to the following linear form : //! <me> is set to the following linear form :
//! @code
//! A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3 //! A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3
//! @endcode
void SetLinearForm (const Standard_Real A1, const gp_XYZ& XYZ1, const Standard_Real A2, const gp_XYZ& XYZ2, const Standard_Real A3, const gp_XYZ& XYZ3); void SetLinearForm (const Standard_Real A1, const gp_XYZ& XYZ1, const Standard_Real A2, const gp_XYZ& XYZ2, const Standard_Real A3, const gp_XYZ& XYZ3);
//! <me> is set to the following linear form : //! <me> is set to the following linear form :
//! @code
//! A1 * XYZ1 + A2 * XYZ2 + XYZ3 //! A1 * XYZ1 + A2 * XYZ2 + XYZ3
//! @endcode
void SetLinearForm (const Standard_Real A1, const gp_XYZ& XYZ1, const Standard_Real A2, const gp_XYZ& XYZ2, const gp_XYZ& XYZ3); void SetLinearForm (const Standard_Real A1, const gp_XYZ& XYZ1, const Standard_Real A2, const gp_XYZ& XYZ2, const gp_XYZ& XYZ3);
//! <me> is set to the following linear form : //! <me> is set to the following linear form :
//! @code
//! A1 * XYZ1 + A2 * XYZ2 //! A1 * XYZ1 + A2 * XYZ2
//! @endcode
void SetLinearForm (const Standard_Real A1, const gp_XYZ& XYZ1, const Standard_Real A2, const gp_XYZ& XYZ2); void SetLinearForm (const Standard_Real A1, const gp_XYZ& XYZ1, const Standard_Real A2, const gp_XYZ& XYZ2);
//! <me> is set to the following linear form : //! <me> is set to the following linear form :
//! @code
//! A1 * XYZ1 + XYZ2 //! A1 * XYZ1 + XYZ2
//! @endcode
void SetLinearForm (const Standard_Real A1, const gp_XYZ& XYZ1, const gp_XYZ& XYZ2); void SetLinearForm (const Standard_Real A1, const gp_XYZ& XYZ1, const gp_XYZ& XYZ2);
//! <me> is set to the following linear form : //! <me> is set to the following linear form :
//! @code
//! XYZ1 + XYZ2 //! XYZ1 + XYZ2
//! @endcode
void SetLinearForm (const gp_XYZ& XYZ1, const gp_XYZ& XYZ2); void SetLinearForm (const gp_XYZ& XYZ1, const gp_XYZ& XYZ2);