summaryrefslogtreecommitdiff
path: root/inc/Graphic2d_ViewMapping.hxx
blob: 71f8546f0594dde0c59022e45d6ed6572c2e1645 (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 _Graphic2d_ViewMapping_HeaderFile
#define _Graphic2d_ViewMapping_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_Graphic2d_ViewMapping_HeaderFile
#include <Handle_Graphic2d_ViewMapping.hxx>
#endif

#ifndef _Quantity_Length_HeaderFile
#include <Quantity_Length.hxx>
#endif
#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
#endif
#ifndef _Quantity_Factor_HeaderFile
#include <Quantity_Factor.hxx>
#endif


//! A ViewMapping defines a square region of the model <br>
//!	    space from an origin point and a size in meters. <br>
//!	    This square region is called the "map from". <br>
class Graphic2d_ViewMapping : public MMgt_TShared {

public:

  //! Creates a view mapping with the following default <br>
//!	    values : <br>
//!		XCenter	= 0. <br>
//!		YCenter	= 0. <br>
//!		Size	= 1. <br>
  Standard_EXPORT   Graphic2d_ViewMapping();
  //! Sets new values for the view mapping <me>. <br>
  Standard_EXPORT     void SetViewMapping(const Quantity_Length aXCenter,const Quantity_Length aYCenter,const Quantity_Length aSize) ;
  //! Sets new values for the view mapping center. <br>
  Standard_EXPORT     void SetCenter(const Quantity_Length aXCenter,const Quantity_Length aYCenter) ;
  //! Sets new value for the view mapping size. <br>
  Standard_EXPORT     void SetSize(const Quantity_Length aSize) ;
  //! Saves the current mapping which will be the <br>
//!	    reference value for the reset of the mapping <br>
//!	    done by the ViewmappingReset method. <br>
  Standard_EXPORT     void SetViewMappingDefault() ;
  //! Sets the value of the mapping to be the same as <br>
//!	    the mapping saved by the SetViewMappingDefault method. <br>
  Standard_EXPORT     void ViewMappingReset() ;
  //! Returns the current mapping of the view <me>. <br>
  Standard_EXPORT     void ViewMapping(Quantity_Length& XCenter,Quantity_Length& YCenter,Quantity_Length& Size) const;
  //! Returns the current center of the view <me>. <br>
  Standard_EXPORT     void Center(Quantity_Length& XCenter,Quantity_Length& YCenter) const;
  //! Returns the current reset mapping of the view <me>. <br>
  Standard_EXPORT     void ViewMappingDefault(Quantity_Length& XCenter,Quantity_Length& YCenter,Quantity_Length& Size) const;
  //! Returns the zoom factor (CurrentSize/InitialSize). <br>
  Standard_EXPORT     Quantity_Factor Zoom() const;




  DEFINE_STANDARD_RTTI(Graphic2d_ViewMapping)

protected:




private: 


Quantity_Length myXCenter;
Quantity_Length myYCenter;
Quantity_Length mySize;
Quantity_Length myInitialXCenter;
Quantity_Length myInitialYCenter;
Quantity_Length myInitialSize;


};





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


#endif