1 // Created on: 1993-01-11
2 // Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA )
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IGESDraw_View_HeaderFile
18 #define _IGESDraw_View_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.hxx>
24 #include <Standard_Real.hxx>
25 #include <IGESData_ViewKindEntity.hxx>
26 #include <Standard_Boolean.hxx>
28 class Standard_OutOfRange;
29 class IGESData_ViewKindEntity;
30 class IGESData_TransfEntity;
35 DEFINE_STANDARD_HANDLE(IGESDraw_View, IGESData_ViewKindEntity)
37 //! defines IGES View Entity, Type <410> Form <0>
38 //! in package IGESDraw
40 //! Used to define a framework for specifying a viewing
41 //! orientation of an object in three dimensional model
42 //! space (X,Y,Z). The framework is also used to support
43 //! the projection of all or part of model space onto a
45 class IGESDraw_View : public IGESData_ViewKindEntity
51 Standard_EXPORT IGESDraw_View();
53 //! This method is used to set fields of the class View
54 //! - aViewNum : View number
55 //! - aScale : Scale factor
56 //! - aLeftPlane : Left plane of view volume
57 //! - aTopPlane : Top plane of view volume
58 //! - aRightPlane : Right plane of view volume
59 //! - aBottomPlane : Bottom plane of view volume
60 //! - aBackPlane : Back plane of view volume
61 //! - aFrontPlane : Front plane of view volume
62 Standard_EXPORT void Init (const Standard_Integer aViewNum, const Standard_Real aScale, const Handle(IGESGeom_Plane)& aLeftPlane, const Handle(IGESGeom_Plane)& aTopPlane, const Handle(IGESGeom_Plane)& aRightPlane, const Handle(IGESGeom_Plane)& aBottomPlane, const Handle(IGESGeom_Plane)& aBackPlane, const Handle(IGESGeom_Plane)& aFrontPlane);
64 //! Returns True (for a single view)
65 Standard_EXPORT Standard_Boolean IsSingle() const Standard_OVERRIDE;
67 //! Returns 1 (single view)
68 Standard_EXPORT Standard_Integer NbViews() const Standard_OVERRIDE;
70 //! For a single view, returns <me> whatever <num>
71 Standard_EXPORT Handle(IGESData_ViewKindEntity) ViewItem (const Standard_Integer num) const Standard_OVERRIDE;
73 //! returns integer number identifying view orientation
74 Standard_EXPORT Standard_Integer ViewNumber() const;
76 //! returns the scale factor(Default = 1.0)
77 Standard_EXPORT Standard_Real ScaleFactor() const;
79 //! returns False if left side of view volume is not present
80 Standard_EXPORT Standard_Boolean HasLeftPlane() const;
82 //! returns the left side of view volume, or null handle
83 Standard_EXPORT Handle(IGESGeom_Plane) LeftPlane() const;
85 //! returns False if top of view volume is not present
86 Standard_EXPORT Standard_Boolean HasTopPlane() const;
88 //! returns the top of view volume, or null handle
89 Standard_EXPORT Handle(IGESGeom_Plane) TopPlane() const;
91 //! returns False if right side of view volume is not present
92 Standard_EXPORT Standard_Boolean HasRightPlane() const;
94 //! returns the right side of view volume, or null handle
95 Standard_EXPORT Handle(IGESGeom_Plane) RightPlane() const;
97 //! returns False if bottom of view volume is not present
98 Standard_EXPORT Standard_Boolean HasBottomPlane() const;
100 //! returns the bottom of view volume, or null handle
101 Standard_EXPORT Handle(IGESGeom_Plane) BottomPlane() const;
103 //! returns False if back of view volume is not present
104 Standard_EXPORT Standard_Boolean HasBackPlane() const;
106 //! returns the back of view volume, or null handle
107 Standard_EXPORT Handle(IGESGeom_Plane) BackPlane() const;
109 //! returns False if front of view volume is not present
110 Standard_EXPORT Standard_Boolean HasFrontPlane() const;
112 //! returns the front of view volume, or null handle
113 Standard_EXPORT Handle(IGESGeom_Plane) FrontPlane() const;
115 //! returns the Transformation Matrix
116 Standard_EXPORT Handle(IGESData_TransfEntity) ViewMatrix() const;
118 //! returns XYZ from the Model space to the View space by
119 //! applying the View Matrix
120 Standard_EXPORT gp_XYZ ModelToView (const gp_XYZ& coords) const;
125 DEFINE_STANDARD_RTTIEXT(IGESDraw_View,IGESData_ViewKindEntity)
135 Standard_Integer theViewNumber;
136 Standard_Real theScaleFactor;
137 Handle(IGESGeom_Plane) theLeftPlane;
138 Handle(IGESGeom_Plane) theTopPlane;
139 Handle(IGESGeom_Plane) theRightPlane;
140 Handle(IGESGeom_Plane) theBottomPlane;
141 Handle(IGESGeom_Plane) theBackPlane;
142 Handle(IGESGeom_Plane) theFrontPlane;
153 #endif // _IGESDraw_View_HeaderFile