File indexing completed on 2025-01-18 10:02:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _AIS_CameraFrustum_HeaderFile
0017 #define _AIS_CameraFrustum_HeaderFile
0018
0019 #include <AIS_InteractiveObject.hxx>
0020
0021 class Graphic3d_ArrayOfSegments;
0022 class Graphic3d_ArrayOfTriangles;
0023
0024
0025
0026 class AIS_CameraFrustum : public AIS_InteractiveObject
0027 {
0028 DEFINE_STANDARD_RTTIEXT(AIS_CameraFrustum, AIS_InteractiveObject)
0029 public:
0030
0031
0032 enum SelectionMode
0033 {
0034 SelectionMode_Edges = 0,
0035 SelectionMode_Volume = 1,
0036 };
0037
0038 public:
0039
0040
0041 Standard_EXPORT AIS_CameraFrustum();
0042
0043
0044 Standard_EXPORT void SetCameraFrustum (const Handle(Graphic3d_Camera)& theCamera);
0045
0046
0047 Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE;
0048
0049
0050 Standard_EXPORT virtual void UnsetColor() Standard_OVERRIDE;
0051
0052
0053 Standard_EXPORT virtual void UnsetTransparency() Standard_OVERRIDE;
0054
0055
0056 Standard_EXPORT virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE;
0057
0058 protected:
0059
0060
0061 Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
0062 const Handle(Prs3d_Presentation)& thePrs,
0063 const Standard_Integer theMode) Standard_OVERRIDE;
0064
0065
0066 Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
0067 const Standard_Integer theMode) Standard_OVERRIDE;
0068
0069 private:
0070
0071
0072 void fillTriangles();
0073
0074
0075 void fillBorders();
0076
0077 protected:
0078
0079 NCollection_Array1<Graphic3d_Vec3d> myPoints;
0080 Handle(Graphic3d_ArrayOfTriangles) myTriangles;
0081 Handle(Graphic3d_ArrayOfSegments) myBorders;
0082
0083 };
0084
0085 #endif