/usr/include/oce/Draw_View.hxx is in liboce-visualization-dev 0.18.2-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | #ifndef Draw_View_Header
#define Draw_View_Header
#include <gp_Trsf.hxx>
#include <Draw_Window.hxx>
class Draw_Viewer;
class Draw_View : public Draw_Window
{
public:
//! Constructor
Draw_View(Standard_Integer theId,
Draw_Viewer* theViewer,
Standard_Integer theX,
Standard_Integer theY,
Standard_Integer theWidth,
Standard_Integer theHeight);
#if defined(_WIN32) || defined(__WIN32__)
Draw_View(Standard_Integer theId,
Draw_Viewer* theViewer,
Standard_Integer theX,
Standard_Integer theY,
Standard_Integer theWidth,
Standard_Integer theHeight,
HWND theWindow);
#elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
Draw_View(Standard_Integer theId,
Draw_Viewer* theViewer,
Standard_Integer theX,
Standard_Integer theY,
Standard_Integer theWidth,
Standard_Integer theHeight,
NSWindow* theWindow);
#endif
//! Constructor.
Draw_View(Standard_Integer theId,
Draw_Viewer* theViewer,
const char* theTitle);
//! Destructor.
~Draw_View();
public: // @name getters and setters
//! Sets horizontal offset.
void SetDx(const Standard_Integer theDx)
{
myDx = theDx;
}
//! Sets vertical offset.
void SetDy(const Standard_Integer theDy)
{
myDy = theDy;
}
//! Sets parameter of zoom.
void SetZoom(const Standard_Real theZoom)
{
myZoom = theZoom;
}
//! Sets view matrix.
void SetMatrix(const gp_Trsf& theMatrix)
{
myMatrix = theMatrix;
}
//! Sets focal distance.
void SetFocalDistance(const Standard_Real theDistance)
{
myFocalDistance = theDistance;
}
//! Gets horizontal offset.
const Standard_Integer GetDx() const
{
return myDx;
}
//! Gets vertical offset.
const Standard_Integer GetDy() const
{
return myDy;
}
//! Gets parameter of zoom.
const Standard_Real GetZoom() const
{
return myZoom;
}
//! Gets matrix of view.
const gp_Trsf& GetMatrix() const
{
return myMatrix;
}
//! Gets focal distance.
const Standard_Real GetFocalDistance() const
{
return myFocalDistance;
}
public: //! @name public inline methods
//! Returns type of view.
const char* Type()
{
return myType;
}
//! Returns true value if current view in 2D mode.
const Standard_Boolean Is2D() const
{
return myIs2D;
}
//! Returns true value if current view in perspective mode.
const Standard_Real IsPerspective() const
{
return myIsPers;
}
public: //! @name view API
//! Initialize view by the type.
Standard_Boolean Init(const char* theType);
//! Transformates view matrix.
void Transform(const gp_Trsf& theTransformation);
//! Resets frame of current view.
void ResetFrame();
//! Returns parameters of frame corners.
void GetFrame(Standard_Integer& theX0,Standard_Integer& theY0,
Standard_Integer& theX1,Standard_Integer& theY1);
//! Perform window exposing.
void WExpose();
protected:
Standard_Integer myId;
Draw_Viewer* myViewer;
char myType[5];
Standard_Boolean myIsPers;
Standard_Boolean myIs2D;
Standard_Real myFocalDistance;
Standard_Real myZoom;
gp_Trsf myMatrix;
Standard_Integer myDx;
Standard_Integer myDy;
Standard_Integer myFrameX0;
Standard_Integer myFrameY0;
Standard_Integer myFrameX1;
Standard_Integer myFrameY1;
};
#endif
|