summaryrefslogtreecommitdiff
path: root/inc/Geom2d_Vector.hxx
blob: 939f7eafa5bd7c4eda68420fbaf4f91c368fa8b9 (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
// 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_Vector_HeaderFile
#define _Geom2d_Vector_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_Geom2d_Vector_HeaderFile
#include <Handle_Geom2d_Vector.hxx>
#endif

#ifndef _gp_Vec2d_HeaderFile
#include <gp_Vec2d.hxx>
#endif
#ifndef _Geom2d_Geometry_HeaderFile
#include <Geom2d_Geometry.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
class Standard_DomainError;
class gp_VectorWithNullMagnitude;
class gp_Vec2d;


//!  The abstract class Vector describes the common <br>
//! behavior of vectors in 2D space. <br>
//! The Geom2d package provides two concrete <br>
//! classes of vectors: Geom2d_Direction (unit vector) <br>
//! and Geom2d_VectorWithMagnitude. <br>
class Geom2d_Vector : public Geom2d_Geometry {

public:

  //! Reverses the vector <me>. <br>
  Standard_EXPORT     void Reverse() ;
  //! Returns a copy of <me> reversed. <br>
  Standard_EXPORT     Handle_Geom2d_Vector Reversed() const;
  //! Computes the angular value, in radians, between this <br>
//! vector and vector Other. The result is a value <br>
//! between -Pi and Pi. The orientation is from this <br>
//! vector to vector Other. <br>
//!    Raises VectorWithNullMagnitude if one of the two vectors is a vector with <br>
//!  null magnitude because the angular value is indefinite. <br>
  Standard_EXPORT     Standard_Real Angle(const Handle(Geom2d_Vector)& Other) const;
  //! Returns the coordinates of <me>. <br>
  Standard_EXPORT     void Coord(Standard_Real& X,Standard_Real& Y) const;
  //! Returns the  Magnitude of <me>. <br>
  Standard_EXPORT   virtual  Standard_Real Magnitude() const = 0;
  //! Returns the square magnitude of <me>. <br>
  Standard_EXPORT   virtual  Standard_Real SquareMagnitude() const = 0;
  //! Returns the X coordinate of <me>. <br>
  Standard_EXPORT     Standard_Real X() const;
  //! Returns the Y coordinate of <me>. <br>
  Standard_EXPORT     Standard_Real Y() const;
  //! Cross product of <me> with the vector <Other>. <br>
  Standard_EXPORT   virtual  Standard_Real Crossed(const Handle(Geom2d_Vector)& Other) const = 0;
  //! Returns the scalar product of 2 Vectors. <br>
  Standard_EXPORT     Standard_Real Dot(const Handle(Geom2d_Vector)& Other) const;
  //! Returns a non persistent copy of <me>. <br>
  Standard_EXPORT     gp_Vec2d Vec2d() const;




  DEFINE_STANDARD_RTTI(Geom2d_Vector)

protected:


gp_Vec2d gpVec2d;


private: 




};





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


#endif