1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0027751: Visualization, Graphic3d_ClipPlane - add option to inherit material from object

Graphic3d_ClipPlane - Graphic3d_AspectFillArea3d is now stored as class field.
OpenGl_CappingAlgo::RenderCapping() now handles special mode
preserving material from rendered object.

MeshVS_ElementalColorPrsBuilder::Build() now creates single primitives group
for triangles, thus Closed flag is correctly applied.

Redundant methods OpenGl_Structure::DrawGroups() and ::renderClosedGeometry()
have been removed.

Draw Harness, ViewerTest - vaspects now preserves display mode
and location when assigning sub-shape aspects.
The syntax of command vclipplane has been revised
(preserving compatibility with old syntax):
- Use "-param" style syntax for all arguments.
- Eliminate redundant arguments "change", "view", "object".
- Allow passing multiple parameters withing single call.
- Do not require "create" command - create new plane implicitly.
- "maxplanes" argument does not require view name anymore.
- "delete" does not throws TCL exception for non-existing plane.
- "view" argument without list now applies to active view.
- Handle * and ALL withing "delete" to remove all defined planes.

update test case bugs/vis/bug26028
This commit is contained in:
kgv
2016-08-08 19:51:40 +03:00
committed by bugmaster
parent 89a929ea26
commit 3e05329c4c
21 changed files with 990 additions and 657 deletions

View File

@@ -262,16 +262,14 @@ void OpenGl_Structure::OnVisibilityChanged()
// =======================================================================
Standard_Boolean OpenGl_Structure::IsRaytracable() const
{
if (!myGroups.IsEmpty())
if (!myGroups.IsEmpty()
&& myIsRaytracable)
{
return myIsRaytracable; // geometry structure
}
else if (myInstancedStructure != NULL)
{
return myInstancedStructure->IsRaytracable(); // instance structure
return Standard_True;
}
return Standard_False; // has no any groups or structures
return myInstancedStructure != NULL
&& myInstancedStructure->IsRaytracable();
}
// =======================================================================
@@ -280,7 +278,18 @@ Standard_Boolean OpenGl_Structure::IsRaytracable() const
// =======================================================================
void OpenGl_Structure::UpdateStateIfRaytracable (const Standard_Boolean toCheck) const
{
myIsRaytracable = !toCheck || OpenGl_Raytrace::IsRaytracedStructure (this);
myIsRaytracable = !toCheck;
if (!myIsRaytracable)
{
for (OpenGl_Structure::GroupIterator anIter (myGroups); anIter.More(); anIter.Next())
{
if (anIter.Value()->IsRaytracable())
{
myIsRaytracable = Standard_True;
break;
}
}
}
if (IsRaytracable())
{
@@ -424,26 +433,6 @@ void OpenGl_Structure::renderGeometry (const Handle(OpenGl_Workspace)& theWorksp
}
}
// =======================================================================
// function : renderClosedGeometry
// purpose :
// =======================================================================
void OpenGl_Structure::renderClosedGeometry (const Handle(OpenGl_Workspace)& theWorkspace) const
{
if (myInstancedStructure != NULL)
{
myInstancedStructure->renderClosedGeometry (theWorkspace);
}
for (OpenGl_Structure::GroupIterator aGroupIter (myGroups); aGroupIter.More(); aGroupIter.Next())
{
if (aGroupIter.Value()->IsClosed())
{
aGroupIter.Value()->Render (theWorkspace);
}
}
}
// =======================================================================
// function : Render
// purpose :