File indexing completed on 2025-01-18 10:04:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _SelectMgr_FrustumBuilder_HeaderFile
0017 #define _SelectMgr_FrustumBuilder_HeaderFile
0018
0019 #include <Graphic3d_Camera.hxx>
0020 #include <Precision.hxx>
0021 #include <SelectMgr_VectorTypes.hxx>
0022
0023
0024
0025
0026 class SelectMgr_FrustumBuilder : public Standard_Transient
0027 {
0028 public:
0029
0030 Standard_EXPORT SelectMgr_FrustumBuilder();
0031
0032
0033 const Handle(Graphic3d_Camera)& Camera() const { return myCamera; }
0034
0035
0036 Standard_EXPORT void SetCamera (const Handle(Graphic3d_Camera)& theCamera);
0037
0038
0039 Standard_EXPORT void SetWindowSize (const Standard_Integer theWidth,
0040 const Standard_Integer theHeight);
0041
0042
0043 Standard_EXPORT void SetViewport (const Standard_Real theX,
0044 const Standard_Real theY,
0045 const Standard_Real theWidth,
0046 const Standard_Real theHeight);
0047
0048 Standard_EXPORT void InvalidateViewport();
0049
0050 Standard_EXPORT void WindowSize (Standard_Integer& theWidth,
0051 Standard_Integer& theHeight) const;
0052
0053
0054
0055 Standard_EXPORT Standard_Real SignedPlanePntDist (const SelectMgr_Vec3& theEq,
0056 const SelectMgr_Vec3& thePnt) const;
0057
0058
0059
0060
0061 Standard_EXPORT gp_Pnt ProjectPntOnViewPlane (const Standard_Real& theX,
0062 const Standard_Real& theY,
0063 const Standard_Real& theZ) const;
0064
0065 DEFINE_STANDARD_RTTIEXT(SelectMgr_FrustumBuilder,Standard_Transient)
0066
0067 private:
0068
0069 Handle(Graphic3d_Camera) myCamera;
0070 Standard_Integer myWidth;
0071 Standard_Integer myHeight;
0072 NCollection_Vec4<Standard_Real> myViewport;
0073 Standard_Boolean myIsViewportSet;
0074 };
0075
0076 DEFINE_STANDARD_HANDLE(SelectMgr_FrustumBuilder, Standard_Transient)
0077
0078 #endif