1 // Created on: 2016-10-20
2 // Created by: Irina KRYLOVA
3 // Copyright (c) 2016 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
17 #ifndef _XCAFView_Object_HeaderFile
18 #define _XCAFView_Object_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
26 #include <TCollection_HAsciiString.hxx>
27 #include <XCAFView_ProjectionType.hxx>
29 class XCAFView_Object;
30 DEFINE_STANDARD_HANDLE(XCAFView_Object, Standard_Transient)
32 //! object to store view
33 class XCAFView_Object : public Standard_Transient
38 Standard_EXPORT XCAFView_Object();
40 Standard_EXPORT XCAFView_Object(const Handle(XCAFView_Object)& theObj);
42 Standard_EXPORT void SetName(Handle(TCollection_HAsciiString) theName)
47 Standard_EXPORT Handle(TCollection_HAsciiString) Name()
52 Standard_EXPORT void SetType(XCAFView_ProjectionType theType)
57 Standard_EXPORT XCAFView_ProjectionType Type()
62 Standard_EXPORT void SetProjectionPoint(gp_Pnt thePoint)
64 myProjectionPoint = thePoint;
67 Standard_EXPORT gp_Pnt ProjectionPoint()
69 return myProjectionPoint;
72 Standard_EXPORT void SetViewDirection(gp_Dir theDirection)
74 myViewDirection = theDirection;
77 Standard_EXPORT gp_Dir ViewDirection()
79 return myViewDirection;
82 Standard_EXPORT void SetUpDirection(gp_Dir theDirection)
84 myUpDirection = theDirection;
87 Standard_EXPORT gp_Dir UpDirection()
92 Standard_EXPORT void SetZoomFactor(Standard_Real theZoomFactor)
94 myZoomFactor = theZoomFactor;
97 Standard_EXPORT Standard_Real ZoomFactor()
102 Standard_EXPORT void SetWindowHorizontalSize(Standard_Real theSize)
104 myWindowHorizontalSize = theSize;
107 Standard_EXPORT Standard_Real WindowHorizontalSize()
109 return myWindowHorizontalSize;
112 Standard_EXPORT void SetWindowVerticalSize(Standard_Real theSize)
114 myWindowVerticalSize = theSize;
117 Standard_EXPORT Standard_Real WindowVerticalSize()
119 return myWindowVerticalSize;
122 Standard_EXPORT void UnsetClippingPlane()
124 myHasClippingPlane = Standard_False;
127 Standard_EXPORT Standard_Boolean HasClippingPlane()
129 return myHasClippingPlane;
132 Standard_EXPORT void SetClippingPlane(gp_Pln thePlane)
134 myClippingPlane = thePlane;
135 myHasClippingPlane = Standard_True;
138 Standard_EXPORT gp_Pln ClippingPlane()
140 return myClippingPlane;
143 Standard_EXPORT void UnsetFrontPlaneClipping()
145 myFrontPlaneClipping = Standard_False;
148 Standard_EXPORT Standard_Boolean HasFrontPlaneClipping()
150 return myFrontPlaneClipping;
153 Standard_EXPORT void SetFrontPlaneDistance(Standard_Real theDistance)
155 myFrontPlaneDistance = theDistance;
156 myFrontPlaneClipping = Standard_True;
159 Standard_EXPORT Standard_Real FrontPlaneDistance()
161 return myFrontPlaneDistance;
164 Standard_EXPORT void UnsetBackPlaneClipping()
166 myBackPlaneClipping = Standard_False;
169 Standard_EXPORT Standard_Boolean HasBackPlaneClipping()
171 return myBackPlaneClipping;
174 Standard_EXPORT void SetBackPlaneDistance(Standard_Real theDistance)
176 myBackPlaneDistance = theDistance;
177 myBackPlaneClipping = Standard_True;
180 Standard_EXPORT Standard_Real BackPlaneDistance()
182 return myBackPlaneDistance;
185 Standard_EXPORT void SetViewVolumeSidesClipping(Standard_Boolean theViewVolumeSidesClipping)
187 myViewVolumeSidesClipping = theViewVolumeSidesClipping;
190 Standard_EXPORT Standard_Boolean HasViewVolumeSidesClipping()
192 return myViewVolumeSidesClipping;
195 DEFINE_STANDARD_RTTIEXT(XCAFView_Object,Standard_Transient)
199 Handle(TCollection_HAsciiString) myName;
200 XCAFView_ProjectionType myType;
201 gp_Pnt myProjectionPoint;
202 gp_Dir myViewDirection;
203 gp_Dir myUpDirection;
204 Standard_Real myZoomFactor;
205 Standard_Real myWindowHorizontalSize;
206 Standard_Real myWindowVerticalSize;
207 Standard_Boolean myHasClippingPlane;
208 gp_Pln myClippingPlane;
209 Standard_Boolean myFrontPlaneClipping;
210 Standard_Real myFrontPlaneDistance;
211 Standard_Boolean myBackPlaneClipping;
212 Standard_Real myBackPlaneDistance;
213 Standard_Boolean myViewVolumeSidesClipping;
217 #endif // _XCAFView_Object_HeaderFile