return true;
}
+ //! Dumps the content of me into the stream
+ virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE
+ {
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_BoundBuffer);
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, NCollection_Buffer);
+
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, Colors);
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, Bounds);
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbBounds);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbMaxBounds);
+ }
+
public:
Graphic3d_Vec4* Colors; //!< pointer to facet color values
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_IndexBuffer, Graphic3d_Buffer)
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_BoundBuffer, NCollection_Buffer)
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MutableIndexBuffer, Graphic3d_IndexBuffer)
+
+// =======================================================================
+// function : DumpJson
+// purpose :
+// =======================================================================
+void Graphic3d_Buffer::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_Buffer);
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, NCollection_Buffer);
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Stride);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbElements);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbAttributes);
+}
\ No newline at end of file
//! Invalidate entire buffer.
virtual void Invalidate() {}
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
public:
Standard_Integer Stride; //!< the distance to the attributes of the next vertex within interleaved array
}
}
+ //! Dumps the content of me into the stream
+ virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE
+ {
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_IndexBuffer);
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Graphic3d_Buffer);
+ }
};
// function : DumpJson
// purpose :
// =======================================================================
-void Graphic3d_TransformPers::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void Graphic3d_TransformPers::PersParams3d::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+{
+ gp_Pnt anAttachPoint (PntX, PntY, PntZ);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &anAttachPoint);
+}
+
+// =======================================================================
+// function : DumpJson
+// purpose :
+// =======================================================================
+void Graphic3d_TransformPers::PersParams2d::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+{
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, OffsetX);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, OffsetY);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Corner);
+}
+
+// =======================================================================
+// function : DumpJson
+// purpose :
+// =======================================================================
+void Graphic3d_TransformPers::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) 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)
- OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "Params2d", 3, myParams.Params2d.OffsetX, myParams.Params2d.OffsetY, myParams.Params2d.Corner)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myParams.Params3d);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myParams.Params2d);
}
Standard_Real PntX;
Standard_Real PntY;
Standard_Real PntZ;
+
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
};
//! 2d/trihedron transformation persistence parameters.
Standard_Integer OffsetX;
Standard_Integer OffsetY;
Aspect_TypeOfTriedronPosition Corner;
+
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
};
private:
}
//! Dumps the content of me into the stream
- Standard_EXPORT 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
{
(void)theDepth;
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myData);
// =======================================================================
void OpenGl_Element::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_Element);
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, this);
}
{
return GL_ELEMENT_ARRAY_BUFFER;
}
+
+// =======================================================================
+// function : DumpJson
+// purpose :
+// =======================================================================
+void OpenGl_IndexBuffer::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_IndexBuffer)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, OpenGl_VertexBuffer);
+}
Standard_EXPORT OpenGl_IndexBuffer();
Standard_EXPORT virtual GLenum GetTarget() 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_OVERRIDE;
+
public:
DEFINE_STANDARD_RTTIEXT(OpenGl_IndexBuffer,OpenGl_VertexBuffer) // Type definition
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, OpenGl_Element);
- //OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAspect.get());
- //OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myShadingModel);
- //mutable Handle(OpenGl_VertexBuffer) myVboIndices;
- //mutable Handle(OpenGl_VertexBuffer) myVboAttribs;
- //mutable Handle(Graphic3d_IndexBuffer) myIndices;
- //mutable Handle(Graphic3d_Buffer) myAttribs;
- //mutable Handle(Graphic3d_BoundBuffer) myBounds;
- //GLshort myDrawMode;
- //mutable Standard_Boolean myIsFillType;
- //mutable Standard_Boolean myIsVboInit;
- //Standard_Size myUID; //!< Unique ID of primitive array.
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myVboIndices.get());
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myVboAttribs.get());
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myIndices.get());
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAttribs.get());
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myBounds.get());
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDrawMode);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsFillType);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsVboInit);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUID);
}
// function : DumpJson
// purpose :
// =======================================================================
-void OpenGl_VertexBuffer::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void OpenGl_VertexBuffer::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, OpenGl_VertexBuffer)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, OpenGl_Resource);
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myOffset);
Standard_EXPORT virtual void UnbindAllAttributes (const Handle(OpenGl_Context)& theGlCtx) const;
//! 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:
return;
NCollection_List<Handle(Standard_Transient)> aPresentations;
- MessageModel_ItemRootPtr aRootItem;
QModelIndexList aSelectedIndices = myTreeView->selectionModel()->selectedIndexes();
for (QModelIndexList::const_iterator aSelIt = aSelectedIndices.begin(); aSelIt != aSelectedIndices.end(); aSelIt++)
{
if (myPropertyPanelWidget->toggleViewAction()->isChecked())
updatePropertyPanelBySelection();
- QModelIndex aTreeItemIndex = TreeModel_ModelBase::SingleSelected (myTreeView->selectionModel()->selectedIndexes(), 0);
- TreeModel_ItemBasePtr aTreeItemSelected = TreeModel_ModelBase::GetItemByIndex (aTreeItemIndex);
- if (!aTreeItemSelected)
- return;
-
NCollection_List<Handle(Standard_Transient)> aSelPresentations;
- Handle(TreeModel_ItemProperties) anItemProperties = aTreeItemSelected->Properties ();
- if (anItemProperties)
- anItemProperties->GetPresentations (-1, -1, aSelPresentations);
- //else
+ QModelIndexList aSelectedIndices = myTreeView->selectionModel()->selectedIndexes();
+ for (QModelIndexList::const_iterator aSelIt = aSelectedIndices.begin(); aSelIt != aSelectedIndices.end(); aSelIt++)
+ {
+ QModelIndex anIndex = *aSelIt;
+ if (anIndex.column() != 0)
+ continue;
+
+ TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex);
+ if (!anItemBase)
+ continue;
+
+ Handle(TreeModel_ItemProperties) anItemProperties = anItemBase->Properties();
+ if (anItemProperties)
+ {
+ anItemProperties->GetPresentations (-1, -1, aSelPresentations);
+ }
+ }
+
GetSelectedShapes (aSelPresentations);
myDisplayPreview->UpdatePreview (View_DisplayActionType_DisplayId, aSelPresentations);