Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-24 09:16:14

0001 // Created on: 1993-01-11
0002 // Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA )
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IGESDraw_View_HeaderFile
0018 #define _IGESDraw_View_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <IGESData_ViewKindEntity.hxx>
0025 class IGESGeom_Plane;
0026 class IGESData_TransfEntity;
0027 class gp_XYZ;
0028 
0029 //! defines IGES View Entity, Type <410> Form <0>
0030 //! in package IGESDraw
0031 //!
0032 //! Used to define a framework for specifying a viewing
0033 //! orientation of an object in three dimensional model
0034 //! space (X,Y,Z). The framework is also used to support
0035 //! the projection of all or part of model space onto a
0036 //! view volume.
0037 class IGESDraw_View : public IGESData_ViewKindEntity
0038 {
0039 
0040 public:
0041   Standard_EXPORT IGESDraw_View();
0042 
0043   //! This method is used to set fields of the class View
0044   //! - aViewNum     : View number
0045   //! - aScale       : Scale factor
0046   //! - aLeftPlane   : Left   plane of view volume
0047   //! - aTopPlane    : Top    plane of view volume
0048   //! - aRightPlane  : Right  plane of view volume
0049   //! - aBottomPlane : Bottom plane of view volume
0050   //! - aBackPlane   : Back   plane of view volume
0051   //! - aFrontPlane  : Front  plane of view volume
0052   Standard_EXPORT void Init(const int                          aViewNum,
0053                             const double                       aScale,
0054                             const occ::handle<IGESGeom_Plane>& aLeftPlane,
0055                             const occ::handle<IGESGeom_Plane>& aTopPlane,
0056                             const occ::handle<IGESGeom_Plane>& aRightPlane,
0057                             const occ::handle<IGESGeom_Plane>& aBottomPlane,
0058                             const occ::handle<IGESGeom_Plane>& aBackPlane,
0059                             const occ::handle<IGESGeom_Plane>& aFrontPlane);
0060 
0061   //! Returns True (for a single view)
0062   Standard_EXPORT bool IsSingle() const override;
0063 
0064   //! Returns 1 (single view)
0065   Standard_EXPORT int NbViews() const override;
0066 
0067   //! For a single view, returns <me> whatever <num>
0068   Standard_EXPORT occ::handle<IGESData_ViewKindEntity> ViewItem(const int num) const override;
0069 
0070   //! returns integer number identifying view orientation
0071   Standard_EXPORT int ViewNumber() const;
0072 
0073   //! returns the scale factor(Default = 1.0)
0074   Standard_EXPORT double ScaleFactor() const;
0075 
0076   //! returns False if left side of view volume is not present
0077   Standard_EXPORT bool HasLeftPlane() const;
0078 
0079   //! returns the left side of view volume, or null handle
0080   Standard_EXPORT occ::handle<IGESGeom_Plane> LeftPlane() const;
0081 
0082   //! returns False if top of view volume is not present
0083   Standard_EXPORT bool HasTopPlane() const;
0084 
0085   //! returns the top of view volume, or null handle
0086   Standard_EXPORT occ::handle<IGESGeom_Plane> TopPlane() const;
0087 
0088   //! returns False if right side of view volume is not present
0089   Standard_EXPORT bool HasRightPlane() const;
0090 
0091   //! returns the right side of view volume, or null handle
0092   Standard_EXPORT occ::handle<IGESGeom_Plane> RightPlane() const;
0093 
0094   //! returns False if bottom of view volume is not present
0095   Standard_EXPORT bool HasBottomPlane() const;
0096 
0097   //! returns the bottom of view volume, or null handle
0098   Standard_EXPORT occ::handle<IGESGeom_Plane> BottomPlane() const;
0099 
0100   //! returns False if back of view volume is not present
0101   Standard_EXPORT bool HasBackPlane() const;
0102 
0103   //! returns the back of view volume, or null handle
0104   Standard_EXPORT occ::handle<IGESGeom_Plane> BackPlane() const;
0105 
0106   //! returns False if front of view volume is not present
0107   Standard_EXPORT bool HasFrontPlane() const;
0108 
0109   //! returns the front of view volume, or null handle
0110   Standard_EXPORT occ::handle<IGESGeom_Plane> FrontPlane() const;
0111 
0112   //! returns the Transformation Matrix
0113   Standard_EXPORT occ::handle<IGESData_TransfEntity> ViewMatrix() const;
0114 
0115   //! returns XYZ from the Model space to the View space by
0116   //! applying the View Matrix
0117   Standard_EXPORT gp_XYZ ModelToView(const gp_XYZ& coords) const;
0118 
0119   DEFINE_STANDARD_RTTIEXT(IGESDraw_View, IGESData_ViewKindEntity)
0120 
0121 private:
0122   int                         theViewNumber;
0123   double                      theScaleFactor;
0124   occ::handle<IGESGeom_Plane> theLeftPlane;
0125   occ::handle<IGESGeom_Plane> theTopPlane;
0126   occ::handle<IGESGeom_Plane> theRightPlane;
0127   occ::handle<IGESGeom_Plane> theBottomPlane;
0128   occ::handle<IGESGeom_Plane> theBackPlane;
0129   occ::handle<IGESGeom_Plane> theFrontPlane;
0130 };
0131 
0132 #endif // _IGESDraw_View_HeaderFile