0023330: Redundant copying in Geom2d_OffsetCurve::Geom2d_OffsetCurve method
[occt.git] / src / Geom2d / Geom2d_Direction.cdl
CommitLineData
b311480e 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
7fd59977 21
7fd59977 22
23class Direction from Geom2d inherits Vector from Geom2d
24
25 --- Purpose :
26 -- The class Direction specifies a vector that is never null.
27 -- It is a unit vector.
28
29
30uses Dir2d from gp,
31 Pnt2d from gp,
32 Trsf2d from gp,
33 Vec2d from gp,
34 Geometry from Geom2d
35
36raises ConstructionError from Standard
37
38is
39
40
41 Create (X, Y :Real) returns mutable Direction
42 --- Purpose : Creates a unit vector with it 2 cartesian coordinates.
43 raises ConstructionError;
44 --- Purpose :
45 -- Raised if Sqrt( X*X + Y*Y) <= Resolution from gp.
46
47 Create (V : Dir2d) returns mutable Direction;
48 --- Purpose : Creates a persistent copy of <me>.
49
50
51
52 SetCoord (me : mutable; X, Y : Real)
53 --- Purpose : Assigns the coordinates X and Y to this unit vector,
54 -- then normalizes it.
55 -- Exceptions
56 -- Standard_ConstructionError if Sqrt(X*X +
57 -- Y*Y) is less than or equal to gp::Resolution().
58 raises ConstructionError;
59
60
61 SetDir2d (me : mutable; V : Dir2d);
62 --- Purpose : Converts the gp_Dir2d unit vector V into this unit vector.
63
64
65 SetX (me : mutable; X : Real)
66 --- Purpose :
67 -- Assigns a value to the X coordinate of this unit vector, then normalizes it.
68 -- Exceptions
69 -- Standard_ConstructionError if the value assigned
70 -- causes the magnitude of the vector to become less
71 -- than or equal to gp::Resolution().
72 raises ConstructionError;
73
74
75 SetY (me : mutable; Y : Real)
76 --- Purpose : Assigns a value to the Y coordinate of this unit vector, then normalizes it.
77 -- Exceptions
78 -- Standard_ConstructionError if the value assigned
79 -- causes the magnitude of the vector to become less
80 -- than or equal to gp::Resolution().
81 raises ConstructionError;
82
83
84 Dir2d (me) returns Dir2d;
85 --- Purpose : Converts this unit vector into a gp_Dir2d unit vector.
86
87
88 Magnitude (me) returns Real;
89 --- Purpose : returns 1.0
90
91
92 SquareMagnitude (me) returns Real;
93 --- Purpose : returns 1.0
94
95
96 Crossed (me; Other : Vector) returns Real;
97 --- Purpose : Computes the cross product between <me> and <Other>.
98 ---C++: alias operator ^
99
100
101 Transform (me : mutable; T : Trsf2d);
102
103 ---Purpose: Applies the transformation T to this unit vector, then normalizes it.
104
105
106 Copy (me) returns mutable like me;
107 ---Purpose: Creates a new object which is a copy of this unit vector.
108end;
109