0023330: Redundant copying in Geom2d_OffsetCurve::Geom2d_OffsetCurve method
[occt.git] / src / Geom2d / Geom2d_Vector.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 deferred class Vector from Geom2d inherits Geometry from Geom2d
25
26         --- Purpose :  The abstract class Vector describes the common
27         -- behavior of vectors in 2D space.
28         -- The Geom2d package provides two concrete
29         -- classes of vectors: Geom2d_Direction (unit vector)
30         -- and Geom2d_VectorWithMagnitude.
31
32 uses Ax2d  from gp, 
33      Pnt2d from gp,
34      Vec2d from gp
35
36 raises DomainError             from Standard,
37        VectorWithNullMagnitude from gp
38
39 is
40
41
42   Reverse (me : mutable);
43         --- Purpose : Reverses the vector <me>.
44
45
46   Reversed (me) returns mutable like me
47         --- Purpose : Returns a copy of <me> reversed.
48      is static;
49
50
51   Angle (me; Other : Vector)   returns Real
52         --- Purpose : Computes the angular value, in radians, between this
53         -- vector and vector Other. The result is a value
54         -- between -Pi and Pi. The orientation is from this
55         -- vector to vector Other.
56         --    Raises VectorWithNullMagnitude if one of the two vectors is a vector with
57         --  null magnitude because the angular value is indefinite.
58         raises VectorWithNullMagnitude;
59        
60   Coord (me; X, Y : out Real);
61         --- Purpose : Returns the coordinates of <me>.
62
63
64   Magnitude (me)  returns Real
65         --- Purpose : Returns the  Magnitude of <me>.
66      is deferred;
67
68
69   SquareMagnitude (me)  returns Real
70         --- Purpose : Returns the square magnitude of <me>.
71      is deferred;
72
73   
74   X (me)  returns Real;
75         --- Purpose : Returns the X coordinate of <me>.
76
77
78   Y (me)  returns Real;
79         --- Purpose : Returns the Y coordinate of <me>.
80
81
82   Crossed (me; Other : Vector)   returns Real
83         --- Purpose : Cross product of <me> with the vector <Other>.
84      is deferred;
85
86
87   Dot (me; Other : Vector)  returns Real;
88         --- Purpose : Returns the scalar product of 2 Vectors.
89
90
91   Vec2d (me)  returns Vec2d;
92         --- Purpose : Returns a non persistent copy of <me>.
93
94
95
96 fields
97
98   gpVec2d : Vec2d is protected;
99
100 end;