summaryrefslogtreecommitdiff
path: root/inc/Geom2d_Direction.hxx
blob: 64f3709312cc23efe46fd75e460a3903bec49ece (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _Geom2d_Direction_HeaderFile
#define _Geom2d_Direction_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_Geom2d_Direction_HeaderFile
#include <Handle_Geom2d_Direction.hxx>
#endif

#ifndef _Geom2d_Vector_HeaderFile
#include <Geom2d_Vector.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Handle_Geom2d_Vector_HeaderFile
#include <Handle_Geom2d_Vector.hxx>
#endif
#ifndef _Handle_Geom2d_Geometry_HeaderFile
#include <Handle_Geom2d_Geometry.hxx>
#endif
class Standard_ConstructionError;
class gp_Dir2d;
class Geom2d_Vector;
class gp_Trsf2d;
class Geom2d_Geometry;



//!  The class Direction specifies a vector that is never null. <br>
//!  It is a unit vector. <br>
class Geom2d_Direction : public Geom2d_Vector {

public:

  //! Creates a unit vector with it 2 cartesian coordinates. <br>
//!  Raised if Sqrt( X*X + Y*Y) <= Resolution from gp. <br>
  Standard_EXPORT   Geom2d_Direction(const Standard_Real X,const Standard_Real Y);
  //! Creates a persistent copy of <me>. <br>
  Standard_EXPORT   Geom2d_Direction(const gp_Dir2d& V);
  //! Assigns the coordinates X and Y to this unit vector, <br>
//! then normalizes it. <br>
//! Exceptions <br>
//! Standard_ConstructionError if Sqrt(X*X + <br>
//! Y*Y) is less than or equal to gp::Resolution(). <br>
  Standard_EXPORT     void SetCoord(const Standard_Real X,const Standard_Real Y) ;
  //! Converts the gp_Dir2d unit vector V into this unit vector. <br>
  Standard_EXPORT     void SetDir2d(const gp_Dir2d& V) ;
  
//! Assigns a value to the X coordinate of this unit vector, then normalizes it. <br>
//! Exceptions <br>
//! Standard_ConstructionError if the value assigned <br>
//! causes the magnitude of the vector to become less <br>
//! than or equal to gp::Resolution(). <br>
  Standard_EXPORT     void SetX(const Standard_Real X) ;
  //! Assigns a value to the Y coordinate of this unit vector, then normalizes it. <br>
//! Exceptions <br>
//! Standard_ConstructionError if the value assigned <br>
//! causes the magnitude of the vector to become less <br>
//! than or equal to gp::Resolution(). <br>
  Standard_EXPORT     void SetY(const Standard_Real Y) ;
  //! Converts this unit vector into a gp_Dir2d unit vector. <br>
  Standard_EXPORT     gp_Dir2d Dir2d() const;
  //! returns 1.0 <br>
  Standard_EXPORT     Standard_Real Magnitude() const;
  //! returns 1.0 <br>
  Standard_EXPORT     Standard_Real SquareMagnitude() const;
  //! Computes the cross product between <me> and <Other>. <br>
  Standard_EXPORT     Standard_Real Crossed(const Handle(Geom2d_Vector)& Other) const;
    Standard_Real operator ^(const Handle(Geom2d_Vector)& Other) const
{
  return Crossed(Other);
}
  //! Applies the transformation T to this unit vector, then normalizes it. <br>
  Standard_EXPORT     void Transform(const gp_Trsf2d& T) ;
  //! Creates a new object which is a copy of this unit vector. <br>
  Standard_EXPORT     Handle_Geom2d_Geometry Copy() const;




  DEFINE_STANDARD_RTTI(Geom2d_Direction)

protected:




private: 




};





// other Inline functions and methods (like "C++: function call" methods)


#endif