mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
rebase on CR0-OCCT730 (V7_3_0)
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
#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>
|
||||
@@ -56,7 +56,7 @@ static void putByteArray(BinObjMgt_Persistent& theTarget, const Handle(TColStd_H
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
BinMXCAFDoc_AnimationDriver::BinMXCAFDoc_AnimationDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
(const Handle(Message_Messenger)& theMsgDriver)
|
||||
: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_Animation)->Name())
|
||||
{
|
||||
}
|
||||
@@ -80,7 +80,6 @@ Standard_Boolean BinMXCAFDoc_AnimationDriver::Paste(const BinObjMgt_Persistent&
|
||||
BinObjMgt_RRelocationTable& /*theRelocTable*/) const
|
||||
{
|
||||
Handle(XCAFDoc_Animation) anAtt = Handle(XCAFDoc_Animation)::DownCast(theTarget);
|
||||
Standard_Real aDensity;
|
||||
TCollection_AsciiString aName;
|
||||
|
||||
if (!(theSource >> aName))
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <BinObjMgt_RRelocationTable.hxx>
|
||||
#include <BinObjMgt_SRelocationTable.hxx>
|
||||
class CDM_MessageDriver;
|
||||
class Message_Messenger;
|
||||
class TDF_Attribute;
|
||||
class BinObjMgt_Persistent;
|
||||
|
||||
@@ -38,7 +38,7 @@ class BinMXCAFDoc_AnimationDriver : public BinMDF_ADriver
|
||||
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;
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
#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>
|
||||
@@ -28,7 +28,7 @@ IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_AnimationToolDriver, BinMDF_ADriver)
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
BinMXCAFDoc_AnimationToolDriver::BinMXCAFDoc_AnimationToolDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
(const Handle(Message_Messenger)& theMsgDriver)
|
||||
: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_AnimationTool)->Name())
|
||||
{
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <BinObjMgt_RRelocationTable.hxx>
|
||||
#include <BinObjMgt_SRelocationTable.hxx>
|
||||
class CDM_MessageDriver;
|
||||
class Message_Messenger;
|
||||
class TDF_Attribute;
|
||||
class BinObjMgt_Persistent;
|
||||
|
||||
@@ -36,7 +36,7 @@ class BinMXCAFDoc_AnimationToolDriver : public BinMDF_ADriver
|
||||
{
|
||||
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;
|
||||
|
||||
|
@@ -75,10 +75,10 @@ class Graphic3d_ArrayOfPrimitives;
|
||||
//! 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:
|
||||
|
||||
|
@@ -55,6 +55,9 @@ 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.
|
||||
|
@@ -68,6 +68,9 @@ namespace
|
||||
}
|
||||
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;
|
||||
|
||||
@@ -203,7 +206,7 @@ void OpenGl_CappingRenderer::renderOne (const Handle(OpenGl_Workspace)& theWo
|
||||
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());
|
||||
@@ -232,7 +235,7 @@ void OpenGl_CappingRenderer::renderOne (const Handle(OpenGl_Workspace)& theWo
|
||||
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);
|
||||
@@ -298,7 +301,7 @@ void OpenGl_CappingRenderer::renderOne (const Handle(OpenGl_Workspace)& theWo
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,8 +443,5 @@ Standard_Boolean OpenGl_CappingRenderFilter::ShouldRender (const Handle(OpenGl_W
|
||||
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();
|
||||
}
|
||||
|
@@ -17,9 +17,13 @@
|
||||
#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>
|
||||
@@ -260,8 +264,17 @@ public:
|
||||
//! 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; }
|
||||
@@ -282,7 +295,7 @@ protected: //! @name protected fields
|
||||
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;
|
||||
@@ -306,6 +319,8 @@ protected: //! @name fields related to status
|
||||
|
||||
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;
|
||||
|
@@ -127,10 +127,6 @@ public:
|
||||
//! \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.
|
||||
@@ -235,12 +231,6 @@ public:
|
||||
//! \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
|
||||
@@ -295,12 +285,6 @@ public:
|
||||
//! \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.
|
||||
|
@@ -14,7 +14,7 @@
|
||||
// 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>
|
||||
@@ -37,7 +37,7 @@ IMPLEMENT_DOMSTRING(AnimationLastIdx, "animation_last_idx")
|
||||
//purpose : Constructor
|
||||
//=======================================================================
|
||||
XmlMXCAFDoc_AnimationDriver::XmlMXCAFDoc_AnimationDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
(const Handle(Message_Messenger)& theMsgDriver)
|
||||
: XmlMDF_ADriver (theMsgDriver, "xcaf", "Animation")
|
||||
{}
|
||||
|
||||
@@ -85,8 +85,6 @@ Standard_Boolean XmlMXCAFDoc_AnimationDriver::Paste
|
||||
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());
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <XmlObjMgt_RRelocationTable.hxx>
|
||||
#include <XmlObjMgt_SRelocationTable.hxx>
|
||||
class CDM_MessageDriver;
|
||||
class Message_Messenger;
|
||||
class TDF_Attribute;
|
||||
class XmlObjMgt_Persistent;
|
||||
|
||||
@@ -38,7 +38,7 @@ class XmlMXCAFDoc_AnimationDriver : public XmlMDF_ADriver
|
||||
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;
|
||||
|
||||
|
@@ -13,7 +13,7 @@
|
||||
// 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>
|
||||
@@ -27,7 +27,7 @@ IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_AnimationToolDriver,XmlMDF_ADriver)
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XmlMXCAFDoc_AnimationToolDriver::XmlMXCAFDoc_AnimationToolDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
(const Handle(Message_Messenger)& theMsgDriver)
|
||||
: XmlMDF_ADriver (theMsgDriver, "xcaf", "AnimationTool")
|
||||
{
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <XmlObjMgt_RRelocationTable.hxx>
|
||||
#include <XmlObjMgt_SRelocationTable.hxx>
|
||||
class CDM_MessageDriver;
|
||||
class Message_Messenger;
|
||||
class TDF_Attribute;
|
||||
class XmlObjMgt_Persistent;
|
||||
|
||||
@@ -38,7 +38,7 @@ class XmlMXCAFDoc_AnimationToolDriver : public XmlMDF_ADriver
|
||||
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;
|
||||
|
||||
|
Reference in New Issue
Block a user