mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
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.
This commit is contained in:
@@ -876,18 +876,11 @@ public:
|
||||
}
|
||||
|
||||
//! Manages display of the back faces
|
||||
//! When <aModel> is TOBM_AUTOMATIC the object backfaces
|
||||
//! are displayed only for surface objects and
|
||||
//! never displayed for solid objects.
|
||||
//! this was the previous mode.
|
||||
//! <aModel> is TOBM_ALWAYS_DISPLAYED the object backfaces
|
||||
//! are always displayed both for surfaces or solids.
|
||||
//! <aModel> is TOBM_NEVER_DISPLAYED the object backfaces
|
||||
//! are never displayed.
|
||||
Standard_EXPORT void SetBackFacingModel (const V3d_TypeOfBackfacingModel theModel = V3d_TOBM_AUTOMATIC);
|
||||
Standard_EXPORT void SetBackFacingModel (const Graphic3d_TypeOfBackfacingModel theModel = Graphic3d_TypeOfBackfacingModel_Auto);
|
||||
|
||||
//! Returns current state of the back faces display
|
||||
Standard_EXPORT V3d_TypeOfBackfacingModel BackFacingModel() const;
|
||||
//! Returns current state of the back faces display; Graphic3d_TypeOfBackfacingModel_Auto by default,
|
||||
//! which means that backface culling is defined by each presentation.
|
||||
Standard_EXPORT Graphic3d_TypeOfBackfacingModel BackFacingModel() const;
|
||||
|
||||
//! Adds clip plane to the view. The composition of clip planes truncates the
|
||||
//! rendering space to convex volume. Number of supported clip planes can be consulted
|
||||
|
Reference in New Issue
Block a user