File indexing completed on 2025-01-18 10:02:55
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _AIS_Plane_HeaderFile
0018 #define _AIS_Plane_HeaderFile
0019
0020 #include <AIS_InteractiveObject.hxx>
0021 #include <AIS_TypeOfPlane.hxx>
0022 #include <gp_Pnt.hxx>
0023 #include <Select3D_TypeOfSensitivity.hxx>
0024
0025 class Geom_Plane;
0026 class Geom_Axis2Placement;
0027
0028
0029
0030 class AIS_Plane : public AIS_InteractiveObject
0031 {
0032 DEFINE_STANDARD_RTTIEXT(AIS_Plane, AIS_InteractiveObject)
0033 public:
0034
0035
0036
0037
0038 Standard_EXPORT AIS_Plane(const Handle(Geom_Plane)& aComponent, const Standard_Boolean aCurrentMode = Standard_False);
0039
0040
0041
0042
0043
0044
0045 Standard_EXPORT AIS_Plane(const Handle(Geom_Plane)& aComponent, const gp_Pnt& aCenter, const Standard_Boolean aCurrentMode = Standard_False);
0046
0047
0048
0049
0050
0051 Standard_EXPORT AIS_Plane(const Handle(Geom_Plane)& aComponent, const gp_Pnt& aCenter, const gp_Pnt& aPmin, const gp_Pnt& aPmax, const Standard_Boolean aCurrentMode = Standard_False);
0052
0053 Standard_EXPORT AIS_Plane(const Handle(Geom_Axis2Placement)& aComponent, const AIS_TypeOfPlane aPlaneType, const Standard_Boolean aCurrentMode = Standard_False);
0054
0055
0056 Standard_EXPORT void SetSize (const Standard_Real aValue);
0057
0058
0059
0060 Standard_EXPORT void SetSize (const Standard_Real Xval, const Standard_Real YVal);
0061
0062 Standard_EXPORT void UnsetSize();
0063
0064 Standard_EXPORT Standard_Boolean Size (Standard_Real& X, Standard_Real& Y) const;
0065
0066 Standard_Boolean HasOwnSize() const { return myHasOwnSize; }
0067
0068
0069 Standard_EXPORT void SetMinimumSize (const Standard_Real theValue);
0070
0071
0072 Standard_EXPORT void UnsetMinimumSize();
0073
0074
0075 Standard_EXPORT Standard_Boolean HasMinimumSize() const;
0076
0077 virtual Standard_Integer Signature() const Standard_OVERRIDE { return 7; }
0078
0079 virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Datum; }
0080
0081
0082 const Handle(Geom_Plane)& Component() { return myComponent; }
0083
0084
0085 Standard_EXPORT void SetComponent (const Handle(Geom_Plane)& aComponent);
0086
0087
0088
0089
0090 Standard_EXPORT Standard_Boolean PlaneAttributes (Handle(Geom_Plane)& aComponent, gp_Pnt& aCenter, gp_Pnt& aPmin, gp_Pnt& aPmax);
0091
0092
0093
0094
0095 Standard_EXPORT void SetPlaneAttributes (const Handle(Geom_Plane)& aComponent, const gp_Pnt& aCenter, const gp_Pnt& aPmin, const gp_Pnt& aPmax);
0096
0097
0098 const gp_Pnt& Center() const { return myCenter; }
0099
0100
0101 void SetCenter (const gp_Pnt& theCenter) { myCenter = theCenter; }
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111 Standard_EXPORT void SetAxis2Placement (const Handle(Geom_Axis2Placement)& aComponent, const AIS_TypeOfPlane aPlaneType);
0112
0113
0114
0115
0116 Standard_EXPORT Handle(Geom_Axis2Placement) Axis2Placement();
0117
0118
0119 AIS_TypeOfPlane TypeOfPlane() { return myTypeOfPlane; }
0120
0121
0122 Standard_Boolean IsXYZPlane() { return myIsXYZPlane; }
0123
0124
0125 Standard_Boolean CurrentMode() { return myCurrentMode; }
0126
0127
0128
0129 void SetCurrentMode (const Standard_Boolean theCurrentMode) { myCurrentMode = theCurrentMode; }
0130
0131
0132 Standard_EXPORT virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const Standard_OVERRIDE;
0133
0134
0135 Standard_EXPORT virtual void SetContext (const Handle(AIS_InteractiveContext)& aCtx) Standard_OVERRIDE;
0136
0137
0138 Select3D_TypeOfSensitivity TypeOfSensitivity() const { return myTypeOfSensitivity; }
0139
0140
0141 void SetTypeOfSensitivity (Select3D_TypeOfSensitivity theTypeOfSensitivity) { myTypeOfSensitivity = theTypeOfSensitivity; }
0142
0143 Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, const Standard_Integer theMode) Standard_OVERRIDE;
0144
0145 Standard_EXPORT void SetColor (const Quantity_Color& aColor) Standard_OVERRIDE;
0146
0147 Standard_EXPORT void UnsetColor() Standard_OVERRIDE;
0148
0149 private:
0150
0151 Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
0152 const Handle(Prs3d_Presentation)& thePrs,
0153 const Standard_Integer theMode) Standard_OVERRIDE;
0154
0155 Standard_EXPORT void ComputeFrame();
0156
0157 Standard_EXPORT void ComputeFields();
0158
0159 Standard_EXPORT void InitDrawerAttributes();
0160
0161 private:
0162
0163 Handle(Geom_Plane) myComponent;
0164 Handle(Geom_Axis2Placement) myAx2;
0165 gp_Pnt myCenter;
0166 gp_Pnt myPmin;
0167 gp_Pnt myPmax;
0168 Standard_Boolean myCurrentMode;
0169 Standard_Boolean myAutomaticPosition;
0170 AIS_TypeOfPlane myTypeOfPlane;
0171 Standard_Boolean myIsXYZPlane;
0172 Standard_Boolean myHasOwnSize;
0173 Select3D_TypeOfSensitivity myTypeOfSensitivity;
0174
0175 };
0176
0177 DEFINE_STANDARD_HANDLE(AIS_Plane, AIS_InteractiveObject)
0178
0179 #endif