mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0029097: Visualization - allow picking Graphic3d_TypeOfShadingModel per-object
Graphic3d_AspectFillArea3d has been extended by new property ::ShadingModel(), which is set to Graphic3d_TOSM_DEFAULT by default. The new API allows assigning Shading Model to specific Primitive Array groups instead of entire Viewer, which was the only possibility before. Graphic3d_TypeOfShadingModel has been extended with Graphic3d_TOSM_DEFAULT value meaining that Shading Model defined as default for the Viewer should be used. Graphic3d_TOSM_NONE has been renamed to Graphic3d_TOSM_UNLIT. Documentation of Shading Models has been improved by more details. V3d_TypeOfShadingModel enumeration has been merged into Graphic3d_TypeOfShadingModel avoiding duplicated definitions and confusion. Old values has been left for compatibility with old code and can be marked deprecated in future. Draw Harness command vaspects has been extended by new argument -setShadingModel for testing Shading Models assigned to entire objects. OpenGl_SetOfShaderPrograms now holds an array of Shading Models. OpenGl_ShaderManager interface has been modified and now requires enumeration as input in several places where Boolean flags have been used previously (methods ::BindFaceProgram(), ::BindLineProgram(), ::BindMarkerProgram()). OpenGl_Workspace now defines default (undefined) OpenGl_AspectFace as Graphic3d_TOSM_UNLIT to simplify indication of primitive groups with undefined Fill Area aspects, and so that Graphic3d_TOSM_UNLIT set as default Shading Model will not make artifacts on Lines and Markers. AIS_Manipulator::Axis::Compute() - added missing initialization of Fill Area aspects (leading to undefined behavior).
This commit is contained in:
@@ -525,9 +525,9 @@ void V3d_View::SetAxis (const Standard_Real theX, const Standard_Real theY, co
|
||||
//function : SetShadingModel
|
||||
//purpose :
|
||||
//=============================================================================
|
||||
void V3d_View::SetShadingModel (const V3d_TypeOfShadingModel theShadingModel)
|
||||
void V3d_View::SetShadingModel (const Graphic3d_TypeOfShadingModel theShadingModel)
|
||||
{
|
||||
myView->SetShadingModel (static_cast<Graphic3d_TypeOfShadingModel> (theShadingModel));
|
||||
myView->SetShadingModel (theShadingModel);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@@ -2218,9 +2218,9 @@ Standard_Real V3d_View::Twist() const
|
||||
//function : ShadingModel
|
||||
//purpose :
|
||||
//=============================================================================
|
||||
V3d_TypeOfShadingModel V3d_View::ShadingModel() const
|
||||
Graphic3d_TypeOfShadingModel V3d_View::ShadingModel() const
|
||||
{
|
||||
return static_cast<V3d_TypeOfShadingModel> (myView->ShadingModel());
|
||||
return myView->ShadingModel();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
Reference in New Issue
Block a user