|
|
|||
File indexing completed on 2026-07-14 08:40:38
0001 // Created on: 1993-02-03 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_PerspectiveView_HeaderFile 0018 #define _IGESDraw_PerspectiveView_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Standard_Integer.hxx> 0024 #include <gp_XYZ.hxx> 0025 #include <gp_XY.hxx> 0026 #include <IGESData_ViewKindEntity.hxx> 0027 class gp_Vec; 0028 class gp_Pnt; 0029 class gp_Pnt2d; 0030 class IGESData_TransfEntity; 0031 0032 class IGESDraw_PerspectiveView; 0033 DEFINE_STANDARD_HANDLE(IGESDraw_PerspectiveView, IGESData_ViewKindEntity) 0034 0035 //! defines IGESPerspectiveView, Type <410> Form <1> 0036 //! in package IGESDraw 0037 //! 0038 //! Supports a perspective view. 0039 //! Any geometric projection is defined by a view plane 0040 //! and the projectors that pass through the view plane. 0041 //! Projectors can be visualized as rays of light that 0042 //! form an image by passing through the viewed object 0043 //! and striking the view plane. 0044 //! The projectors are defined via a point called the 0045 //! Centre-of-Projection or the eye-point. 0046 //! A perspective view is formed by all projectors that 0047 //! emanate from the Centre-of-Projection and pass 0048 //! through the view plane. 0049 class IGESDraw_PerspectiveView : public IGESData_ViewKindEntity 0050 { 0051 0052 public: 0053 Standard_EXPORT IGESDraw_PerspectiveView(); 0054 0055 //! This method is used to set the fields of the class 0056 //! PerspectiveView 0057 //! - aViewNumber : The desired view 0058 //! - aScaleFactor : Scale factor 0059 //! - aViewNormalVector : View plane normal vector (model space) 0060 //! - aViewReferencePoint : View reference point (model space) 0061 //! - aCenterOfProjection : Center Of Projection (model space) 0062 //! - aViewUpVector : View up vector (model space) 0063 //! - aViewPlaneDistance : View plane distance (model space) 0064 //! - aTopLeft : Top-left point of clipping window 0065 //! - aBottomRight : Bottom-right point of clipping window 0066 //! - aDepthClip : Depth clipping indicator 0067 //! - aBackPlaneDistance : Distance of back clipping plane 0068 //! - aFrontPlaneDistance : Distance of front clipping plane 0069 Standard_EXPORT void Init(const Standard_Integer aViewNumber, 0070 const Standard_Real aScaleFactor, 0071 const gp_XYZ& aViewNormalVector, 0072 const gp_XYZ& aViewReferencePoint, 0073 const gp_XYZ& aCenterOfProjection, 0074 const gp_XYZ& aViewUpVector, 0075 const Standard_Real aViewPlaneDistance, 0076 const gp_XY& aTopLeft, 0077 const gp_XY& aBottomRight, 0078 const Standard_Integer aDepthClip, 0079 const Standard_Real aBackPlaneDistance, 0080 const Standard_Real aFrontPlaneDistance); 0081 0082 //! Returns True (for a single view) 0083 Standard_EXPORT Standard_Boolean IsSingle() const Standard_OVERRIDE; 0084 0085 //! Returns 1 (single view) 0086 Standard_EXPORT Standard_Integer NbViews() const Standard_OVERRIDE; 0087 0088 //! For a single view, returns <me> whatever <num> 0089 Standard_EXPORT Handle(IGESData_ViewKindEntity) ViewItem(const Standard_Integer num) const 0090 Standard_OVERRIDE; 0091 0092 //! returns the view number associated with <me> 0093 Standard_EXPORT Standard_Integer ViewNumber() const; 0094 0095 //! returns the scale factor associated with <me> 0096 Standard_EXPORT Standard_Real ScaleFactor() const; 0097 0098 //! returns the View plane normal vector (model space) 0099 Standard_EXPORT gp_Vec ViewNormalVector() const; 0100 0101 //! returns the View reference point (model space) 0102 Standard_EXPORT gp_Pnt ViewReferencePoint() const; 0103 0104 //! returns the Center Of Projection (model space) 0105 Standard_EXPORT gp_Pnt CenterOfProjection() const; 0106 0107 //! returns the View up vector (model space) 0108 Standard_EXPORT gp_Vec ViewUpVector() const; 0109 0110 //! returns the View plane distance (model space) 0111 Standard_EXPORT Standard_Real ViewPlaneDistance() const; 0112 0113 //! returns the top left point of the clipping window 0114 Standard_EXPORT gp_Pnt2d TopLeft() const; 0115 0116 //! returns the bottom right point of the clipping window 0117 Standard_EXPORT gp_Pnt2d BottomRight() const; 0118 0119 //! returns the Depth clipping indicator 0120 //! 0 = No depth clipping 0121 //! 1 = Back clipping plane ON 0122 //! 2 = Front clipping plane ON 0123 //! 3 = Back and front clipping planes ON 0124 Standard_EXPORT Standard_Integer DepthClip() const; 0125 0126 //! returns the View coordinate denoting the location of 0127 //! the back clipping plane 0128 Standard_EXPORT Standard_Real BackPlaneDistance() const; 0129 0130 //! returns the View coordinate denoting the location of 0131 //! the front clipping plane 0132 Standard_EXPORT Standard_Real FrontPlaneDistance() const; 0133 0134 //! returns the Transformation Matrix 0135 Standard_EXPORT Handle(IGESData_TransfEntity) ViewMatrix() const; 0136 0137 //! returns XYX from the Model space to the View space by 0138 //! applying the View Matrix 0139 Standard_EXPORT gp_XYZ ModelToView(const gp_XYZ& coords) const; 0140 0141 DEFINE_STANDARD_RTTIEXT(IGESDraw_PerspectiveView, IGESData_ViewKindEntity) 0142 0143 protected: 0144 private: 0145 Standard_Integer theViewNumber; 0146 Standard_Real theScaleFactor; 0147 gp_XYZ theViewNormalVector; 0148 gp_XYZ theViewReferencePoint; 0149 gp_XYZ theCenterOfProjection; 0150 gp_XYZ theViewUpVector; 0151 Standard_Real theViewPlaneDistance; 0152 gp_XY theTopLeft; 0153 gp_XY theBottomRight; 0154 Standard_Integer theDepthClip; 0155 Standard_Real theBackPlaneDistance; 0156 Standard_Real theFrontPlaneDistance; 0157 }; 0158 0159 #endif // _IGESDraw_PerspectiveView_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|