0024830: Remove redundant keyword 'mutable' in CDL declarations
[occt.git] / src / Geom / Geom_VectorWithMagnitude.cdl
1 -- Created on: 1993-03-10
2 -- Created by: JCV
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class VectorWithMagnitude from Geom inherits Vector from Geom
18
19         ---Purpose :
20         --  Defines a vector with magnitude.
21         --  A vector with magnitude can have a zero length.
22
23 uses Pnt       from gp,
24      Trsf      from gp,
25      Vec       from gp,
26      Geometry  from Geom
27
28 raises ConstructionError from Standard
29
30 is
31
32   Create (V : Vec) returns VectorWithMagnitude;
33         ---Purpose : Creates a transient copy of V.
34
35
36   Create (X, Y, Z : Real)   returns VectorWithMagnitude;
37         ---Purpose : Creates a vector with three cartesian coordinates. 
38
39
40   Create (P1, P2 : Pnt)   returns VectorWithMagnitude;
41         ---Purpose :
42         --  Creates a vector from the point P1 to the point P2.
43         --  The magnitude of the vector is the distance between P1 and P2
44
45
46
47
48   SetCoord (me : mutable; X, Y, Z : Real);
49         ---Purpose :  Assigns the values X, Y and Z to the coordinates of this vector.
50
51
52   SetVec (me : mutable; V : Vec);
53         --- Purpose :  Converts the gp_Vec vector V into this vector.
54
55   SetX (me : mutable; X : Real);
56         ---Purpose : Changes the X coordinate of <me>.
57
58
59   SetY (me : mutable; Y : Real);
60         ---Purpose :  Changes the Y coordinate of <me>
61
62
63   SetZ (me : mutable; Z : Real);
64         ---Purpose : Changes the Z coordinate of <me>.
65
66
67   Magnitude (me)  returns Real;
68         ---Purpose : Returns the magnitude of <me>.
69
70
71   SquareMagnitude (me)  returns Real;
72         ---Purpose : Returns the square magnitude of <me>.
73
74
75   Add (me : mutable; Other : Vector);
76         ---Purpose :
77         --  Adds the Vector Other to <me>.
78
79
80   Added (me; Other : Vector)  returns VectorWithMagnitude
81         ---Purpose :
82         --  Adds the vector Other to <me>.
83
84      is static;
85
86
87   Cross (me : mutable; Other : Vector);
88         ---Purpose :
89         --  Computes the cross product  between <me> and Other
90         --  <me> ^ Other.
91
92
93   Crossed (me; Other : Vector)  returns like me
94         ---Purpose :
95         --  Computes the cross product  between <me> and Other 
96         --  <me> ^ Other. A new vector is returned.
97      is static;
98
99
100   CrossCross (me : mutable; V1, V2 : Vector);
101         ---Purpose : 
102         --  Computes the triple vector product  <me> ^ (V1 ^ V2).
103
104
105   CrossCrossed (me; V1, V2 : Vector)   returns like me
106         ---Purpose :
107         --  Computes the triple vector product  <me> ^ (V1 ^ V2).
108         --  A new vector is returned.
109      is static;
110
111
112   Divide (me : mutable; Scalar : Real);
113         ---Purpose : Divides <me> by a scalar.
114
115
116   Divided (me; Scalar : Real)  returns VectorWithMagnitude
117         ---Purpose :
118         --  Divides <me> by a scalar. A new vector is returned.
119      is static;
120
121
122   Multiplied (me; Scalar : Real)  returns VectorWithMagnitude
123         ---Purpose :
124         --  Computes the product of the vector <me> by a scalar.
125         --  A new vector is returned.
126
127      is static;
128
129
130   Multiply (me : mutable; Scalar : Real);
131         ---Purpose : 
132         --  Computes the product of the vector <me> by a scalar.
133
134   Normalize (me : mutable)
135         ---Purpose : Normalizes <me>.
136      raises ConstructionError;
137         ---Purpose : 
138         --  Raised if the magnitude of the vector is lower or equal to
139         --  Resolution from package gp.
140
141
142   Normalized (me)  returns VectorWithMagnitude
143         ---Purpose : Returns a copy of <me> Normalized.
144      raises ConstructionError
145         ---Purpose :
146         --  Raised if the magnitude of the vector is lower or equal to
147         --  Resolution from package gp.
148      is static;
149
150
151   Subtract (me : mutable; Other : Vector);
152         ---Purpose : Subtracts the Vector Other to <me>.
153
154
155   Subtracted (me; Other : Vector)  returns VectorWithMagnitude
156         ---Purpose :
157         --  Subtracts the vector Other to <me>. A new vector is returned.
158
159      is static;
160
161
162
163   Transform (me: mutable; T : Trsf);
164
165         ---Purpose: Applies the transformation T to this vector.
166
167
168   Copy (me)  returns like me;
169         ---Purpose: Creates a new object which is a copy of this vector.
170
171 end;