CR23683: Geom_BSplineSurface incorrectly determines continuity for periodic cases
[occt.git] / src / Geom2d / Geom2d_VectorWithMagnitude.cdl
1 -- Created on: 1993-03-24
2 -- Created by: JCV
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22
23
24
25 class VectorWithMagnitude from Geom2d inherits Vector from Geom2d
26
27         --- Purpose :
28         --  Defines a vector with magnitude.
29         --  A vector with magnitude can have a zero length.
30
31 uses Pnt2d     from gp,
32      Trsf2d    from gp,
33      Vec2d     from gp,
34      Geometry  from Geom2d
35
36 raises ConstructionError from Standard
37
38 is
39
40
41   Create (V : Vec2d) returns mutable VectorWithMagnitude;
42         --- Purpose : Creates a persistent copy of V.
43
44
45   Create (X, Y : Real)   returns mutable VectorWithMagnitude;
46         --- Purpose : Creates a vector with two cartesian coordinates. 
47
48
49   Create (P1, P2 : Pnt2d)   returns mutable VectorWithMagnitude;
50         --- Purpose :
51         --  Creates a vector from the point P1 to the point P2.
52         --  The magnitude of the vector is the distance between P1 and P2
53
54
55
56   SetCoord (me : mutable; X, Y : Real);
57         --- Purpose :  Set <me> to X, Y coordinates.
58
59
60   SetVec2d (me : mutable; V : Vec2d);
61         -- Purpose : Set <me> to V.X(), V.Y() coordinates.
62
63
64   SetX (me : mutable; X : Real);
65         --- Purpose : Changes the X coordinate of <me>.
66
67
68   SetY (me : mutable; Y : Real);
69         --- Purpose :  Changes the Y coordinate of <me>
70
71
72   Magnitude (me)  returns Real;
73         --- Purpose : Returns the magnitude of <me>.
74
75
76   SquareMagnitude (me)  returns Real;
77         --- Purpose : Returns the square magnitude of <me>.
78
79
80   Add (me : mutable; Other : Vector);
81         --- Purpose :
82         --  Adds the Vector Other to <me>.
83         ---C++: alias operator +=
84
85
86   Added (me; Other : Vector)  returns mutable VectorWithMagnitude
87         --- Purpose :
88         --  Adds the vector Other to <me>.
89         ---C++: alias operator +
90      is static;
91
92
93   Crossed (me; Other : Vector)  returns Real;
94         --- Purpose :
95         --  Computes the cross product  between <me> and Other 
96         --  <me> ^ Other. A new vector is returned.
97         ---C++: alias operator ^
98
99
100   Divide (me : mutable; Scalar : Real);
101         --- Purpose : Divides <me> by a scalar.
102         ---C++: alias operator /=
103
104
105   Divided (me; Scalar : Real)  returns mutable VectorWithMagnitude
106         --- Purpose :
107         --  Divides <me> by a scalar. A new vector is returned.
108         ---C++: alias operator /
109      is static;
110
111
112   Multiplied (me; Scalar : Real)  returns mutable VectorWithMagnitude
113         --- Purpose :
114         --  Computes the product of the vector <me> by a scalar.
115         --  A new vector is returned.
116         --  
117         --  -C++: alias operator * 
118         --  Collision with same operator defined for the class Vector!
119      is static;
120
121
122   Multiply (me : mutable; Scalar : Real);
123         --- Purpose : 
124         --  Computes the product of the vector <me> by a scalar.
125         ---C++: alias operator *=
126
127
128   Normalize (me : mutable)
129         --- Purpose : Normalizes <me>.
130      raises ConstructionError;
131         --- Purpose : 
132         --  Raised if the magnitude of the vector is lower or equal to
133         --  Resolution from package gp.
134
135
136   Normalized (me)  returns mutable VectorWithMagnitude
137         --- Purpose : Returns a copy of <me> Normalized.
138      raises ConstructionError
139         --- Purpose :
140         --  Raised if the magnitude of the vector is lower or equal to
141         --  Resolution from package gp.
142      is static;
143
144
145   Subtract (me : mutable; Other : Vector);
146         --- Purpose : Subtracts the Vector Other to <me>.
147         ---C++: alias operator -=
148
149
150   Subtracted (me; Other : Vector)  returns mutable VectorWithMagnitude
151         --- Purpose :
152         --  Subtracts the vector Other to <me>. A new vector is returned.
153         ---C++: alias operator -
154      is static;
155
156
157
158   Transform (me: mutable; T : Trsf2d);
159         ---Purpose: Applies the transformation T to this vector.
160
161
162   Copy (me)  returns mutable like me;
163         --- Purpose: Creates a new object which is a copy of this vector.    
164 end;
165
166