1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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

@@ -33,44 +33,9 @@
//=======================================================================
Select3D_SensitiveEntity::Select3D_SensitiveEntity(const Handle(SelectBasics_EntityOwner)& OwnerId):
SelectBasics_SensitiveEntity(OwnerId),
mylastprj(),
mylastdepth(ShortRealLast())
SelectBasics_SensitiveEntity(OwnerId)
{}
//=======================================================================
//function : Project
//purpose :
//=======================================================================
void Select3D_SensitiveEntity::Project(const Handle(Select3D_Projector)& aPrj)
{
mylastprj = aPrj;
}
//=======================================================================
//function : Matches
//purpose :
//=======================================================================
Standard_Boolean Select3D_SensitiveEntity::Matches(const Standard_Real X,
const Standard_Real Y,
const Standard_Real /*aTol*/,
Standard_Real& /*DMin*/)
{
if (!mylastprj.IsNull())
{
gp_Lin L = mylastprj->Shoot (X, Y);
SetLastDepth (ComputeDepth (L));
return (mylastdepth > mylastprj->DepthMin()) && (mylastdepth < mylastprj->DepthMax());
}
else
{
SetLastDepth (ComputeDepth (gp_Lin())); // how we determine depth without eyeline here?
return (mylastdepth > ShortRealFirst()) && (mylastdepth < ShortRealLast());
}
}
//=======================================================================
//function : Matches
//purpose :
@@ -189,30 +154,6 @@ Standard_Boolean Select3D_SensitiveEntity::HasLocation() const
Standard_Boolean Select3D_SensitiveEntity::Is3D() const
{return Standard_True;}
//=======================================================================
//function : Depth
//purpose :
//=======================================================================
Standard_Real Select3D_SensitiveEntity::Depth() const
{return mylastdepth;}
//=======================================================================
//function : GetEyeLine
//purpose :
//=======================================================================
gp_Lin Select3D_SensitiveEntity::GetEyeLine(const Standard_Real X,
const Standard_Real Y) const
{
gp_Lin L;
if (!mylastprj.IsNull())
{
L = mylastprj->Shoot (X, Y);
}
return L;
}
//=======================================================================
//function : MaxBoxes
//purpose :
@@ -221,15 +162,6 @@ gp_Lin Select3D_SensitiveEntity::GetEyeLine(const Standard_Real X,
Standard_Integer Select3D_SensitiveEntity::MaxBoxes() const
{return 1;}
//=======================================================================
//function : SetLastPrj
//purpose :
//=======================================================================
void Select3D_SensitiveEntity::SetLastPrj(const Handle(Select3D_Projector)& aprj)
{ mylastprj = aprj; }
//=======================================================================
//function : GetConnected
//purpose :
@@ -240,12 +172,3 @@ Handle(Select3D_SensitiveEntity) Select3D_SensitiveEntity::GetConnected(const To
Handle(Select3D_SensitiveEntity) NiouEnt;
return NiouEnt;
}
//=======================================================================
//function : SetLastDepth
//purpose :
//=======================================================================
void Select3D_SensitiveEntity::SetLastDepth(const Standard_Real aDepth)
{
mylastdepth = DToF(aDepth);
}