1 -- Created on: 1993-03-24
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
24 deferred class Vector from Geom2d inherits Geometry from Geom2d
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.
36 raises DomainError from Standard,
37 VectorWithNullMagnitude from gp
42 Reverse (me : mutable);
43 --- Purpose : Reverses the vector <me>.
46 Reversed (me) returns mutable like me
47 --- Purpose : Returns a copy of <me> reversed.
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;
60 Coord (me; X, Y : out Real);
61 --- Purpose : Returns the coordinates of <me>.
64 Magnitude (me) returns Real
65 --- Purpose : Returns the Magnitude of <me>.
69 SquareMagnitude (me) returns Real
70 --- Purpose : Returns the square magnitude of <me>.
75 --- Purpose : Returns the X coordinate of <me>.
79 --- Purpose : Returns the Y coordinate of <me>.
82 Crossed (me; Other : Vector) returns Real
83 --- Purpose : Cross product of <me> with the vector <Other>.
87 Dot (me; Other : Vector) returns Real;
88 --- Purpose : Returns the scalar product of 2 Vectors.
91 Vec2d (me) returns Vec2d;
92 --- Purpose : Returns a non persistent copy of <me>.
98 gpVec2d : Vec2d is protected;