#include <BinMXCAFDoc_AnimationDriver.hxx>
#include <BinObjMgt_Persistent.hxx>
-#include <CDM_MessageDriver.hxx>
+#include <Message_Messenger.hxx>
#include <Standard_Type.hxx>
#include <TCollection_HAsciiString.hxx>
#include <TDF_Attribute.hxx>
//purpose :
//=======================================================================
BinMXCAFDoc_AnimationDriver::BinMXCAFDoc_AnimationDriver
- (const Handle(CDM_MessageDriver)& theMsgDriver)
+ (const Handle(Message_Messenger)& theMsgDriver)
: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_Animation)->Name())
{
}
BinObjMgt_RRelocationTable& /*theRelocTable*/) const
{
Handle(XCAFDoc_Animation) anAtt = Handle(XCAFDoc_Animation)::DownCast(theTarget);
- Standard_Real aDensity;
TCollection_AsciiString aName;
if (!(theSource >> aName))
#include <Standard_Boolean.hxx>
#include <BinObjMgt_RRelocationTable.hxx>
#include <BinObjMgt_SRelocationTable.hxx>
-class CDM_MessageDriver;
+class Message_Messenger;
class TDF_Attribute;
class BinObjMgt_Persistent;
public:
- Standard_EXPORT BinMXCAFDoc_AnimationDriver(const Handle(CDM_MessageDriver)& theMsgDriver);
+ Standard_EXPORT BinMXCAFDoc_AnimationDriver(const Handle(Message_Messenger)& theMsgDriver);
Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
#include <BinMXCAFDoc_AnimationToolDriver.hxx>
#include <BinObjMgt_Persistent.hxx>
-#include <CDM_MessageDriver.hxx>
+#include <Message_Messenger.hxx>
#include <Standard_Type.hxx>
#include <TDF_Attribute.hxx>
#include <XCAFDoc_AnimationTool.hxx>
//purpose :
//=======================================================================
BinMXCAFDoc_AnimationToolDriver::BinMXCAFDoc_AnimationToolDriver
- (const Handle(CDM_MessageDriver)& theMsgDriver)
+ (const Handle(Message_Messenger)& theMsgDriver)
: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_AnimationTool)->Name())
{
}
#include <Standard_Boolean.hxx>
#include <BinObjMgt_RRelocationTable.hxx>
#include <BinObjMgt_SRelocationTable.hxx>
-class CDM_MessageDriver;
+class Message_Messenger;
class TDF_Attribute;
class BinObjMgt_Persistent;
{
public:
- Standard_EXPORT BinMXCAFDoc_AnimationToolDriver(const Handle(CDM_MessageDriver)& theMsgDriver);
+ Standard_EXPORT BinMXCAFDoc_AnimationToolDriver(const Handle(Message_Messenger)& theMsgDriver);
Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
//! with aspects and primitives and choose the group usage model beforehand out of application needs.
//! Note that some Graphic3d_Group class virtual methods contain only base implementation
//! that is extended by the descendant class in OpenGl package.
-class Graphic3d_Group : public MMgt_TShared
+class Graphic3d_Group : public Standard_Transient
{
friend class Graphic3d_Structure;
- DEFINE_STANDARD_RTTIEXT(Graphic3d_Group,MMgt_TShared)
+ DEFINE_STANDARD_RTTIEXT(Graphic3d_Group, Standard_Transient)
public:
//! Returns the shading aspect for drawing hatch layer of a section.
Standard_EXPORT const OpenGl_AspectFace* HatchingFaceAspect() const;
+ //! Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules.
+ Standard_Size EstimatedDataSize() const Standard_OVERRIDE{ return 0; }
+
protected:
Handle(Graphic3d_AspectFillCapping) myAspect; //!< Section style settings from application's level.
}
OpenGl_Element* GlElement() const { return myGlElement; }
+ //! Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules.
+ Standard_Size EstimatedDataSize() const Standard_OVERRIDE { return 0; }
+
private:
OpenGl_Element* myGlElement;
aContext->ShaderManager()->UpdateClippingState();
glClear (GL_STENCIL_BUFFER_BIT);
- glColorMask (GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
+ const bool aColorMaskBack = aContext->SetColorMask(false);
// override aspects, disable culling
theWorkspace->SetAspectFace (&theWorkspace->NoneCulling());
aContext->ShaderManager()->UpdateClippingState();
// render capping plane using the generated stencil mask
- glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+ aContext->SetColorMask(aColorMaskBack);
if (theWorkspace->UseDepthWrite())
{
glDepthMask (GL_TRUE);
aViewScale = static_cast<Standard_ShortReal> (aViewDim.Y() / aContext->Viewport()[3]);
}
- aHatchScale = 1.0f / (aViewScale * anAspectHatching->TextureSet (aContext)->First()->SizeY());
+ aHatchScale = 1.0f / (aViewScale * anAspectHatching->TextureSet(aContext)->First()->SizeY());
}
}
return Standard_False;
}
- const OpenGl_PrimitiveArray* aPArray = dynamic_cast<const OpenGl_PrimitiveArray*> (theGlElement);
- return aPArray != NULL
- && aPArray->DrawMode() >= OpenGl_PrimitiveArray::THE_FILLPRIM_FROM
- && aPArray->DrawMode() <= OpenGl_PrimitiveArray::THE_FILLPRIM_TO;
+ return theGlElement->IsFillDrawMode();
}
#define _OpenGl_Workspace_Header
#include <Graphic3d_BufferType.hxx>
+#include <Graphic3d_PresentationAttributes.hxx>
#include <OpenGl_AspectFace.hxx>
-#include <OpenGl_CappingAlgo.hxx>
+#include <OpenGl_AspectMarker.hxx>
+#include <OpenGl_AspectLine.hxx>
+#include <OpenGl_AspectText.hxx>
+#include <OpenGl_CappingRenderer.hxx>
#include <OpenGl_FrameBuffer.hxx>
#include <OpenGl_Material.hxx>
#include <OpenGl_Matrix.hxx>
//! Returns face aspect for textured font rendering.
const OpenGl_AspectFace& FontFaceAspect() const { return myFontFaceAspect; }
+ //! Sets and applies current polygon offset.
+ void SetPolygonOffset (const Graphic3d_PolygonOffset& theParams);
+
+ //! Returns currently applied polygon offset parameters.
+ const Graphic3d_PolygonOffset& AppliedPolygonOffset() { return myPolygonOffsetApplied; }
+
//! Returns capping algorithm rendering filter.
- const Handle(OpenGl_CappingAlgoFilter)& DefaultCappingAlgoFilter() const { return myDefaultCappingAlgoFilter; }
+ const Handle(OpenGl_CappingRenderFilter)& CappingRenderFilter() const
+ {
+ return myCappingRenderFilter;
+ }
//! Returns face aspect for none culling mode.
const OpenGl_AspectFace& NoneCulling() const { return myNoneCulling; }
Handle(OpenGl_Context) myGlContext;
Standard_Boolean myUseZBuffer;
Standard_Boolean myUseDepthWrite;
- Handle(OpenGl_CappingAlgoFilter) myDefaultCappingAlgoFilter;
+ Handle(OpenGl_CappingRenderFilter) myCappingRenderFilter;
OpenGl_AspectFace myNoneCulling;
OpenGl_AspectFace myFrontCulling;
OpenGl_AspectFace myFontFaceAspect;
OpenGl_Matrix myModelViewMatrix; //!< Model matrix with applied structure transformations
+ Graphic3d_PolygonOffset myPolygonOffsetApplied; //!< currently applied polygon offset
+
OpenGl_AspectFace myAspectFaceHl; //!< Hiddenline aspect
Handle(OpenGl_TextureSet) myEnvironmentTexture;
//! \param [in] theItemId - assembly item ID.
//! \return annotated item label if it is found, otherwise - null label.
Standard_EXPORT TDF_Label FindAnnotatedItem(const XCAFDoc_AssemblyItemId& theItemId) const;
- Standard_EXPORT TDF_Label FindAnnotatedItemAttr(const XCAFDoc_AssemblyItemId& theItemId,
- const Standard_GUID& theGUID) const;
- Standard_EXPORT TDF_Label FindAnnotatedItemSubshape(const XCAFDoc_AssemblyItemId& theItemId,
- Standard_Integer theSubshapeIndex) const;
//! Finds a label of the given labeled item in the annotated items hive.
//! \param [in] theItemLabel - item label.
//! \return number of added labels.
Standard_EXPORT Standard_Integer GetNotes(const XCAFDoc_AssemblyItemId& theItemId,
TDF_LabelSequence& theNoteLabels) const;
- Standard_EXPORT Standard_Integer GetAttrNotes(const XCAFDoc_AssemblyItemId& theItemId,
- const Standard_GUID& theGUID,
- TDF_LabelSequence& theNoteLabels) const;
- Standard_EXPORT Standard_Integer GetSubshapeNotes(const XCAFDoc_AssemblyItemId& theItemId,
- Standard_Integer theSubshapeIndex,
- TDF_LabelSequence& theNoteLabels) const;
//! Gets all note labels of the labeled item.
//! Notes linked to item's attributes aren't
//! \return a handle to the assembly reference attribute.
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNote(const TDF_Label& theNoteLabel,
const XCAFDoc_AssemblyItemId& theItemId);
- Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToAttr(const TDF_Label& theNoteLabel,
- const XCAFDoc_AssemblyItemId& theItemId,
- const Standard_GUID& theGUID);
- Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToSubshape(const TDF_Label& theNoteLabel,
- const XCAFDoc_AssemblyItemId& theItemId,
- Standard_Integer theSubshapeIndex);
//! Adds the given note to the labeled item.
//! \param [in] theNoteLabel - note label.
// commercial license or contractual agreement.
-#include <CDM_MessageDriver.hxx>
+#include <Message_Messenger.hxx>
#include <Standard_Type.hxx>
#include <TCollection_HAsciiString.hxx>
#include <TColStd_HArray1OfByte.hxx>
//purpose : Constructor
//=======================================================================
XmlMXCAFDoc_AnimationDriver::XmlMXCAFDoc_AnimationDriver
- (const Handle(CDM_MessageDriver)& theMsgDriver)
+ (const Handle(Message_Messenger)& theMsgDriver)
: XmlMDF_ADriver (theMsgDriver, "xcaf", "Animation")
{}
return Standard_False;
Handle(TColStd_HArray1OfByte) anAnim = new TColStd_HArray1OfByte(anAnimFirstIdx, anAnimLastIdx);
- const Standard_Integer aMaxSize = anImageLastIdx - anImageFirstIdx + anAnimLastIdx - anAnimFirstIdx + 2;
-
XmlObjMgt_DOMString aDataStr = XmlObjMgt::GetStringValue(theSource);
Standard_SStream anSS(aDataStr.GetString());
#include <Standard_Boolean.hxx>
#include <XmlObjMgt_RRelocationTable.hxx>
#include <XmlObjMgt_SRelocationTable.hxx>
-class CDM_MessageDriver;
+class Message_Messenger;
class TDF_Attribute;
class XmlObjMgt_Persistent;
public:
- Standard_EXPORT XmlMXCAFDoc_AnimationDriver(const Handle(CDM_MessageDriver)& theMessageDriver);
+ Standard_EXPORT XmlMXCAFDoc_AnimationDriver(const Handle(Message_Messenger)& theMessageDriver);
Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <CDM_MessageDriver.hxx>
+#include <Message_Messenger.hxx>
#include <Standard_Type.hxx>
#include <TDF_Attribute.hxx>
#include <XCAFDoc_AnimationTool.hxx>
//purpose :
//=======================================================================
XmlMXCAFDoc_AnimationToolDriver::XmlMXCAFDoc_AnimationToolDriver
- (const Handle(CDM_MessageDriver)& theMsgDriver)
+ (const Handle(Message_Messenger)& theMsgDriver)
: XmlMDF_ADriver (theMsgDriver, "xcaf", "AnimationTool")
{
}
#include <Standard_Boolean.hxx>
#include <XmlObjMgt_RRelocationTable.hxx>
#include <XmlObjMgt_SRelocationTable.hxx>
-class CDM_MessageDriver;
+class Message_Messenger;
class TDF_Attribute;
class XmlObjMgt_Persistent;
public:
- Standard_EXPORT XmlMXCAFDoc_AnimationToolDriver(const Handle(CDM_MessageDriver)& theMsgDriver);
+ Standard_EXPORT XmlMXCAFDoc_AnimationToolDriver(const Handle(Message_Messenger)& theMsgDriver);
Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;