File indexing completed on 2025-01-18 10:03:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Graphic3d_Group_HeaderFile
0018 #define _Graphic3d_Group_HeaderFile
0019
0020 #include <Graphic3d_BndBox4f.hxx>
0021 #include <Graphic3d_AspectFillArea3d.hxx>
0022 #include <Graphic3d_MapOfAspectsToAspects.hxx>
0023 #include <Standard_CString.hxx>
0024 #include <Graphic3d_Vertex.hxx>
0025 #include <Graphic3d_TextPath.hxx>
0026 #include <Graphic3d_HorizontalTextAlignment.hxx>
0027 #include <Graphic3d_VerticalTextAlignment.hxx>
0028 #include <Graphic3d_TypeOfPrimitiveArray.hxx>
0029 #include <Graphic3d_IndexBuffer.hxx>
0030 #include <Graphic3d_Buffer.hxx>
0031 #include <Graphic3d_BoundBuffer.hxx>
0032 #include <gp_Ax2.hxx>
0033 #include <TCollection_ExtendedString.hxx>
0034
0035 class Graphic3d_Structure;
0036 class Graphic3d_ArrayOfPrimitives;
0037 class Graphic3d_Text;
0038 class Graphic3d_TransformPers;
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070 class Graphic3d_Group : public Standard_Transient
0071 {
0072 friend class Graphic3d_Structure;
0073 DEFINE_STANDARD_RTTIEXT(Graphic3d_Group,Standard_Transient)
0074
0075 public:
0076
0077
0078
0079
0080
0081
0082
0083
0084 Standard_EXPORT virtual void Clear (const Standard_Boolean theUpdateStructureMgr = Standard_True);
0085
0086
0087 Standard_EXPORT virtual ~Graphic3d_Group();
0088
0089
0090
0091
0092
0093 Standard_EXPORT void Remove();
0094
0095 public:
0096
0097
0098 virtual Handle(Graphic3d_Aspects) Aspects() const = 0;
0099
0100
0101 virtual void SetGroupPrimitivesAspect (const Handle(Graphic3d_Aspects)& theAspect) = 0;
0102
0103
0104 virtual void SetPrimitivesAspect (const Handle(Graphic3d_Aspects)& theAspect) = 0;
0105
0106
0107 virtual void SynchronizeAspects() = 0;
0108
0109
0110 virtual void ReplaceAspects (const Graphic3d_MapOfAspectsToAspects& theMap) = 0;
0111
0112
0113 Standard_EXPORT virtual void AddText (const Handle(Graphic3d_Text)& theTextParams,
0114 const Standard_Boolean theToEvalMinMax = Standard_True);
0115
0116
0117 Standard_EXPORT virtual void AddPrimitiveArray (const Graphic3d_TypeOfPrimitiveArray theType,
0118 const Handle(Graphic3d_IndexBuffer)& theIndices,
0119 const Handle(Graphic3d_Buffer)& theAttribs,
0120 const Handle(Graphic3d_BoundBuffer)& theBounds,
0121 const Standard_Boolean theToEvalMinMax = Standard_True);
0122
0123
0124 Standard_EXPORT void AddPrimitiveArray (const Handle(Graphic3d_ArrayOfPrimitives)& thePrim, const Standard_Boolean theToEvalMinMax = Standard_True);
0125
0126 public:
0127
0128
0129 Standard_EXPORT virtual void SetStencilTestOptions (const Standard_Boolean theIsEnabled) = 0;
0130
0131
0132 Standard_EXPORT virtual void SetFlippingOptions (const Standard_Boolean theIsEnabled, const gp_Ax2& theRefPlane) = 0;
0133
0134
0135 const Handle(Graphic3d_TransformPers)& TransformPersistence() const { return myTrsfPers; }
0136
0137
0138 Standard_EXPORT virtual void SetTransformPersistence (const Handle(Graphic3d_TransformPers)& theTrsfPers);
0139
0140
0141
0142
0143 Standard_EXPORT Standard_Boolean IsDeleted() const;
0144
0145
0146 Standard_EXPORT Standard_Boolean IsEmpty() const;
0147
0148
0149 Standard_EXPORT void MinMaxValues (Standard_Real& theXMin, Standard_Real& theYMin, Standard_Real& theZMin,
0150 Standard_Real& theXMax, Standard_Real& theYMax, Standard_Real& theZMax) const;
0151
0152
0153 Standard_EXPORT void SetMinMaxValues (const Standard_Real theXMin, const Standard_Real theYMin, const Standard_Real theZMin,
0154 const Standard_Real theXMax, const Standard_Real theYMax, const Standard_Real theZMax);
0155
0156
0157 const Graphic3d_BndBox4f& BoundingBox() const { return myBounds; }
0158
0159
0160 Graphic3d_BndBox4f& ChangeBoundingBox() { return myBounds; }
0161
0162
0163 Standard_EXPORT Handle(Graphic3d_Structure) Structure() const;
0164
0165
0166 void SetClosed (const bool theIsClosed) { myIsClosed = theIsClosed; }
0167
0168
0169 bool IsClosed() const { return myIsClosed; }
0170
0171
0172 public:
0173
0174 Standard_DEPRECATED("Deprecated method Marker(), pass Graphic3d_ArrayOfPoints to AddPrimitiveArray() instead")
0175 Standard_EXPORT void Marker (const Graphic3d_Vertex& thePoint, const Standard_Boolean theToEvalMinMax = Standard_True);
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187 Standard_DEPRECATED("Deprecated method Text() with obsolete arguments, use AddText() instead of it")
0188 Standard_EXPORT virtual void Text (const Standard_CString AText,
0189 const Graphic3d_Vertex& APoint,
0190 const Standard_Real AHeight,
0191 const Standard_Real AAngle,
0192 const Graphic3d_TextPath ATp,
0193 const Graphic3d_HorizontalTextAlignment AHta,
0194 const Graphic3d_VerticalTextAlignment AVta,
0195 const Standard_Boolean EvalMinMax = Standard_True);
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210 Standard_DEPRECATED("Deprecated method Text() with obsolete arguments, use AddText() instead of it")
0211 Standard_EXPORT void Text (const Standard_CString AText,
0212 const Graphic3d_Vertex& APoint,
0213 const Standard_Real AHeight,
0214 const Standard_Boolean EvalMinMax = Standard_True);
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224
0225
0226 Standard_DEPRECATED("Deprecated method Text() with obsolete arguments, use AddText() instead of it")
0227 Standard_EXPORT void Text (const TCollection_ExtendedString& AText,
0228 const Graphic3d_Vertex& APoint,
0229 const Standard_Real AHeight,
0230 const Standard_Real AAngle,
0231 const Graphic3d_TextPath ATp,
0232 const Graphic3d_HorizontalTextAlignment AHta,
0233 const Graphic3d_VerticalTextAlignment AVta,
0234 const Standard_Boolean EvalMinMax = Standard_True);
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249 Standard_DEPRECATED("Deprecated method Text() with obsolete arguments, use AddText() instead of it")
0250 Standard_EXPORT void Text (const TCollection_ExtendedString& AText,
0251 const Graphic3d_Vertex& APoint,
0252 const Standard_Real AHeight,
0253 const Standard_Boolean EvalMinMax = Standard_True);
0254
0255
0256 Standard_DEPRECATED("Deprecated method Text() with obsolete arguments, use AddText() instead of it")
0257 Standard_EXPORT virtual void Text (const Standard_CString theTextUtf,
0258 const gp_Ax2& theOrientation,
0259 const Standard_Real theHeight,
0260 const Standard_Real theAngle,
0261 const Graphic3d_TextPath theTp,
0262 const Graphic3d_HorizontalTextAlignment theHTA,
0263 const Graphic3d_VerticalTextAlignment theVTA,
0264 const Standard_Boolean theToEvalMinMax = Standard_True,
0265 const Standard_Boolean theHasOwnAnchor = Standard_True);
0266
0267
0268 Standard_DEPRECATED("Deprecated method Text() with obsolete arguments, use AddText() instead of it")
0269 Standard_EXPORT virtual void Text (const TCollection_ExtendedString& theText,
0270 const gp_Ax2& theOrientation,
0271 const Standard_Real theHeight,
0272 const Standard_Real theAngle,
0273 const Graphic3d_TextPath theTp,
0274 const Graphic3d_HorizontalTextAlignment theHTA,
0275 const Graphic3d_VerticalTextAlignment theVTA,
0276 const Standard_Boolean theToEvalMinMax = Standard_True,
0277 const Standard_Boolean theHasOwnAnchor = Standard_True);
0278
0279
0280
0281 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
0282
0283 protected:
0284
0285
0286 Standard_EXPORT Graphic3d_Group(const Handle(Graphic3d_Structure)& theStructure);
0287
0288
0289
0290 Standard_EXPORT void Update() const;
0291
0292 protected:
0293
0294 Handle(Graphic3d_TransformPers) myTrsfPers;
0295 Graphic3d_Structure* myStructure;
0296 Graphic3d_BndBox4f myBounds;
0297 bool myIsClosed;
0298
0299 };
0300
0301 DEFINE_STANDARD_HANDLE(Graphic3d_Group, Standard_Transient)
0302
0303 #endif