Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:00

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 
0030 class IGESDraw_View;
0031 DEFINE_STANDARD_HANDLE(IGESDraw_View, IGESData_ViewKindEntity)
0032 
0033 //! defines IGES View Entity, Type <410> Form <0>
0034 //! in package IGESDraw
0035 //!
0036 //! Used to define a framework for specifying a viewing
0037 //! orientation of an object in three dimensional model
0038 //! space (X,Y,Z). The framework is also used to support
0039 //! the projection of all or part of model space onto a
0040 //! view volume.
0041 class IGESDraw_View : public IGESData_ViewKindEntity
0042 {
0043 
0044 public:
0045 
0046   
0047   Standard_EXPORT IGESDraw_View();
0048   
0049   //! This method is used to set fields of the class View
0050   //! - aViewNum     : View number
0051   //! - aScale       : Scale factor
0052   //! - aLeftPlane   : Left   plane of view volume
0053   //! - aTopPlane    : Top    plane of view volume
0054   //! - aRightPlane  : Right  plane of view volume
0055   //! - aBottomPlane : Bottom plane of view volume
0056   //! - aBackPlane   : Back   plane of view volume
0057   //! - aFrontPlane  : Front  plane of view volume
0058   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);
0059   
0060   //! Returns True (for a single view)
0061   Standard_EXPORT Standard_Boolean IsSingle() const Standard_OVERRIDE;
0062   
0063   //! Returns 1 (single view)
0064   Standard_EXPORT Standard_Integer NbViews() const Standard_OVERRIDE;
0065   
0066   //! For a single view, returns <me> whatever <num>
0067   Standard_EXPORT Handle(IGESData_ViewKindEntity) ViewItem (const Standard_Integer num) const Standard_OVERRIDE;
0068   
0069   //! returns integer number identifying view orientation
0070   Standard_EXPORT Standard_Integer ViewNumber() const;
0071   
0072   //! returns the scale factor(Default = 1.0)
0073   Standard_EXPORT Standard_Real ScaleFactor() const;
0074   
0075   //! returns False if left side of view volume is not present
0076   Standard_EXPORT Standard_Boolean HasLeftPlane() const;
0077   
0078   //! returns the left side of view volume, or null handle
0079   Standard_EXPORT Handle(IGESGeom_Plane) LeftPlane() const;
0080   
0081   //! returns False if top of view volume is not present
0082   Standard_EXPORT Standard_Boolean HasTopPlane() const;
0083   
0084   //! returns the top of view volume, or null handle
0085   Standard_EXPORT Handle(IGESGeom_Plane) TopPlane() const;
0086   
0087   //! returns False if right side of view volume is not present
0088   Standard_EXPORT Standard_Boolean HasRightPlane() const;
0089   
0090   //! returns the right side of view volume, or null handle
0091   Standard_EXPORT Handle(IGESGeom_Plane) RightPlane() const;
0092   
0093   //! returns False if bottom of view volume is not present
0094   Standard_EXPORT Standard_Boolean HasBottomPlane() const;
0095   
0096   //! returns the bottom of view volume, or null handle
0097   Standard_EXPORT Handle(IGESGeom_Plane) BottomPlane() const;
0098   
0099   //! returns False if back of view volume is not present
0100   Standard_EXPORT Standard_Boolean HasBackPlane() const;
0101   
0102   //! returns the back of view volume, or null handle
0103   Standard_EXPORT Handle(IGESGeom_Plane) BackPlane() const;
0104   
0105   //! returns False if front of view volume is not present
0106   Standard_EXPORT Standard_Boolean HasFrontPlane() const;
0107   
0108   //! returns the front of view volume, or null handle
0109   Standard_EXPORT Handle(IGESGeom_Plane) FrontPlane() const;
0110   
0111   //! returns the Transformation Matrix
0112   Standard_EXPORT Handle(IGESData_TransfEntity) ViewMatrix() const;
0113   
0114   //! returns XYZ from the Model space to the View space by
0115   //! applying the View Matrix
0116   Standard_EXPORT gp_XYZ ModelToView (const gp_XYZ& coords) const;
0117 
0118 
0119 
0120 
0121   DEFINE_STANDARD_RTTIEXT(IGESDraw_View,IGESData_ViewKindEntity)
0122 
0123 protected:
0124 
0125 
0126 
0127 
0128 private:
0129 
0130 
0131   Standard_Integer theViewNumber;
0132   Standard_Real theScaleFactor;
0133   Handle(IGESGeom_Plane) theLeftPlane;
0134   Handle(IGESGeom_Plane) theTopPlane;
0135   Handle(IGESGeom_Plane) theRightPlane;
0136   Handle(IGESGeom_Plane) theBottomPlane;
0137   Handle(IGESGeom_Plane) theBackPlane;
0138   Handle(IGESGeom_Plane) theFrontPlane;
0139 
0140 
0141 };
0142 
0143 
0144 
0145 
0146 
0147 
0148 
0149 #endif // _IGESDraw_View_HeaderFile