mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0031354: Visualization - Dump improvement for V3d, Graphic3d, Aspect
- do not dump light in view as it's dumped in the viewer
This commit is contained in:
@@ -64,6 +64,9 @@ public:
|
||||
memset (myMinVertsProjections, 0, sizeof (myMinVertsProjections));
|
||||
}
|
||||
|
||||
//! Dumps the content of me into the stream
|
||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
// SAT Tests for different objects
|
||||
|
@@ -461,3 +461,49 @@ Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const gp_Pnt& thePnt1,
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DumpJson
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
template <int N>
|
||||
void SelectMgr_Frustum<N>::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
||||
{
|
||||
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
||||
|
||||
const Standard_Integer anIncFactor = (myIsOrthographic && N == 4) ? 2 : 1;
|
||||
for (Standard_Integer aPlaneIdx = 0; aPlaneIdx < N + 1; aPlaneIdx += anIncFactor)
|
||||
{
|
||||
const gp_Vec& aPlane = myPlanes[aPlaneIdx];
|
||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aPlane)
|
||||
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaxVertsProjections[aPlaneIdx])
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMinVertsProjections[aPlaneIdx])
|
||||
}
|
||||
|
||||
for (Standard_Integer aVertIdx = 0; aVertIdx < N * 2; ++aVertIdx)
|
||||
{
|
||||
const gp_Pnt& aVertex = myVertices[aVertIdx];
|
||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aVertex)
|
||||
}
|
||||
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPixelTolerance)
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsOrthographic)
|
||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myBuilder)
|
||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myCamera)
|
||||
|
||||
for (Standard_Integer anIndex = 0; anIndex < 3; anIndex++)
|
||||
{
|
||||
Standard_Real aMaxOrthoVertsProjections = myMaxOrthoVertsProjections[anIndex];
|
||||
Standard_Real aMinOrthoVertsProjections = myMinOrthoVertsProjections[anIndex];
|
||||
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aMaxOrthoVertsProjections)
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aMinOrthoVertsProjections)
|
||||
}
|
||||
|
||||
for (Standard_Integer anIndex = 0; anIndex < 6; anIndex++)
|
||||
{
|
||||
const gp_Vec& anEdgeDir = myEdgeDirs[anIndex];
|
||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &anEdgeDir)
|
||||
}
|
||||
}
|
||||
|
@@ -763,3 +763,20 @@ void SelectMgr_RectangularFrustum::GetPlanes (NCollection_Vector<SelectMgr_Vec4>
|
||||
thePlaneEquations.Append (anEquation);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DumpJson
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SelectMgr_RectangularFrustum::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
||||
{
|
||||
OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_RectangularFrustum)
|
||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_Frustum)
|
||||
|
||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myNearPickedPnt)
|
||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myFarPickedPnt)
|
||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myViewRayDir)
|
||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myMousePos)
|
||||
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myScale)
|
||||
}
|
||||
|
@@ -129,6 +129,9 @@ public:
|
||||
//! Ax + By + Cz + D = 0) to the given vector
|
||||
Standard_EXPORT virtual void GetPlanes (NCollection_Vector<SelectMgr_Vec4>& thePlaneEquations) const Standard_OVERRIDE;
|
||||
|
||||
//! Dumps the content of me into the stream
|
||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
Standard_EXPORT void segmentSegmentDistance (const gp_Pnt& theSegPnt1,
|
||||
|
@@ -495,7 +495,7 @@ void SelectMgr_SelectingVolumeManager::DumpJson (Standard_OStream& theOStream, S
|
||||
for (Standard_Integer anIdx = 0; anIdx < VolumeTypesNb; ++anIdx)
|
||||
{
|
||||
const Handle(SelectMgr_BaseFrustum)& aSelectingVolume = mySelectingVolumes[anIdx];
|
||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, aSelectingVolume.get())
|
||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aSelectingVolume.get())
|
||||
}
|
||||
|
||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myViewClipPlanes.get())
|
||||
|
@@ -35,7 +35,7 @@ public:
|
||||
|
||||
//! Return the Selector.
|
||||
const Handle(SelectMgr_ViewerSelector)& Selector() const { return mySelector; }
|
||||
|
||||
|
||||
//! Returns true if the manager contains the selectable object theObject.
|
||||
Standard_EXPORT Standard_Boolean Contains (const Handle(SelectMgr_SelectableObject)& theObject) const;
|
||||
|
||||
|
@@ -302,3 +302,13 @@ void SelectMgr_TriangularFrustum::GetPlanes (NCollection_Vector<SelectMgr_Vec4>&
|
||||
thePlaneEquations.Append (aPlaneEquation);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DumpJson
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SelectMgr_TriangularFrustum::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
||||
{
|
||||
OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_TriangularFrustum)
|
||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_Frustum)
|
||||
}
|
@@ -93,6 +93,9 @@ public:
|
||||
//! Ax + By + Cz + D = 0) to the given vector
|
||||
Standard_EXPORT virtual void GetPlanes (NCollection_Vector<SelectMgr_Vec4>& thePlaneEquations) const Standard_OVERRIDE;
|
||||
|
||||
//! Dumps the content of me into the stream
|
||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
void cacheVertexProjections (SelectMgr_TriangularFrustum* theFrustum) const;
|
||||
|
@@ -421,4 +421,20 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::segmentTriangleIntersection (co
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DumpJson
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SelectMgr_TriangularFrustumSet::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
||||
{
|
||||
OCCT_DUMP_CLASS_BEGIN (theOStream, SelectMgr_TriangularFrustumSet)
|
||||
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_BaseFrustum)
|
||||
|
||||
for (SelectMgr_TriangFrustumsIter anIter (myFrustums); anIter.More(); anIter.Next())
|
||||
{
|
||||
const Handle(SelectMgr_TriangularFrustum)& aFrustum = anIter.Value();
|
||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aFrustum.get())
|
||||
}
|
||||
}
|
||||
|
||||
#undef MEMORY_BLOCK_SIZE
|
||||
|
@@ -88,6 +88,9 @@ public:
|
||||
//! mark both included and overlapped entities as matched
|
||||
Standard_EXPORT virtual void SetAllowOverlapDetection (const Standard_Boolean theIsToAllow);
|
||||
|
||||
//! Dumps the content of me into the stream
|
||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
//! Checks whether the segment intersects with the boundary of the current volume selection
|
||||
|
@@ -1095,7 +1095,7 @@ void SelectMgr_ViewerSelector::DumpJson (Standard_OStream& theOStream, Standard_
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToUpdateTolerance)
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mystored.Extent())
|
||||
|
||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &mySelectingVolumeMgr)
|
||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &mySelectingVolumeMgr)
|
||||
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &mySelectableObjects)
|
||||
|
||||
Standard_Integer aNbOfSelectableObjects = 0;
|
||||
|
Reference in New Issue
Block a user