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
0017 #ifndef _AIS_Axis_HeaderFile
0018 #define _AIS_Axis_HeaderFile
0019
0020 #include <AIS_InteractiveObject.hxx>
0021 #include <AIS_TypeOfAxis.hxx>
0022 #include <gp_Dir.hxx>
0023 #include <gp_Pnt.hxx>
0024 #include <SelectMgr_Selection.hxx>
0025
0026 class Geom_Line;
0027 class Geom_Axis1Placement;
0028 class Geom_Axis2Placement;
0029 class Prs3d_LineAspect;
0030
0031
0032
0033
0034
0035
0036
0037 class AIS_Axis : public AIS_InteractiveObject
0038 {
0039 DEFINE_STANDARD_RTTIEXT(AIS_Axis, AIS_InteractiveObject)
0040 public:
0041
0042
0043 Standard_EXPORT AIS_Axis(const Handle(Geom_Line)& aComponent);
0044
0045
0046
0047 Standard_EXPORT AIS_Axis(const Handle(Geom_Axis2Placement)& aComponent, const AIS_TypeOfAxis anAxisType);
0048
0049
0050 Standard_EXPORT AIS_Axis(const Handle(Geom_Axis1Placement)& anAxis);
0051
0052
0053
0054
0055 Standard_EXPORT AIS_Axis (const gp_Ax1& theAxis, const Standard_Real theLength = -1);
0056
0057
0058
0059 const Handle(Geom_Line)& Component() const { return myComponent; }
0060
0061
0062 Standard_EXPORT void SetComponent (const Handle(Geom_Line)& aComponent);
0063
0064
0065
0066
0067 const Handle(Geom_Axis2Placement)& Axis2Placement() const { return myAx2; }
0068
0069
0070
0071
0072 Standard_EXPORT void SetAxis2Placement (const Handle(Geom_Axis2Placement)& aComponent, const AIS_TypeOfAxis anAxisType);
0073
0074
0075 Standard_EXPORT void SetAxis1Placement (const Handle(Geom_Axis1Placement)& anAxis);
0076
0077
0078 AIS_TypeOfAxis TypeOfAxis() const { return myTypeOfAxis; }
0079
0080
0081
0082 void SetTypeOfAxis (const AIS_TypeOfAxis theTypeAxis) { myTypeOfAxis = theTypeAxis; }
0083
0084
0085
0086
0087 Standard_Boolean IsXYZAxis() const { return myIsXYZAxis; }
0088
0089
0090 Standard_EXPORT Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const Standard_OVERRIDE;
0091
0092 virtual Standard_Integer Signature() const Standard_OVERRIDE { return 2; }
0093
0094 virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Datum; }
0095
0096 Standard_EXPORT void SetColor (const Quantity_Color& aColor) Standard_OVERRIDE;
0097
0098 Standard_EXPORT void SetWidth (const Standard_Real aValue) Standard_OVERRIDE;
0099
0100
0101 Standard_EXPORT void SetDisplayAspect (const Handle(Prs3d_LineAspect)& theNewDatumAspect);
0102
0103 Standard_EXPORT void UnsetColor() Standard_OVERRIDE;
0104
0105 Standard_EXPORT void UnsetWidth() Standard_OVERRIDE;
0106
0107 private:
0108
0109 Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
0110 const Handle(Prs3d_Presentation)& thePrs,
0111 const Standard_Integer theMode) Standard_OVERRIDE;
0112
0113 Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
0114 const Standard_Integer theMode) Standard_OVERRIDE;
0115
0116 Standard_EXPORT void ComputeFields();
0117
0118 private:
0119
0120 Handle(Geom_Line) myComponent;
0121 Handle(Geom_Axis2Placement) myAx2;
0122 gp_Pnt myPfirst;
0123 gp_Pnt myPlast;
0124 AIS_TypeOfAxis myTypeOfAxis;
0125 Standard_Boolean myIsXYZAxis;
0126 gp_Dir myDir;
0127 Standard_Real myVal;
0128 Standard_CString myText;
0129 Handle(Prs3d_LineAspect) myLineAspect;
0130
0131 };
0132
0133 DEFINE_STANDARD_HANDLE(AIS_Axis, AIS_InteractiveObject)
0134
0135 #endif