0032188: Visualization, Graphic3d_Aspects - define backface culling using Graphic3d_T...
authorkgv <kgv@opencascade.com>
Mon, 1 Mar 2021 20:25:21 +0000 (23:25 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 4 Mar 2021 16:40:23 +0000 (19:40 +0300)
commit7fd4958d451a9c8dcf1c58e100c8ac898484addd
treefbf5a992d761d499a94c7fbdc31510cf6df4d586
parent42ddd0028c99bbadc1ca9656f7e50af71b61d480
0032188: Visualization, Graphic3d_Aspects - define backface culling using Graphic3d_TypeOfBackfacingModel

Graphic3d_Aspects::ToSuppressBackFaces() bool flag has been replaced by
Graphic3d_Aspects::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.

Graphic3d_TypeOfBackfacingModel_Auto corresponds to old ToSuppressBackFaces()==TRUE;
Graphic3d_TypeOfBackfacingModel_DoubleSided corresponds to old ToSuppressBackFaces()==FALSE;
Graphic3d_TypeOfBackfacingModel_BackCulled allows enabling back face culling regardless of Graphic3d_Group::IsClosed() flag.

XCAFDoc_VisMaterial::IsDoubleSided() bool flag has been replaced by
XCAFDoc_VisMaterial::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.

glTF reader now maps "doubleSided" material flag into
Graphic3d_TypeOfBackfacingModel_BackCulled (forced back face culling) and
Graphic3d_TypeOfBackfacingModel_Auto (e.g. practically doubleSided as there is no closed/open info in glTF).

glTF writer by default writes materials as "doubleSided" save the Graphic3d_TypeOfBackfacingModel_BackCulled property set
(in future, extra logic might written for automatically defining singleSided materials for Solid B-Rep objects).

Removed obsolete unused types V3d_TypeOfPickCamera, V3d_TypeOfPickLight, V3d_TypeOfRepresentation, and V3d_Coordinate.
Deprecated types V3d_TypeOfBackfacingModel, V3d_TypeOfLight, and V3d_TypeOfShadingModel.
28 files changed:
src/AIS/AIS_ViewCube.cxx
src/BinMXCAFDoc/BinMXCAFDoc_VisMaterialDriver.cxx
src/Graphic3d/Graphic3d_Aspects.cxx
src/Graphic3d/Graphic3d_Aspects.hxx
src/Graphic3d/Graphic3d_CView.cxx
src/Graphic3d/Graphic3d_CView.hxx
src/Graphic3d/Graphic3d_ClipPlane.cxx
src/Graphic3d/Graphic3d_TypeOfBackfacingModel.hxx
src/OpenGl/OpenGl_View.cxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_Workspace.cxx
src/RWGltf/RWGltf_GltfJsonParser.cxx
src/RWGltf/RWGltf_GltfMaterialMap.cxx
src/V3d/FILES
src/V3d/V3d_Coordinate.hxx [deleted file]
src/V3d/V3d_PositionLight.hxx
src/V3d/V3d_TypeOfBackfacingModel.hxx
src/V3d/V3d_TypeOfLight.hxx
src/V3d/V3d_TypeOfPickCamera.hxx [deleted file]
src/V3d/V3d_TypeOfPickLight.hxx [deleted file]
src/V3d/V3d_TypeOfRepresentation.hxx [deleted file]
src/V3d/V3d_TypeOfShadingModel.hxx
src/V3d/V3d_View.cxx
src/V3d/V3d_View.hxx
src/XCAFDoc/XCAFDoc_VisMaterial.cxx
src/XCAFDoc/XCAFDoc_VisMaterial.hxx
src/XDEDRAW/XDEDRAW_Colors.cxx
src/XmlMXCAFDoc/XmlMXCAFDoc_VisMaterialDriver.cxx