diff --git a/src/gp/gp_Elips.hxx b/src/gp/gp_Elips.hxx index 0d8019eac5..11e3789b56 100644 --- a/src/gp/gp_Elips.hxx +++ b/src/gp/gp_Elips.hxx @@ -43,7 +43,9 @@ class gp_Vec; //! This coordinate system is the "local coordinate system" //! of the ellipse. In this coordinate system, the equation of //! the ellipse is: +//! @code //! X*X / (MajorRadius**2) + Y*Y / (MinorRadius**2) = 1.0 +//! @endcode //! The "main Direction" of the local coordinate system gives //! the normal vector to the plane of the ellipse. This vector //! gives an implicit orientation to the ellipse (definition of the diff --git a/src/gp/gp_Elips2d.hxx b/src/gp/gp_Elips2d.hxx index 51ac622da5..0a1dc05660 100644 --- a/src/gp/gp_Elips2d.hxx +++ b/src/gp/gp_Elips2d.hxx @@ -44,7 +44,9 @@ class gp_Vec2d; //! of the ellipse. Its orientation (direct or indirect) gives an //! implicit orientation to the ellipse. In this coordinate //! system, the equation of the ellipse is: +//! @code //! X*X / (MajorRadius**2) + Y*Y / (MinorRadius**2) = 1.0 +//! @endcode //! See Also //! gce_MakeElips2d which provides functions for more //! complex ellipse constructions diff --git a/src/gp/gp_GTrsf.hxx b/src/gp/gp_GTrsf.hxx index 8a1118da42..7bfde6c8d6 100644 --- a/src/gp/gp_GTrsf.hxx +++ b/src/gp/gp_GTrsf.hxx @@ -41,34 +41,29 @@ class gp_Ax2; //! Defines a non-persistent transformation in 3D space. //! 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. //! -//! With a Gtrsf you can transform only a triplet of coordinates -//! XYZ. It is not possible to transform other geometric objects -//! because these transformations can change the nature of non- -//! elementary geometric objects. -//! The transformation GTrsf can be represented as follow : -//! -//! V1 V2 V3 T XYZ XYZ +//! With a gp_GTrsf you can transform only a triplet of coordinates gp_XYZ. +//! It is not possible to transform other geometric objects +//! because these transformations can change the nature of non-elementary geometric objects. +//! The transformation gp_GTrsf can be represented as follow: +//! @code +//! V1 V2 V3 T XYZ XYZ //! | a11 a12 a13 a14 | | x | | x'| //! | a21 a22 a23 a24 | | y | | y'| //! | a31 a32 a33 a34 | | z | = | z'| //! | 0 0 0 1 | | 1 | | 1 | -//! +//! @endcode //! where {V1, V2, V3} define the vectorial part of the -//! transformation and T defines the translation part of the -//! transformation. +//! transformation and T defines the translation part of the transformation. //! Warning -//! A GTrsf transformation is only applicable to -//! coordinates. Be careful if you apply such a -//! transformation to all points of a geometric object, as -//! this can change the nature of the object and thus -//! render it incoherent! -//! Typically, a circle is transformed into an ellipse by an -//! 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. +//! A gp_GTrsf transformation is only applicable to coordinates. +//! Be careful if you apply such a transformation to all points of a geometric object, +//! as this can change the nature of the object and thus render it incoherent! +//! Typically, a circle is transformed into an ellipse by an 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 { public: @@ -153,10 +148,12 @@ public: //! verify and set the shape of the GTrsf Other or CompoundTrsf //! Ex : + //! @code //! myGTrsf.SetValue(row1,col1,val1); //! myGTrsf.SetValue(row2,col2,val2); //! ... //! myGTrsf.SetForm(); + //! @endcode Standard_EXPORT void SetForm(); //! Returns the translation part of the GTrsf. @@ -188,16 +185,18 @@ public: //! Computes the transformation composed from T and . //! In a C++ implementation you can also write Tcomposed = * T. //! Example : - //! GTrsf T1, T2, Tcomp; ............... + //! @code + //! gp_GTrsf T1, T2, Tcomp; ............... //! //composition : //! Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1) //! // transformation of a point - //! XYZ P(10.,3.,4.); - //! XYZ P1(P); + //! gp_XYZ P(10.,3.,4.); + //! gp_XYZ P1(P); //! Tcomp.Transforms(P1); //using Tcomp - //! XYZ P2(P); + //! gp_XYZ P2(P); //! T1.Transforms(P2); //using T1 then T2 //! T2.Transforms(P2); // P1 = P2 !!! + //! @endcode Standard_NODISCARD gp_GTrsf Multiplied (const gp_GTrsf& T) const; Standard_NODISCARD gp_GTrsf operator * (const gp_GTrsf& T) const { diff --git a/src/gp/gp_GTrsf2d.hxx b/src/gp/gp_GTrsf2d.hxx index e0dc5a512e..2497f6fbd7 100644 --- a/src/gp/gp_GTrsf2d.hxx +++ b/src/gp/gp_GTrsf2d.hxx @@ -36,34 +36,28 @@ class gp_Ax2d; //! Defines a non persistent transformation in 2D space. //! This transformation is a general transformation. -//! It can be a Trsf2d from package gp, an affinity, or you can -//! define your own transformation giving the corresponding -//! matrix of transformation. +//! It can be a gp_Trsf2d, an affinity, or you can +//! define your own transformation giving the corresponding matrix of transformation. //! -//! With a GTrsf2d you can transform only a doublet of coordinates -//! XY. It is not possible to transform other geometric objects -//! because these transformations can change the nature of non- -//! elementary geometric objects. -//! A GTrsf2d is represented with a 2 rows * 3 columns matrix : -//! -//! V1 V2 T XY XY +//! With a gp_GTrsf2d you can transform only a doublet of coordinates gp_XY. +//! It is not possible to transform other geometric objects +//! because these transformations can change the nature of non-elementary geometric objects. +//! A gp_GTrsf2d is represented with a 2 rows * 3 columns matrix: +//! @code +//! V1 V2 T XY XY //! | a11 a12 a14 | | x | | x'| -//! | a21 a22 a24 | | y | | y'| +//! | a21 a22 a24 | | y | = | y'| //! | 0 0 1 | | 1 | | 1 | -//! +//! @endcode //! where {V1, V2} defines the vectorial part of the -//! transformation and T defines the translation part of -//! the transformation. +//! transformation and T defines the translation part of the transformation. //! Warning -//! A GTrsf2d transformation is only applicable on -//! coordinates. Be careful if you apply such a -//! transformation to all the points of a geometric object, -//! as this can change the nature of the object and thus -//! render it incoherent! -//! Typically, a circle is transformed into an ellipse by an -//! 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. +//! A gp_GTrsf2d transformation is only applicable on coordinates. +//! Be careful if you apply such a transformation to all the points of a geometric object, +//! as this can change the nature of the object and thus render it incoherent! +//! Typically, a circle is transformed into an ellipse by an 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 { public: @@ -98,7 +92,7 @@ public: //! 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); - //! Replacesthe translation part of this + //! Replaces the translation part of this //! transformation by the coordinates of the number pair Coord. Standard_EXPORT void SetTranslationPart (const gp_XY& Coord); @@ -162,16 +156,18 @@ public: //! Computes the transformation composed with T and . //! In a C++ implementation you can also write Tcomposed = * T. //! Example : - //! GTrsf2d T1, T2, Tcomp; ............... + //! @code + //! gp_GTrsf2d T1, T2, Tcomp; ............... //! //composition : //! Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1) //! // transformation of a point - //! XY P(10.,3.); - //! XY P1(P); + //! gp_XY P(10.,3.); + //! gp_XY P1(P); //! Tcomp.Transforms(P1); //using Tcomp - //! XY P2(P); + //! gp_XY P2(P); //! T1.Transforms(P2); //using T1 then T2 //! T2.Transforms(P2); // P1 = P2 !!! + //! @endcode Standard_NODISCARD gp_GTrsf2d Multiplied (const gp_GTrsf2d& T) const; Standard_NODISCARD gp_GTrsf2d operator * (const gp_GTrsf2d& T) const { diff --git a/src/gp/gp_Hypr.hxx b/src/gp/gp_Hypr.hxx index 0be01c5c23..df74b3158a 100644 --- a/src/gp/gp_Hypr.hxx +++ b/src/gp/gp_Hypr.hxx @@ -57,7 +57,7 @@ class gp_Vec; //! and in it, the respective positions of the three branches of //! hyperbolas constructed with the functions OtherBranch, //! ConjugateBranch1, and ConjugateBranch2: -//! +//! @code //! ^YAxis //! | //! FirstConjugateBranch @@ -69,6 +69,7 @@ class gp_Vec; //! | //! SecondConjugateBranch //! | ^YAxis +//! @endcode //! Warning //! The major radius can be less than the minor radius. //! See Also diff --git a/src/gp/gp_Hypr2d.hxx b/src/gp/gp_Hypr2d.hxx index ae69a6bb5e..b960981b52 100644 --- a/src/gp/gp_Hypr2d.hxx +++ b/src/gp/gp_Hypr2d.hxx @@ -53,6 +53,7 @@ class gp_Vec2d; //! and in it, the respective positions of the three branches of //! hyperbolas constructed with the functions OtherBranch, //! ConjugateBranch1, and ConjugateBranch2: +//! @code //! ^YAxis //! | //! FirstConjugateBranch @@ -64,7 +65,7 @@ class gp_Vec2d; //! | //! SecondConjugateBranch //! | -//! +//! @endcode //! Warning //! The major radius can be less than the minor radius. //! See Also diff --git a/src/gp/gp_Mat.hxx b/src/gp/gp_Mat.hxx index ce5433bf53..c51c0393c1 100644 --- a/src/gp/gp_Mat.hxx +++ b/src/gp/gp_Mat.hxx @@ -72,9 +72,11 @@ public: //! Modifies the main diagonal of the matrix. + //! @code //! .Value (1, 1) = X1 //! .Value (2, 2) = X2 //! .Value (3, 3) = X3 + //! @endcode //! The other coefficients of the matrix are not modified. 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 //! a scaling transformation, where S is the scale factor. : - //! | S 0.0 0.0 | + //! @code + //! | S 0.0 0.0 | //! = | 0.0 S 0.0 | - //! | 0.0 0.0 S | + //! | 0.0 0.0 S | + //! @endcode void SetScale (const Standard_Real S); //! Assigns to the coefficient of row Row, column Col of this matrix. diff --git a/src/gp/gp_Mat2d.hxx b/src/gp/gp_Mat2d.hxx index f4a1dc69bd..83c2bd8316 100644 --- a/src/gp/gp_Mat2d.hxx +++ b/src/gp/gp_Mat2d.hxx @@ -56,8 +56,10 @@ public: //! Modifies the main diagonal of the matrix. + //! @code //! .Value (1, 1) = X1 //! .Value (2, 2) = X2 + //! @endcode //! The other coefficients of the matrix are not modified. void SetDiagonal (const Standard_Real X1, const Standard_Real X2); @@ -65,7 +67,7 @@ public: 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. void SetRotation (const Standard_Real Ang); @@ -79,8 +81,10 @@ public: //! Modifies the matrix such that it //! represents a scaling transformation, where S is the scale factor : - //! | S 0.0 | + //! @code + //! | S 0.0 | //! = | 0.0 S | + //! @endcode void SetScale (const Standard_Real S); //! Assigns 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 //! Other.for each coefficient of the matrix : + //! @code //! .Coef(i,j) + .Coef(i,j) + //! @endcode //! Note: //! - operator += assigns the result to this matrix, while //! - operator + creates a new one. @@ -212,7 +218,9 @@ public: //! Computes for each coefficient of the matrix : + //! @code //! .Coef(i,j) - .Coef(i,j) + //! @endcode Standard_NODISCARD gp_Mat2d Subtracted (const gp_Mat2d& Other) const; Standard_NODISCARD gp_Mat2d operator - (const gp_Mat2d& Other) const { diff --git a/src/gp/gp_Parab.hxx b/src/gp/gp_Parab.hxx index 05e02b6a01..120697c99d 100644 --- a/src/gp/gp_Parab.hxx +++ b/src/gp/gp_Parab.hxx @@ -45,7 +45,9 @@ class gp_Vec; //! coordinate system define the plane of the parabola. //! The equation of the parabola in this coordinate system, //! which is the "local coordinate system" of the parabola, is: +//! @code //! Y**2 = (2*P) * X. +//! @endcode //! where P, referred to as the parameter of the parabola, is //! the distance between the focus and the directrix (P is //! twice the focal length). diff --git a/src/gp/gp_Parab2d.hxx b/src/gp/gp_Parab2d.hxx index 3d5da44c77..c322f04a0f 100644 --- a/src/gp/gp_Parab2d.hxx +++ b/src/gp/gp_Parab2d.hxx @@ -44,7 +44,9 @@ class gp_Vec2d; //! of the parabola. Its orientation (direct or indirect sense) //! gives an implicit orientation to the parabola. //! In this coordinate system, the equation for the parabola is: +//! @code //! Y**2 = (2*P) * X. +//! @endcode //! where P, referred to as the parameter of the parabola, is //! the distance between the focus and the directrix (P is //! twice the focal length). @@ -126,7 +128,9 @@ public: //! Computes the coefficients of the implicit equation of the parabola //! (in WCS - World Coordinate System). + //! @code //! 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_Real& C, Standard_Real& D, Standard_Real& E, Standard_Real& F) const; diff --git a/src/gp/gp_Pln.hxx b/src/gp/gp_Pln.hxx index 5ac20a3f8c..0099564310 100644 --- a/src/gp/gp_Pln.hxx +++ b/src/gp/gp_Pln.hxx @@ -82,13 +82,17 @@ public: //! Creates a plane from its cartesian equation : + //! @code //! A * X + B * Y + C * Z + D = 0.0 + //! @endcode //! 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); //! Returns the coefficients of the plane's cartesian equation : + //! @code //! A * X + B * Y + C * Z + D = 0. + //! @endcode 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 diff --git a/src/gp/gp_Quaternion.hxx b/src/gp/gp_Quaternion.hxx index dd5b5c98da..958227ad19 100644 --- a/src/gp/gp_Quaternion.hxx +++ b/src/gp/gp_Quaternion.hxx @@ -28,12 +28,12 @@ class gp_Vec; 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 //! quaternion mathematics. //! //! 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) 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. + //! @code //! qq' = (cross(v,v') + wv' + w'v, ww' - dot(v,v')) + //! @endcode //! Result is rotation combination: q' than q (here q=this, q'=theQ). - //! Notices than: + //! Notices that: + //! @code //! qq' != q'q; //! qq^-1 = q; + //! @endcode Standard_NODISCARD gp_Quaternion Multiplied (const gp_Quaternion& theOther) const; Standard_NODISCARD gp_Quaternion operator * (const gp_Quaternion& theOther) const { 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 operator += (const gp_Quaternion& 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 operator -= (const gp_Quaternion& theOther) { diff --git a/src/gp/gp_Sphere.hxx b/src/gp/gp_Sphere.hxx index 5b6f70034c..17cd6e5a15 100644 --- a/src/gp/gp_Sphere.hxx +++ b/src/gp/gp_Sphere.hxx @@ -84,14 +84,16 @@ public: void SetRadius (const Standard_Real R); - //! Computes the aera of the sphere. + //! Computes the area of the sphere. Standard_Real Area() const; //! Computes the coefficients of the implicit equation of the quadric //! 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) + //! 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; //! Reverses the U parametrization of the sphere diff --git a/src/gp/gp_Torus.hxx b/src/gp/gp_Torus.hxx index 823f3deac6..a82cabc933 100644 --- a/src/gp/gp_Torus.hxx +++ b/src/gp/gp_Torus.hxx @@ -130,6 +130,7 @@ public: //! Computes the coefficients of the implicit equation of the surface //! in the absolute Cartesian coordinate system: + //! @code //! 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(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(32) * X + Coef(33) * Y + Coef(34) * Z + //! Coef(35) = 0.0 + //! @endcode //! Raises DimensionError if the length of Coef is lower than 35. Standard_EXPORT void Coefficients (TColStd_Array1OfReal& Coef) const; diff --git a/src/gp/gp_Trsf.hxx b/src/gp/gp_Trsf.hxx index 1625ac7b45..98cb90ac1d 100644 --- a/src/gp/gp_Trsf.hxx +++ b/src/gp/gp_Trsf.hxx @@ -50,13 +50,13 @@ class gp_Vec; //! previous elementary transformations using the method //! Multiply. //! The transformations can be represented as follow : -//! -//! V1 V2 V3 T XYZ XYZ +//! @code +//! V1 V2 V3 T XYZ XYZ //! | a11 a12 a13 a14 | | x | | x'| //! | a21 a22 a23 a24 | | y | | y'| //! | a31 a32 a33 a34 | | z | = | z'| //! | 0 0 0 1 | | 1 | | 1 | -//! +//! @endcode //! where {V1, V2, V3} defines the vectorial part of the //! transformation and T defines the translation part of the //! transformation. @@ -156,16 +156,16 @@ public: //! The transformation is from the coordinate //! system "FromSystem1" to the coordinate system "ToSystem2". //! Example : - //! In a C++ implementation : - //! Real 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 - //! // local system ToSystem2 + //! @code + //! gp_Ax3 FromSystem1, ToSystem2; + //! double x1, y1, z1; // are the coordinates of a point in the local system FromSystem1 + //! double x2, y2, z2; // are the coordinates of a point in the local system ToSystem2 //! gp_Pnt P1 (x1, y1, z1) - //! Trsf T; + //! gp_Trsf T; //! T.SetTransformation (FromSystem1, ToSystem2); //! gp_Pnt P2 = P1.Transformed (T); //! P2.Coord (x2, y2, z2); + //! @endcode Standard_EXPORT void SetTransformation (const gp_Ax3& FromSystem1, const gp_Ax3& ToSystem2); //! Modifies this transformation so that it transforms the @@ -174,7 +174,9 @@ public: //! are relative to a target coordinate system, but which //! represent the same point //! 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.) } + //! @endcode //! to the local coordinate system defined with the Ax3 ToSystem. //! Use in the same way as the previous method. FromSystem1 is //! defaulted to the absolute coordinate system. @@ -206,11 +208,11 @@ public: //! Sets the coefficients of the transformation. The //! transformation of the point x,y,z is the point //! x',y',z' with : - //! + //! @code //! x' = a11 x + a12 y + a13 z + a14 //! y' = a21 x + a22 y + a23 z + a24 //! z' = a31 x + a32 y + a33 z + a34 - //! + //! @endcode //! The method Value(i,j) will return aij. //! Raises ConstructionError if the determinant of the aij is null. //! The matrix is orthogonalized before future using. @@ -279,12 +281,14 @@ public: //! Computes the transformation composed with T and . //! In a C++ implementation you can also write Tcomposed = * T. //! Example : - //! Trsf T1, T2, Tcomp; ............... + //! @code + //! gp_Trsf T1, T2, Tcomp; ............... //! Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1) - //! Pnt P1(10.,3.,4.); - //! Pnt P2 = P1.Transformed(Tcomp); //using Tcomp - //! Pnt P3 = P1.Transformed(T1); //using T1 then T2 + //! gp_Pnt P1(10.,3.,4.); + //! gp_Pnt P2 = P1.Transformed(Tcomp); // using Tcomp + //! gp_Pnt P3 = P1.Transformed(T1); // using T1 then T2 //! P3.Transform(T2); // P3 = P2 !!! + //! @endcode Standard_NODISCARD gp_Trsf Inverted() const; Standard_NODISCARD gp_Trsf Multiplied (const gp_Trsf& T) const; diff --git a/src/gp/gp_Trsf2d.hxx b/src/gp/gp_Trsf2d.hxx index acc60edb86..99033bf246 100644 --- a/src/gp/gp_Trsf2d.hxx +++ b/src/gp/gp_Trsf2d.hxx @@ -39,17 +39,17 @@ class gp_Mat2d; //! Defines a non-persistent transformation in 2D space. //! The following transformations are implemented : -//! . Translation, Rotation, Scale -//! . Symmetry with respect to a point and a line. +//! - Translation, Rotation, Scale +//! - Symmetry with respect to a point and a line. //! Complex transformations can be obtained by combining the //! previous elementary transformations using the method Multiply. //! The transformations can be represented as follow : -//! -//! V1 V2 T XY XY +//! @code +//! V1 V2 T XY XY //! | a11 a12 a13 | | x | | x'| //! | a21 a22 a23 | | y | | y'| //! | 0 0 1 | | 1 | | 1 | -//! +//! @endcode //! where {V1, V2} defines the vectorial part of the transformation //! and T defines the translation part of the transformation. //! 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 //! transformation of the point x,y is the point //! x',y' with : - //! + //! @code //! x' = a11 x + a12 y + a13 //! y' = a21 x + a22 y + a23 - //! + //! @endcode //! The method Value(i,j) will return aij. //! 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. diff --git a/src/gp/gp_XY.hxx b/src/gp/gp_XY.hxx index 254fce65f9..ecf51eb607 100644 --- a/src/gp/gp_XY.hxx +++ b/src/gp/gp_XY.hxx @@ -98,8 +98,10 @@ public: 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 + //! @code //! .X() = .X() + Other.X() //! .Y() = .Y() + Other.Y() + //! @endcode void Add (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 + //! @code //! new.X() = .X() + Other.X() //! new.Y() = .Y() + Other.Y() + //! @endcode Standard_NODISCARD gp_XY Added (const gp_XY& Other) const; Standard_NODISCARD gp_XY operator + (const gp_XY& Other) const { @@ -116,7 +120,9 @@ public: } - //! Real D = .X() * Other.Y() - .Y() * Other.X() + //! @code + //! double D = .X() * Other.Y() - .Y() * Other.X() + //! @endcode Standard_NODISCARD Standard_Real Crossed (const gp_XY& Right) const; Standard_NODISCARD Standard_Real operator ^ (const gp_XY& Right) const { @@ -155,71 +161,84 @@ public: } + //! @code //! .X() = .X() * Scalar; //! .Y() = .Y() * Scalar; + //! @endcode void Multiply (const Standard_Real Scalar); void operator *= (const Standard_Real Scalar) { Multiply(Scalar); } - + //! @code //! .X() = .X() * Other.X(); //! .Y() = .Y() * Other.Y(); + //! @endcode void Multiply (const gp_XY& Other); void operator *= (const gp_XY& Other) { Multiply(Other); } - + + //! @code //! = Matrix * + //! @endcode void Multiply (const gp_Mat2d& Matrix); void operator *= (const gp_Mat2d& Matrix) { Multiply(Matrix); } - + //! @code //! New.X() = .X() * Scalar; //! New.Y() = .Y() * Scalar; + //! @endcode Standard_NODISCARD gp_XY Multiplied (const Standard_Real Scalar) const; Standard_NODISCARD gp_XY operator * (const Standard_Real Scalar) const { return Multiplied(Scalar); } - + //! @code //! new.X() = .X() * Other.X(); //! new.Y() = .Y() * Other.Y(); + //! @endcode Standard_NODISCARD gp_XY Multiplied (const gp_XY& Other) const; - + + //! @code //! New = Matrix * + //! @endcode Standard_NODISCARD gp_XY Multiplied (const gp_Mat2d& Matrix) const; Standard_NODISCARD gp_XY operator * (const gp_Mat2d& Matrix) const { return Multiplied(Matrix); } - + //! @code //! .X() = .X()/ .Modulus() //! .Y() = .Y()/ .Modulus() + //! @endcode //! Raises ConstructionError if .Modulus() <= Resolution from gp void Normalize(); - + //! @code //! New.X() = .X()/ .Modulus() //! New.Y() = .Y()/ .Modulus() + //! @endcode //! Raises ConstructionError if .Modulus() <= Resolution from gp Standard_NODISCARD gp_XY Normalized() const; - + //! @code //! .X() = -.X() //! .Y() = -.Y() + //! @endcode void Reverse(); - + //! @code //! New.X() = -.X() //! New.Y() = -.Y() + //! @endcode Standard_NODISCARD gp_XY Reversed() const; Standard_NODISCARD gp_XY operator -() const { @@ -229,39 +248,49 @@ public: //! Computes the following linear combination and //! assigns the result to this number pair: + //! @code //! A1 * XY1 + A2 * XY2 + //! @endcode void SetLinearForm (const Standard_Real A1, const gp_XY& XY1, const Standard_Real A2, const gp_XY& XY2); //! -- Computes the following linear combination and //! assigns the result to this number pair: + //! @code //! 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); //! Computes the following linear combination and //! assigns the result to this number pair: + //! @code //! A1 * XY1 + XY2 + //! @endcode void SetLinearForm (const Standard_Real A1, const gp_XY& XY1, const gp_XY& XY2); //! Computes the following linear combination and //! assigns the result to this number pair: + //! @code //! XY1 + XY2 + //! @endcode void SetLinearForm (const gp_XY& XY1, const gp_XY& XY2); - + //! @code //! .X() = .X() - Other.X() //! .Y() = .Y() - Other.Y() + //! @endcode void Subtract (const gp_XY& Right); void operator -= (const gp_XY& Right) { Subtract(Right); } - + //! @code //! new.X() = .X() - Other.X() //! new.Y() = .Y() - Other.Y() + //! @endcode Standard_NODISCARD gp_XY Subtracted (const gp_XY& Right) const; Standard_NODISCARD gp_XY operator - (const gp_XY& Right) const { diff --git a/src/gp/gp_XYZ.hxx b/src/gp/gp_XYZ.hxx index 0612f5455f..ecd05845bb 100644 --- a/src/gp/gp_XYZ.hxx +++ b/src/gp/gp_XYZ.hxx @@ -119,40 +119,44 @@ public: //! abs(.Z() - Other.Z()) <= Tolerance. Standard_EXPORT Standard_Boolean IsEqual (const gp_XYZ& Other, const Standard_Real Tolerance) const; - + //! @code //! .X() = .X() + Other.X() //! .Y() = .Y() + Other.Y() //! .Z() = .Z() + Other.Z() + //! @endcode void Add (const gp_XYZ& Other); void operator += (const gp_XYZ& Other) { Add(Other); } - + //! @code //! new.X() = .X() + Other.X() //! new.Y() = .Y() + Other.Y() //! new.Z() = .Z() + Other.Z() + //! @endcode Standard_NODISCARD gp_XYZ Added (const gp_XYZ& Other) const; Standard_NODISCARD gp_XYZ operator + (const gp_XYZ& Other) const { return Added(Other); } - + //! @code //! .X() = .Y() * Other.Z() - .Z() * Other.Y() //! .Y() = .Z() * Other.X() - .X() * Other.Z() //! .Z() = .X() * Other.Y() - .Y() * Other.X() + //! @endcode void Cross (const gp_XYZ& Right); void operator ^= (const gp_XYZ& Right) { Cross(Right); } - + //! @code //! new.X() = .Y() * Other.Z() - .Z() * Other.Y() //! new.Y() = .Z() * Other.X() - .X() * Other.Z() //! new.Z() = .X() * Other.Y() - .Y() * Other.X() + //! @endcode Standard_NODISCARD gp_XYZ Crossed (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 Standard_Real DotCross (const gp_XYZ& Coord1, const gp_XYZ& Coord2) const; - + //! @code //! .X() = .X() * Scalar; //! .Y() = .Y() * Scalar; //! .Z() = .Z() * Scalar; + //! @endcode void Multiply (const Standard_Real Scalar); void operator *= (const Standard_Real Scalar) { Multiply(Scalar); } - + //! @code //! .X() = .X() * Other.X(); //! .Y() = .Y() * Other.Y(); //! .Z() = .Z() * Other.Z(); + //! @endcode void Multiply (const gp_XYZ& Other); void operator *= (const gp_XYZ& Other) { Multiply(Other); } - + + //! @code //! = Matrix * + //! @endcode void Multiply (const gp_Mat& Matrix); void operator *= (const gp_Mat& Matrix) { Multiply(Matrix); } - + //! @code //! New.X() = .X() * Scalar; //! New.Y() = .Y() * Scalar; //! New.Z() = .Z() * Scalar; + //! @endcode Standard_NODISCARD gp_XYZ Multiplied (const Standard_Real Scalar) const; Standard_NODISCARD gp_XYZ operator * (const Standard_Real Scalar) const { return Multiplied(Scalar); } - + //! @code //! new.X() = .X() * Other.X(); //! new.Y() = .Y() * Other.Y(); //! new.Z() = .Z() * Other.Z(); + //! @endcode Standard_NODISCARD gp_XYZ Multiplied (const gp_XYZ& Other) const; - + + //! @code //! New = Matrix * + //! @endcode Standard_NODISCARD gp_XYZ Multiplied (const gp_Mat& Matrix) const; Standard_NODISCARD gp_XYZ operator * (const gp_Mat& Matrix) const { return Multiplied(Matrix); } - + //! @code //! .X() = .X()/ .Modulus() //! .Y() = .Y()/ .Modulus() //! .Z() = .Z()/ .Modulus() + //! @endcode //! Raised if .Modulus() <= Resolution from gp void Normalize(); - + //! @code //! New.X() = .X()/ .Modulus() //! New.Y() = .Y()/ .Modulus() //! New.Z() = .Z()/ .Modulus() + //! @endcode //! Raised if .Modulus() <= Resolution from gp Standard_NODISCARD gp_XYZ Normalized() const; - + //! @code //! .X() = -.X() //! .Y() = -.Y() //! .Z() = -.Z() + //! @endcode void Reverse(); - + //! @code //! New.X() = -.X() //! New.Y() = -.Y() //! New.Z() = -.Z() + //! @endcode Standard_NODISCARD gp_XYZ Reversed() const; - + //! @code //! .X() = .X() - Other.X() //! .Y() = .Y() - Other.Y() //! .Z() = .Z() - Other.Z() + //! @endcode void Subtract (const gp_XYZ& Right); void operator -= (const gp_XYZ& Right) { Subtract(Right); } - + //! @code //! new.X() = .X() - Other.X() //! new.Y() = .Y() - Other.Y() //! new.Z() = .Z() - Other.Z() + //! @endcode Standard_NODISCARD gp_XYZ Subtracted (const gp_XYZ& Right) const; Standard_NODISCARD gp_XYZ operator - (const gp_XYZ& Right) const { @@ -299,32 +317,44 @@ public: //! is set to the following linear form : + //! @code //! 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); //! is set to the following linear form : + //! @code //! 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); //! is set to the following linear form : + //! @code //! 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); //! is set to the following linear form : + //! @code //! A1 * XYZ1 + A2 * XYZ2 + //! @endcode void SetLinearForm (const Standard_Real A1, const gp_XYZ& XYZ1, const Standard_Real A2, const gp_XYZ& XYZ2); //! is set to the following linear form : + //! @code //! A1 * XYZ1 + XYZ2 + //! @endcode void SetLinearForm (const Standard_Real A1, const gp_XYZ& XYZ1, const gp_XYZ& XYZ2); //! is set to the following linear form : + //! @code //! XYZ1 + XYZ2 + //! @endcode void SetLinearForm (const gp_XYZ& XYZ1, const gp_XYZ& XYZ2);