Flag to control check of bounding box clipping before drawing has been added.
IsMutable (Standard_False),
Is2dText (Standard_False),
myGraphicDriver (theManager->GraphicDriver()),
- myIsCulled (Standard_True)
+ myIsCulled (Standard_True),
+ myBndBoxClipCheck(Standard_True)
{
Id = myGraphicDriver->NewIdentification();
}
//! The method is called during traverse of BVH tree.
void MarkAsNotCulled() const { myIsCulled = Standard_False; }
+ //! Returns whether check of object's bounding box clipping is enabled before drawing of object; TRUE by default.
+ Standard_Boolean BndBoxClipCheck() const { return myBndBoxClipCheck; }
+
+ //! Enable/disable check of object's bounding box clipping before drawing of object.
+ void SetBndBoxClipCheck(Standard_Boolean theBndBoxClipCheck) { myBndBoxClipCheck = theBndBoxClipCheck; }
+
//! Checks if the structure should be included into BVH tree or not.
Standard_Boolean IsAlwaysRendered() const
{
Handle(Graphic3d_PresentationAttributes) myHighlightStyle; //! Current highlight style; is set only if highlight flag is true
mutable Standard_Boolean myIsCulled; //!< A status specifying is structure needs to be rendered after BVH tree traverse
+ Standard_Boolean myBndBoxClipCheck; //!< Flag responsible for checking of bounding box clipping before drawing of object
public:
}
const Graphic3d_ClipState aBoxState = aPlane->ProbeBox (aBBox);
- if (aBoxState == Graphic3d_ClipState_Out)
- {
- isClipped = true;
- break;
- }
- else if (aBoxState == Graphic3d_ClipState_In)
+ if (aBoxState == Graphic3d_ClipState_In)
{
aCtx->ChangeClipping().SetEnabled (aPlaneIt, false);
hasDisabled = true;
}
+ else if (aBoxState == Graphic3d_ClipState_Out && myBndBoxClipCheck)
+ {
+ isClipped = true;
+ break;
+ }
}
}