1 -- Created on: 1993-03-24
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public 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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 deferred class Vector from Geom2d inherits Geometry from Geom2d
19 --- Purpose : The abstract class Vector describes the common
20 -- behavior of vectors in 2D space.
21 -- The Geom2d package provides two concrete
22 -- classes of vectors: Geom2d_Direction (unit vector)
23 -- and Geom2d_VectorWithMagnitude.
29 raises DomainError from Standard,
30 VectorWithNullMagnitude from gp
35 Reverse (me : mutable);
36 --- Purpose : Reverses the vector <me>.
39 Reversed (me) returns mutable like me
40 --- Purpose : Returns a copy of <me> reversed.
44 Angle (me; Other : Vector) returns Real
45 --- Purpose : Computes the angular value, in radians, between this
46 -- vector and vector Other. The result is a value
47 -- between -Pi and Pi. The orientation is from this
48 -- vector to vector Other.
49 -- Raises VectorWithNullMagnitude if one of the two vectors is a vector with
50 -- null magnitude because the angular value is indefinite.
51 raises VectorWithNullMagnitude;
53 Coord (me; X, Y : out Real);
54 --- Purpose : Returns the coordinates of <me>.
57 Magnitude (me) returns Real
58 --- Purpose : Returns the Magnitude of <me>.
62 SquareMagnitude (me) returns Real
63 --- Purpose : Returns the square magnitude of <me>.
68 --- Purpose : Returns the X coordinate of <me>.
72 --- Purpose : Returns the Y coordinate of <me>.
75 Crossed (me; Other : Vector) returns Real
76 --- Purpose : Cross product of <me> with the vector <Other>.
80 Dot (me; Other : Vector) returns Real;
81 --- Purpose : Returns the scalar product of 2 Vectors.
84 Vec2d (me) returns Vec2d;
85 --- Purpose : Returns a non persistent copy of <me>.
91 gpVec2d : Vec2d is protected;