//! @param theSelection an instance of the selection
void SetSelection (const Handle(AIS_Selection)& theSelection) { mySelection = theSelection; }
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+
protected: //! @name internal methods
Standard_EXPORT void GetDefModes (const Handle(AIS_InteractiveObject)& anIobj, Standard_Integer& Dmode, Standard_Integer& HiMod, Standard_Integer& SelMode) const;
anObj->PolygonOffsets( aMode, aFactor, aUnits );
}
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void AIS_InteractiveContext::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, AIS_InteractiveContext);
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myObjects.Size());
+
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mgrSelector.get());
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainPM.get());
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainVwr.get());
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainSel.get());
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastActiveView);
+
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastPicked.get());
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToHilightSelected);
+
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mySelection.get());
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myFilters.get());
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myDefaultDrawer.get());
+
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_Selected]);
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_Dynamic]);
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_LocalSelected]);
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_LocalDynamic]);
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_SubIntensity]);
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedSeq.Size());
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurDetected);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurHighlighted);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPickingStrategy);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAutoHilight);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAutoActivateSelMode);
+}
setFlag (theToSet, Flags_HatchRotationPersistent);
myHatchingState++;
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void Graphic3d_AspectFillCapping::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_AspectFillCapping);
+
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Graphic3d_Aspects);
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myMaterial);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myMaterial);
+
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myTexture);
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myShader);
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStippleHatch);
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myTextureHatch);
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myHatchMaterial);
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHatchingState);
+}
//! Returns modification counter for hatching state.
Standard_Size HatchingState() const { return myHatchingState; }
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+
private:
enum Flags
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_Aspects);
+ /*Handle(Graphic3d_ShaderProgram) myProgram;
+ Handle(Graphic3d_TextureSet) myTextureSet;
+ Handle(Graphic3d_MarkerImage) myMarkerImage;
+ Handle(Graphic3d_HatchStyle) myHatchStyle;
+ Handle(TCollection_HAsciiString) myTextFont;
+ Graphic3d_MaterialAspect myFrontMaterial;
+ Graphic3d_MaterialAspect myBackMaterial;*/
+
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myInteriorColor);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBackInteriorColor);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myEdgeColor);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToSuppressBackFaces);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToMapTexture);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsTextZoomable);
+
+ /*Aspect_InteriorStyle myInteriorStyle;
+ Graphic3d_TypeOfShadingModel myShadingModel;
+ Graphic3d_AlphaMode myAlphaMode;
+ Standard_ShortReal myAlphaCutoff;
+
+ Aspect_TypeOfLine myLineType;
+ Standard_ShortReal myLineWidth;
+
+ Aspect_TypeOfMarker myMarkerType;
+ Standard_ShortReal myMarkerScale;*/
+
+ if (!myTextFont.IsNull())
+ OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myTextFont->String());
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextStyle);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextDisplayType);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextFontAspect);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextAngle);
}
return Graphic3d_Fresnel (Graphic3d_FM_SCHLICK, aFresnel);
}
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void Graphic3d_Fresnel::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_Fresnel);
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFresnelType);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myFresnelData);
+}
+
// =======================================================================
// function : Graphic3d_BSDF
// purpose :
theAbsorptionCoeff);
return aBSDF;
-}
\ No newline at end of file
+}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void Graphic3d_BSDF::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_BSDF);
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Kc);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Kd);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Ks);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Kt);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Le);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Absorption);
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &FresnelCoat);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &FresnelBase);
+}
return myFresnelType;
}
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+
protected:
//! Creates new Fresnel reflectance factor.
//! Performs comparison of two BSDFs.
Standard_EXPORT bool operator== (const Graphic3d_BSDF& theOther) const;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+
};
#endif // _Graphic3d_BSDF_HeaderFile
// =======================================================================
void Graphic3d_ClipPlane::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_ClipPlane);
+
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySectionStyle.get());
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myEntityUID);
? (const Standard_Byte*)myPredefinedPatterns[myHatchType]
: NULL);
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void Graphic3d_HatchStyle::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_HatchStyle);
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPattern.get());
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHatchType);
+}
return myHatchType;
}
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+
private:
Handle(NCollection_Buffer) myPattern; //!< Image bitmap with custom hatch pattern
const RawMaterial& aMat = THE_MATERIALS[theRank - 1];
return aMat.MaterialType;
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void Graphic3d_MaterialAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_MaterialAspect);
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBSDF);
+ OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myStringName);
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColors[Graphic3d_TOR_AMBIENT]);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColors[Graphic3d_TOR_DIFFUSE]);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColors[Graphic3d_TOR_SPECULAR]);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColors[Graphic3d_TOR_EMISSION]);
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTransparencyCoef);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRefractionIndex);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myShininess);
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaterialType);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaterialName);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRequestedMaterialName);
+}
}
}
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+
private:
//! Initialize the standard material.
// =======================================================================
void Graphic3d_TransformPers::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_TransformPers);
+
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMode)
OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "Params3d", 3, myParams.Params3d.PntX, myParams.Params3d.PntY, myParams.Params3d.PntZ)
#define _NCollection_Buffer_HeaderFile
#include <NCollection_BaseAllocator.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Transient.hxx>
//! Low-level buffer object.
mySize = 0;
}
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const
+ {
+ (void)theDepth;
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myData);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySize);
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myAllocator.get());
+ }
+
protected:
Standard_Byte* myData; //!< data pointer
#include <cstring>
#include <cmath>
#include <NCollection_Vec2.hxx>
+#include <Standard_Dump.hxx>
//! Auxiliary macros to define couple of similar access components as vector methods
#define NCOLLECTION_VEC_COMPONENTS_3D(theX, theY, theZ) \
return NCollection_Vec3 (Element_t(0), Element_t(0), Element_t(1));
}
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const
+ {
+ (void)theDepth;
+ OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "Vec3", 3, v[0], v[1], v[2]);
+ }
+
private:
Element_t v[3]; //!< define the vector as array to avoid structure alignment issues
#define _NCollection_Vec4_H__
#include <NCollection_Vec3.hxx>
+#include <Standard_Dump.hxx>
//! Generic 4-components vector.
//! To be used as RGBA color vector or XYZW 3D-point with special W-component
return aResult /= theRight;
}
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const
+ {
+ (void)theDepth;
+ OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "Vec4", 4, v[0], v[1], v[2], v[3]);
+ }
+
private:
Element_t v[4]; //!< define the vector as array to avoid structure alignment issues
// function : RenderCapping
// purpose :
// =======================================================================
+#include <Message_Alerts.hxx>
+#include <Message_PerfMeter.hxx>
void OpenGl_CappingAlgo::RenderCapping (const Handle(OpenGl_Workspace)& theWorkspace,
const OpenGl_Structure& theStructure)
{
+ Message_PerfMeter aPerfMeter;
+ MESSAGE_INFO ("RenderCapping", "", &aPerfMeter, NULL);
+
const Handle(OpenGl_Context)& aContext = theWorkspace->GetGlContext();
if (!aContext->Clipping().IsCappingOn())
{
{
// get plane being rendered
const Handle(Graphic3d_ClipPlane)& aClipChain = aCappingIt.Value();
+
if (!aClipChain->IsCapping()
|| aCappingIt.IsDisabled())
{
continue;
}
+ Standard_SStream aStream;
+ aClipChain->DumpJson (aStream);
+ MESSAGE_INFO_STREAM(aStream, "ClipChain", "", &aPerfMeter, NULL);
+
Standard_Integer aSubPlaneIndex = 1;
for (const Graphic3d_ClipPlane* aSubPlaneIter = aClipChain.get(); aSubPlaneIter != NULL; aSubPlaneIter = aSubPlaneIter->ChainNextPlane().get(), ++aSubPlaneIndex)
{
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_Drawer);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShadingAspect.get());
+
+ //Handle(Prs3d_Drawer) myLink;
+ /*
+ Standard_Boolean myHasOwnNbPoints;
+ Standard_Real myMaximalParameterValue;
+ Standard_Boolean myHasOwnMaximalParameterValue;
+ Standard_Real myChordialDeviation;
+ Standard_Boolean myHasOwnChordialDeviation;
+ Aspect_TypeOfDeflection myTypeOfDeflection;
+ Standard_Boolean myHasOwnTypeOfDeflection;
+ Prs3d_TypeOfHLR myTypeOfHLR;
+ Standard_Real myDeviationCoefficient;
+ Standard_Real myPreviousDeviationCoefficient;
+ Standard_Boolean myHasOwnDeviationCoefficient;
+ Standard_Real myHLRDeviationCoefficient;
+ Standard_Boolean myHasOwnHLRDeviationCoefficient;
+ Standard_Real myPreviousHLRDeviationCoefficient;
+ Standard_Real myDeviationAngle;
+ Standard_Boolean myHasOwnDeviationAngle;
+ Standard_Real myPreviousDeviationAngle;
+ Standard_Real myHLRAngle;
+ Standard_Boolean myHasOwnHLRDeviationAngle;
+ Standard_Real myPreviousHLRDeviationAngle;
+ Standard_Boolean myIsoOnPlane;
+ Standard_Boolean myHasOwnIsoOnPlane;
+ Standard_Boolean myIsoOnTriangulation;
+ Standard_Boolean myHasOwnIsoOnTriangulation;
+ Standard_Boolean myIsAutoTriangulated;
+ Standard_Boolean myHasOwnIsAutoTriangulated;*/
+
+ /*Handle(Prs3d_IsoAspect) myUIsoAspect;
+ Standard_Boolean myHasOwnUIsoAspect;
+ Handle(Prs3d_IsoAspect) myVIsoAspect;
+ Standard_Boolean myHasOwnVIsoAspect;
+ Handle(Prs3d_LineAspect) myWireAspect;
+ Standard_Boolean myHasOwnWireAspect;
+ Standard_Boolean myWireDraw;
+ Standard_Boolean myHasOwnWireDraw;
+ Handle(Prs3d_PointAspect) myPointAspect;
+ Standard_Boolean myHasOwnPointAspect;
+ Handle(Prs3d_LineAspect) myLineAspect;
+ Standard_Boolean myHasOwnLineAspect;
+ */
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnTextAspect);
+ if (!myTextAspect.IsNull())
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get());
+
+ //Handle(Prs3d_ShadingAspect) myShadingAspect;
+ //Standard_Boolean myHasOwnShadingAspect;
+
+ /*Handle(Prs3d_PlaneAspect) myPlaneAspect;
+ Standard_Boolean myHasOwnPlaneAspect;
+ Handle(Prs3d_LineAspect) mySeenLineAspect;
+ Standard_Boolean myHasOwnSeenLineAspect;
+ Handle(Prs3d_ArrowAspect) myArrowAspect;
+ Standard_Boolean myHasOwnArrowAspect;
+ Standard_Boolean myLineArrowDraw;
+ Standard_Boolean myHasOwnLineArrowDraw;
+ Handle(Prs3d_LineAspect) myHiddenLineAspect;
+ Standard_Boolean myHasOwnHiddenLineAspect;
+ Standard_Boolean myDrawHiddenLine;
+ Standard_Boolean myHasOwnDrawHiddenLine;
+ Handle(Prs3d_LineAspect) myVectorAspect;
+ Standard_Boolean myHasOwnVectorAspect;
+ Prs3d_VertexDrawMode myVertexDrawMode;
+ Handle(Prs3d_DatumAspect) myDatumAspect;
+ Standard_Boolean myHasOwnDatumAspect;
+ Handle(Prs3d_LineAspect) mySectionAspect;
+ Standard_Boolean myHasOwnSectionAspect;
+
+ Handle(Prs3d_LineAspect) myFreeBoundaryAspect;
+ Standard_Boolean myHasOwnFreeBoundaryAspect;
+ Standard_Boolean myFreeBoundaryDraw;
+ Standard_Boolean myHasOwnFreeBoundaryDraw;
+ Handle(Prs3d_LineAspect) myUnFreeBoundaryAspect;
+ Standard_Boolean myHasOwnUnFreeBoundaryAspect;
+ Standard_Boolean myUnFreeBoundaryDraw;
+ Standard_Boolean myHasOwnUnFreeBoundaryDraw;
+ Handle(Prs3d_LineAspect) myFaceBoundaryAspect;
+ Standard_Integer myFaceBoundaryUpperContinuity; //!< the most edge continuity class (GeomAbs_Shape) to be included to face boundaries presentation, or -1 if undefined
+ Standard_Boolean myHasOwnFaceBoundaryAspect;
+ Standard_Boolean myFaceBoundaryDraw;
+ Standard_Boolean myHasOwnFaceBoundaryDraw;
+
+ Handle(Prs3d_DimensionAspect) myDimensionAspect;
+ Standard_Boolean myHasOwnDimensionAspect;
+ Prs3d_DimensionUnits myDimensionModelUnits;
+ Standard_Boolean myHasOwnDimLengthModelUnits;
+ Standard_Boolean myHasOwnDimAngleModelUnits;
+ Prs3d_DimensionUnits myDimensionDisplayUnits;
+ Standard_Boolean myHasOwnDimLengthDisplayUnits;
+ Standard_Boolean myHasOwnDimAngleDisplayUnits;
+ */
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFillCappingAspect);
+ if (!myFillCappingAspect.IsNull())
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myFillCappingAspect.get());
}
Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
//! Dumps the content of me into the stream
- Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(Select3D_InteriorSensitivePointSet,Select3D_SensitiveSet)
void Select3D_SensitiveBox::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveBox);
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBox);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCenter3d);
Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
//! Dumps the content of me into the stream
- Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
private:
void Select3D_SensitiveFace::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveFace);
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySensType);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myFacePoints.get());
Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
//! Dumps the content of me into the stream
- Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
private:
void Select3D_SensitiveGroup::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveGroup);
-
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet);
for (Select3D_IndexedMapOfEntity::Iterator anIterator (myEntities); anIterator.More(); anIterator.Next())
Standard_EXPORT virtual Standard_Integer Size() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
- Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
protected:
void Select3D_SensitivePoint::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitivePoint);
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPoint);
}
Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
//! Dumps the content of me into the stream
- Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
private:
void Select3D_SensitivePoly::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitivePoly);
-
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet);
//Select3D_PointData myPolyg; //!< Points of the poly
const Standard_Integer theIdx2) Standard_OVERRIDE;
//! Dumps the content of me into the stream
- Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
protected:
void Select3D_SensitivePrimitiveArray::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitivePrimitiveArray);
-
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet);
//Handle(Select3D_PrimArraySubGroupArray) myGroups; //!< sub-groups of sensitive entities
Standard_Integer LastDetectedEdgeNode2() const { return myDetectedEdgeNode2; }
//! Dumps the content of me into the stream
- Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
public:
void Select3D_SensitiveSegment::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveSegment);
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myStart);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myEnd);
void EndPoint (const gp_Pnt& thePnt) { myEnd = thePnt; }
//! Dumps the content of me into the stream
- Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
private:
//function : DumpJson
//purpose :
//=======================================================================
-void Select3D_SensitiveSet::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void Select3D_SensitiveSet::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveSet);
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedIdx);
}
Standard_Integer GetLeafNodeSize() const { return myContent.Builder()->LeafNodeSize(); }
//! Dumps the content of me into the stream
- Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
protected:
void Select3D_SensitiveTriangle::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveTriangle);
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySensType);
virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE { return myCentroid; }
//! Dumps the content of me into the stream
- Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
public:
void Select3D_SensitiveTriangulation::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveTriangulation);
-
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet);
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTriangul.get());
const TopLoc_Location& GetInitLocation() const { return myInitLocation; }
//! Dumps the content of me into the stream
- Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
protected:
const Standard_Integer theIdx2) Standard_OVERRIDE;
//! Dumps the content of me into the stream
- Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveWire,Select3D_SensitiveSet)
{
OCCT_DUMP_CLASS_BEGIN (theOStream, TopoDS_TShape);
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags);
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, ShapeType());
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbChildren());
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Free());
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Free());
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Locked());
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Modified());
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Checked());
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Orientable());
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Closed());
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Infinite());
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Convex());
+
+ //for (TopoDS_ListIteratorOfListOfShape anIterator (myShapes); anIterator.More(); anIterator.Next())
+ //{
+ // const TopoDS_Shape& subShape = anIterator.Value();
+ // OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &subShape);
+ //}
}
int aNbProperties = 1; // item to visualize Filters/Drawer information of context
int aNbPresentations = 0;
- Handle(AIS_InteractiveContext) aContext = GetContext();
+ Handle(AIS_InteractiveContext) aContext = Handle(AIS_InteractiveContext)::DownCast (GetObject());
if (aContext.IsNull())
return 0;
if (theItemRole != Qt::DisplayRole && theItemRole != Qt::EditRole && theItemRole != Qt::ToolTipRole)
return QVariant();
- if (GetContext().IsNull())
+ Handle(AIS_InteractiveContext) aContext = Handle(AIS_InteractiveContext)::DownCast (GetObject());
+ if (aContext.IsNull())
return Column() == 0 ? "Empty context" : "";
switch (Column())
{
- case 0: return GetContext()->DynamicType()->Name();
+ case 0: return aContext->DynamicType()->Name();
case 4:
{
Handle(AIS_InteractiveObject) anEmptyIO;
- int aSelectedCount = VInspector_Tools::SelectedOwners (GetContext(), anEmptyIO, false);
+ int aSelectedCount = VInspector_Tools::SelectedOwners (aContext, anEmptyIO, false);
return aSelectedCount > 0 ? QString::number (aSelectedCount) : "";
}
- case 6: return GetContext()->DeviationCoefficient();
+ case 6: return aContext->DeviationCoefficient();
default:
break;
}
return QVariant();
}
+// =======================================================================
+// function : Init
+// purpose :
+// =======================================================================
+void VInspector_ItemContext::Init()
+{
+ Handle(AIS_InteractiveContext) aContext = GetContext();
+ if (aContext.IsNull())
+ return;
+
+ TreeModel_ItemBase::Init();
+}
+
+// =======================================================================
+// function : Reset
+// purpose :
+// =======================================================================
+void VInspector_ItemContext::Reset()
+{
+ VInspector_ItemBase::Reset();
+}
+
+// =======================================================================
+// function : initItem
+// purpose :
+// =======================================================================
+void VInspector_ItemContext::initItem() const
+{
+ if (IsInitialized())
+ return;
+ const_cast<VInspector_ItemContext*>(this)->Init();
+}
+
// =======================================================================
// function : createChild
// purpose :
else
return VInspector_ItemPresentableObject::CreateItem (currentItem(), theRow, theColumn);
}
+
+// =======================================================================
+// function : GetStream
+// purpose :
+// =======================================================================
+void VInspector_ItemContext::GetStream (Standard_OStream& theOStream) const
+{
+ Handle(AIS_InteractiveContext) aContext = GetContext();
+ if (aContext.IsNull())
+ return;
+
+ aContext->DumpJson (theOStream);
+}
//! \return the value
Standard_EXPORT virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE;
+ //! Returns stream value of the item to fulfill property panel.
+ //! \return stream value or dummy
+ Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE;
+
+ //! Inits the item, fills internal containers
+ Standard_EXPORT virtual void Init() Standard_OVERRIDE;
+
+ //! Resets cached values
+ Standard_EXPORT virtual void Reset() Standard_OVERRIDE;
+
protected:
//! Initialize the current item. It creates a backup of the specific item information
//! Do nothing as context has been already set into item
- virtual void initItem() const Standard_OVERRIDE {}
+ virtual void initItem() const Standard_OVERRIDE;
protected: