This header, as well as `OpenGl_GlCore20.hxx` and similar, no more include system OpenGL / OpenGL ES headers to define function table.
Application code calling OpenGL functions directly should be changed to either use `OpenGl_Context::core11fwd` (as designed)
or to include system OpenGL headers in advance (with help of `OpenGl_GlNative.hxx`).
+
+@subsection upgrade_occt770_tooltriangulatedshape StdPrs_ToolTriangulatedShape
+
+Method `StdPrs_ToolTriangulatedShape::Normal()` has been removed.
+Please use `BRepLib_ToolTriangulatedShape::ComputeNormals()` to fill in normal attributes in triangulation and fetch them directly using `Poly_Triangulation::Normal()`.
}
}
-//=======================================================================
-//function : Normal
-//purpose :
-//=======================================================================
-void StdPrs_ToolTriangulatedShape::Normal (const TopoDS_Face& theFace,
- Poly_Connect& thePolyConnect,
- TColgp_Array1OfDir& theNormals)
-{
- const Handle(Poly_Triangulation)& aPolyTri = thePolyConnect.Triangulation();
- if (!aPolyTri->HasNormals())
- {
- ComputeNormals (theFace, aPolyTri, thePolyConnect);
- }
-
- gp_Vec3f aNormal;
- for (Standard_Integer aNodeIter = 1; aNodeIter <= aPolyTri->NbNodes(); ++aNodeIter)
- {
- aPolyTri->Normal (aNodeIter, aNormal);
- theNormals.ChangeValue (aNodeIter).SetCoord (aNormal.x(), aNormal.y(), aNormal.z());
- }
-
- if (theFace.Orientation() == TopAbs_REVERSED)
- {
- for (Standard_Integer aNodeIter = 1; aNodeIter <= aPolyTri->NbNodes(); ++aNodeIter)
- {
- theNormals.ChangeValue (aNodeIter).Reverse();
- }
- }
-}
-
//=======================================================================
//function : GetDeflection
//purpose :
//! @return true if shape is closed manifold Solid or compound of such Solids. <br>
Standard_EXPORT static Standard_Boolean IsClosed (const TopoDS_Shape& theShape);
- //! Evaluate normals for a triangle of a face.
- //! @param[in] theFace the face.
- //! @param[in] thePolyConnect the definition of a face triangulation.
- //! @param[out] theNormals the array of normals for each triangle.
- Standard_EXPORT static void Normal (const TopoDS_Face& theFace,
- Poly_Connect& thePolyConnect,
- TColgp_Array1OfDir& theNormals);
-
//! Computes the absolute deflection value depending on the type of deflection in theDrawer:
//! <ul>
//! <li><b>Aspect_TOD_RELATIVE</b>: the absolute deflection is computed using the relative
//! In case of the type of deflection in theDrawer computed relative deflection for shape is stored as absolute deflection.
//! It is necessary to use it later on for sub-shapes.
//! This function should always be used to compute the deflection value for building
- //! discrete representations of the shape (triangualtion, wireframe) to avoid incosistencies
+ //! discrete representations of the shape (triangulation, wireframe) to avoid inconsistencies
//! between different representations of the shape and undesirable visual artifacts.
Standard_EXPORT static Standard_Real GetDeflection (const TopoDS_Shape& theShape,
const Handle(Prs3d_Drawer)& theDrawer);
//! Validates triangulation within the shape and performs tessellation if necessary.
//! @param theShape [in] the shape.
//! @param theDrawer [in] the display settings.
- //! @return true if tesselation was recomputed and false otherwise.
+ //! @return true if tessellation was recomputed and false otherwise.
Standard_EXPORT static Standard_Boolean Tessellate (const TopoDS_Shape& theShape,
const Handle(Prs3d_Drawer)& theDrawer);