1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-13 14:27:08 +03:00

0024070: OpenGL capped object-level clipping planes

Graphical clipping:
- Use "Graphic3d_ClipPlane" to defined clipping for PrsMgr_PresentableObject (local clipping), for V3d_View (global clipping).

Get rid of old implementations:
- Remove Visual3d_ClipPlane.
- Port V3d_Plane to Graphic3d_ClipPlane core.

Selection Sensitives:
- Port "Matches" method to add full set of arguments (SelectBasics_PickArgs), including min-max depth coming from selector.
- Get rid of transient data for pair Matches -> ComputeDepth.
- Extend SelectMgr_ViewerSelector::LoadResult to work with local clipping, add virtual callbacks to compute globa/local depth clipping for picking.

Capping rendering algorithm:
- Recursive rendering algorithm for OpenGl_Groups.
- Introduced Rendering filter for groups.

Clipping plane management in TKOpenGl:
- Added OpenGl_ClippingState to OpenGl_Context.

DRAWEXE commands:
- Ported "vclipplane" command for new approach.
- Added "vsettexturemode" command for changing texture details in views (enable / disable textures).

Correct DownCast syntax (compilation error)

Fix new compiler warnings

tests/bugs/vis/bug22906 migrated to the new vclipplane syntax
This commit is contained in:
apl
2013-09-19 16:58:00 +04:00
committed by bugmaster
parent 788cbaf4c4
commit 4269bd1b11
111 changed files with 4168 additions and 2293 deletions

View File

@@ -49,6 +49,7 @@
#include <OpenGl_NamedStatus.hxx>
#include <OpenGl_PrinterContext.hxx>
#include <OpenGl_TextParam.hxx>
#include <OpenGl_RenderFilter.hxx>
#include <Handle_OpenGl_View.hxx>
#include <Handle_OpenGl_Texture.hxx>
@@ -58,6 +59,7 @@ class OpenGl_AspectMarker;
class OpenGl_AspectText;
class OpenGl_FrameBuffer;
class OpenGl_Structure;
class OpenGl_Element;
class Image_PixMap;
//! Reprepsents window with GL context.
@@ -167,6 +169,28 @@ public:
Standard_EXPORT Handle(OpenGl_Texture) EnableTexture (const Handle(OpenGl_Texture)& theTexture,
const Handle(Graphic3d_TextureParams)& theParams = NULL);
//! Set filter for restricting rendering of particular elements.
//! Filter can be applied for rendering passes used by recursive
//! rendering algorithms for rendering elements of groups.
//! @param theFilter [in] the filter instance.
inline void SetRenderFilter (const Handle(OpenGl_RenderFilter)& theFilter)
{
myRenderFilter = theFilter;
}
//! Get rendering filter.
//! @return filter instance.
inline const Handle(OpenGl_RenderFilter)& GetRenderFilter() const
{
return myRenderFilter;
}
//! @return applied view matrix.
inline const OpenGl_Matrix* ViewMatrix() const { return ViewMatrix_applied; }
//! @return applied model structure matrix.
inline const OpenGl_Matrix* ModelMatrix() const { return StructureMatrix_applied; }
protected:
void CopyBuffers (const Standard_Boolean theFrontToBack);
@@ -202,6 +226,7 @@ protected: //! @name protected fields
protected: //! @name fields related to status
Handle(OpenGl_RenderFilter) myRenderFilter;
Handle(OpenGl_Texture) myTextureBound; //!< currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
const OpenGl_AspectLine *AspectLine_set, *AspectLine_applied;
const OpenGl_AspectFace *AspectFace_set, *AspectFace_applied;