File indexing completed on 2025-01-18 10:04:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Prs3d_DatumAspect_HeaderFile
0018 #define _Prs3d_DatumAspect_HeaderFile
0019
0020 #include <Prs3d_ArrowAspect.hxx>
0021 #include <Prs3d_DatumAttribute.hxx>
0022 #include <Prs3d_DatumAxes.hxx>
0023 #include <Prs3d_DatumParts.hxx>
0024 #include <Prs3d_LineAspect.hxx>
0025 #include <Prs3d_PointAspect.hxx>
0026 #include <Prs3d_ShadingAspect.hxx>
0027 #include <Prs3d_TextAspect.hxx>
0028
0029
0030 class Prs3d_DatumAspect : public Prs3d_BasicAspect
0031 {
0032 DEFINE_STANDARD_RTTIEXT(Prs3d_DatumAspect, Prs3d_BasicAspect)
0033 public:
0034
0035
0036 Standard_EXPORT Prs3d_DatumAspect();
0037
0038
0039 const Handle(Prs3d_LineAspect)& LineAspect (Prs3d_DatumParts thePart) const { return myLineAspects[thePart]; }
0040
0041
0042 const Handle(Prs3d_ShadingAspect)& ShadingAspect (Prs3d_DatumParts thePart) const { return myShadedAspects[thePart]; }
0043
0044
0045 const Handle(Prs3d_TextAspect)& TextAspect (Prs3d_DatumParts thePart) const { return myTextAspects[thePart]; }
0046
0047
0048 void SetTextAspect (const Handle(Prs3d_TextAspect)& theTextAspect)
0049 {
0050 myTextAspects[Prs3d_DatumParts_XAxis] = theTextAspect;
0051 myTextAspects[Prs3d_DatumParts_YAxis] = theTextAspect;
0052 myTextAspects[Prs3d_DatumParts_ZAxis] = theTextAspect;
0053 }
0054
0055
0056 const Handle(Prs3d_PointAspect)& PointAspect() const { return myPointAspect; }
0057
0058
0059 void SetPointAspect (const Handle(Prs3d_PointAspect)& theAspect) { myPointAspect = theAspect; }
0060
0061
0062 const Handle(Prs3d_ArrowAspect)& ArrowAspect() const { return myArrowAspect; }
0063
0064
0065 void SetArrowAspect (const Handle(Prs3d_ArrowAspect)& theAspect) { myArrowAspect = theAspect; }
0066
0067
0068 Standard_EXPORT Standard_Boolean DrawDatumPart (Prs3d_DatumParts thePart) const;
0069
0070
0071 void SetDrawDatumAxes (Prs3d_DatumAxes theType) { myAxes = theType; }
0072
0073
0074 Prs3d_DatumAxes DatumAxes() const { return myAxes; }
0075
0076
0077 Standard_Real Attribute (Prs3d_DatumAttribute theType) const { return myAttributes[theType]; }
0078
0079
0080 void SetAttribute (Prs3d_DatumAttribute theType, const Standard_Real theValue) { myAttributes[theType] = theValue; }
0081
0082
0083 Standard_EXPORT Standard_Real AxisLength (Prs3d_DatumParts thePart) const;
0084
0085
0086 void SetAxisLength (Standard_Real theL1, Standard_Real theL2, Standard_Real theL3)
0087 {
0088 myAttributes[Prs3d_DatumAttribute_XAxisLength] = theL1;
0089 myAttributes[Prs3d_DatumAttribute_YAxisLength] = theL2;
0090 myAttributes[Prs3d_DatumAttribute_ZAxisLength] = theL3;
0091 }
0092
0093
0094 Standard_Boolean ToDrawLabels() const { return myToDrawLabels; }
0095
0096
0097 void SetDrawLabels (Standard_Boolean theToDraw) { myToDrawLabels = theToDraw; }
0098 void SetToDrawLabels (Standard_Boolean theToDraw) { myToDrawLabels = theToDraw; }
0099
0100
0101 Standard_Boolean ToDrawArrows() const { return myToDrawArrows; }
0102
0103
0104 void SetDrawArrows (Standard_Boolean theToDraw) { myToDrawArrows = theToDraw; }
0105
0106
0107 Standard_EXPORT void CopyAspectsFrom (const Handle(Prs3d_DatumAspect)& theOther);
0108
0109
0110 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0111
0112 public:
0113
0114
0115 Standard_EXPORT static Prs3d_DatumParts ArrowPartForAxis (Prs3d_DatumParts thePart);
0116
0117 public:
0118
0119
0120 Standard_DEPRECATED("This method is deprecated - TextAspect() with axis parameter should be called instead")
0121 const Handle(Prs3d_TextAspect)& TextAspect() const { return myTextAspects[Prs3d_DatumParts_XAxis]; }
0122
0123 protected:
0124
0125 Handle(Prs3d_ShadingAspect) myShadedAspects[Prs3d_DatumParts_NB];
0126 Handle(Prs3d_LineAspect) myLineAspects[Prs3d_DatumParts_NB];
0127 Handle(Prs3d_TextAspect) myTextAspects[Prs3d_DatumParts_NB];
0128 Handle(Prs3d_PointAspect) myPointAspect;
0129 Handle(Prs3d_ArrowAspect) myArrowAspect;
0130 Standard_Real myAttributes[Prs3d_DatumAttribute_NB];
0131 Prs3d_DatumAxes myAxes;
0132 Standard_Boolean myToDrawLabels;
0133 Standard_Boolean myToDrawArrows;
0134
0135 };
0136
0137 DEFINE_STANDARD_HANDLE(Prs3d_DatumAspect, Prs3d_BasicAspect)
0138
0139 #endif