Warning, file /include/opencascade/Graphic3d_Group.hxx was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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_Flipper.hxx>
0023 #include <NCollection_DataMap.hxx>
0024 #include <Standard_CString.hxx>
0025 #include <Graphic3d_Vertex.hxx>
0026 #include <Graphic3d_TextPath.hxx>
0027 #include <Graphic3d_HorizontalTextAlignment.hxx>
0028 #include <Graphic3d_VerticalTextAlignment.hxx>
0029 #include <Graphic3d_TypeOfPrimitiveArray.hxx>
0030 #include <Graphic3d_IndexBuffer.hxx>
0031 #include <Graphic3d_Buffer.hxx>
0032 #include <Graphic3d_BoundBuffer.hxx>
0033 #include <gp_Ax2.hxx>
0034 #include <TCollection_ExtendedString.hxx>
0035 class Graphic3d_Aspects;
0036
0037 class Graphic3d_Structure;
0038 class Graphic3d_ArrayOfPrimitives;
0039 class Graphic3d_Text;
0040 class Graphic3d_TransformPers;
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
0071 class Graphic3d_Group : public Standard_Transient
0072 {
0073 friend class Graphic3d_Structure;
0074 DEFINE_STANDARD_RTTIEXT(Graphic3d_Group, Standard_Transient)
0075
0076 public:
0077
0078
0079
0080
0081
0082
0083
0084 Standard_EXPORT virtual void Clear(const bool theUpdateStructureMgr = true);
0085
0086
0087 Standard_EXPORT ~Graphic3d_Group() override;
0088
0089
0090
0091
0092
0093 Standard_EXPORT void Remove();
0094
0095 public:
0096
0097 virtual occ::handle<Graphic3d_Aspects> Aspects() const = 0;
0098
0099
0100 virtual void SetGroupPrimitivesAspect(const occ::handle<Graphic3d_Aspects>& theAspect) = 0;
0101
0102
0103
0104 virtual void SetPrimitivesAspect(const occ::handle<Graphic3d_Aspects>& theAspect) = 0;
0105
0106
0107 virtual void SynchronizeAspects() = 0;
0108
0109
0110 virtual void ReplaceAspects(
0111 const NCollection_DataMap<occ::handle<Graphic3d_Aspects>, occ::handle<Graphic3d_Aspects>>&
0112 theMap) = 0;
0113
0114
0115 Standard_EXPORT virtual void AddText(const occ::handle<Graphic3d_Text>& theTextParams,
0116 const bool theToEvalMinMax = true);
0117
0118
0119 Standard_EXPORT virtual void AddPrimitiveArray(
0120 const Graphic3d_TypeOfPrimitiveArray theType,
0121 const occ::handle<Graphic3d_IndexBuffer>& theIndices,
0122 const occ::handle<Graphic3d_Buffer>& theAttribs,
0123 const occ::handle<Graphic3d_BoundBuffer>& theBounds,
0124 const bool theToEvalMinMax = true);
0125
0126
0127 Standard_EXPORT void AddPrimitiveArray(const occ::handle<Graphic3d_ArrayOfPrimitives>& thePrim,
0128 const bool theToEvalMinMax = true);
0129
0130 public:
0131
0132 Standard_EXPORT virtual void SetStencilTestOptions(const bool theIsEnabled) = 0;
0133
0134
0135 Standard_EXPORT virtual void SetFlippingOptions(const bool theIsEnabled,
0136 const gp_Ax2& theRefPlane) = 0;
0137
0138
0139 const occ::handle<Graphic3d_Flipper>& Flipper() const { return myFlipper; }
0140
0141
0142 const gp_Trsf& Transformation() const { return myTrsf; }
0143
0144
0145 virtual void SetTransformation(const gp_Trsf& theTrsf) { myTrsf = theTrsf; }
0146
0147
0148 const occ::handle<Graphic3d_TransformPers>& TransformPersistence() const { return myTrsfPers; }
0149
0150
0151 Standard_EXPORT virtual void SetTransformPersistence(
0152 const occ::handle<Graphic3d_TransformPers>& theTrsfPers);
0153
0154
0155
0156
0157 Standard_EXPORT bool IsDeleted() const;
0158
0159
0160 Standard_EXPORT bool IsEmpty() const;
0161
0162
0163 Standard_EXPORT void MinMaxValues(double& theXMin,
0164 double& theYMin,
0165 double& theZMin,
0166 double& theXMax,
0167 double& theYMax,
0168 double& theZMax) const;
0169
0170
0171 Standard_EXPORT void SetMinMaxValues(const double theXMin,
0172 const double theYMin,
0173 const double theZMin,
0174 const double theXMax,
0175 const double theYMax,
0176 const double theZMax);
0177
0178
0179 const Graphic3d_BndBox4f& BoundingBox() const { return myBounds; }
0180
0181
0182 Graphic3d_BndBox4f& ChangeBoundingBox() { return myBounds; }
0183
0184
0185 Standard_EXPORT occ::handle<Graphic3d_Structure> Structure() const;
0186
0187
0188
0189 void SetClosed(const bool theIsClosed) { myIsClosed = theIsClosed; }
0190
0191
0192
0193 bool IsClosed() const { return myIsClosed; }
0194
0195
0196 public:
0197 Standard_DEPRECATED(
0198 "Deprecated method Marker(), pass Graphic3d_ArrayOfPoints to AddPrimitiveArray() instead")
0199 Standard_EXPORT void Marker(const Graphic3d_Vertex& thePoint, const bool theToEvalMinMax = true);
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211 Standard_DEPRECATED(
0212 "Deprecated method Text() with obsolete arguments, use AddText() instead of it")
0213 Standard_EXPORT virtual void Text(const char* const AText,
0214 const Graphic3d_Vertex& APoint,
0215 const double AHeight,
0216 const double AAngle,
0217 const Graphic3d_TextPath ATp,
0218 const Graphic3d_HorizontalTextAlignment AHta,
0219 const Graphic3d_VerticalTextAlignment AVta,
0220 const bool EvalMinMax = true);
0221
0222
0223
0224
0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235 Standard_DEPRECATED(
0236 "Deprecated method Text() with obsolete arguments, use AddText() instead of it")
0237 Standard_EXPORT void Text(const char* const AText,
0238 const Graphic3d_Vertex& APoint,
0239 const double AHeight,
0240 const bool EvalMinMax = true);
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252 Standard_DEPRECATED(
0253 "Deprecated method Text() with obsolete arguments, use AddText() instead of it")
0254 Standard_EXPORT void Text(const TCollection_ExtendedString& AText,
0255 const Graphic3d_Vertex& APoint,
0256 const double AHeight,
0257 const double AAngle,
0258 const Graphic3d_TextPath ATp,
0259 const Graphic3d_HorizontalTextAlignment AHta,
0260 const Graphic3d_VerticalTextAlignment AVta,
0261 const bool EvalMinMax = true);
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271
0272
0273
0274
0275
0276 Standard_DEPRECATED(
0277 "Deprecated method Text() with obsolete arguments, use AddText() instead of it")
0278 Standard_EXPORT void Text(const TCollection_ExtendedString& AText,
0279 const Graphic3d_Vertex& APoint,
0280 const double AHeight,
0281 const bool EvalMinMax = true);
0282
0283
0284 Standard_DEPRECATED(
0285 "Deprecated method Text() with obsolete arguments, use AddText() instead of it")
0286 Standard_EXPORT virtual void Text(const char* const theTextUtf,
0287 const gp_Ax2& theOrientation,
0288 const double theHeight,
0289 const double theAngle,
0290 const Graphic3d_TextPath theTp,
0291 const Graphic3d_HorizontalTextAlignment theHTA,
0292 const Graphic3d_VerticalTextAlignment theVTA,
0293 const bool theToEvalMinMax = true,
0294 const bool theHasOwnAnchor = true);
0295
0296
0297 Standard_DEPRECATED(
0298 "Deprecated method Text() with obsolete arguments, use AddText() instead of it")
0299 Standard_EXPORT virtual void Text(const TCollection_ExtendedString& theText,
0300 const gp_Ax2& theOrientation,
0301 const double theHeight,
0302 const double theAngle,
0303 const Graphic3d_TextPath theTp,
0304 const Graphic3d_HorizontalTextAlignment theHTA,
0305 const Graphic3d_VerticalTextAlignment theVTA,
0306 const bool theToEvalMinMax = true,
0307 const bool theHasOwnAnchor = true);
0308
0309
0310 Standard_EXPORT virtual void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const;
0311
0312 protected:
0313
0314 Standard_EXPORT Graphic3d_Group(const occ::handle<Graphic3d_Structure>& theStructure);
0315
0316
0317
0318 Standard_EXPORT void Update() const;
0319
0320 protected:
0321 occ::handle<Graphic3d_TransformPers> myTrsfPers;
0322 occ::handle<Graphic3d_Flipper> myFlipper;
0323 Graphic3d_Structure* myStructure;
0324 Graphic3d_BndBox4f myBounds;
0325 gp_Trsf myTrsf;
0326 bool myIsClosed;
0327 };
0328
0329 #endif