Warning, file /include/opencascade/Prs3d_ToolQuadric.hxx was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _Prs3d_ToolQuadric_HeaderFile
0017 #define _Prs3d_ToolQuadric_HeaderFile
0018
0019 #include <Graphic3d_ArrayOfTriangles.hxx>
0020 #include <Poly_Triangulation.hxx>
0021
0022
0023 class Prs3d_ToolQuadric
0024 {
0025 public:
0026 DEFINE_STANDARD_ALLOC
0027
0028
0029 static Standard_Integer TrianglesNb (const Standard_Integer theSlicesNb,
0030 const Standard_Integer theStacksNb)
0031 {
0032 return theSlicesNb * theStacksNb * 2;
0033 }
0034
0035
0036 static Standard_Integer VerticesNb (const Standard_Integer theSlicesNb,
0037 const Standard_Integer theStacksNb,
0038 const Standard_Boolean theIsIndexed = Standard_True)
0039 {
0040 return theIsIndexed
0041 ? (theSlicesNb + 1) * (theStacksNb + 1)
0042 : TrianglesNb (theSlicesNb, theStacksNb) * 3;
0043 }
0044
0045 public:
0046
0047
0048
0049
0050 Standard_EXPORT Handle(Graphic3d_ArrayOfTriangles) CreateTriangulation (const gp_Trsf& theTrsf) const;
0051
0052
0053
0054
0055 Standard_EXPORT Handle(Poly_Triangulation) CreatePolyTriangulation (const gp_Trsf& theTrsf) const;
0056
0057
0058
0059
0060
0061
0062
0063 Standard_EXPORT void FillArray (Handle(Graphic3d_ArrayOfTriangles)& theArray,
0064 const gp_Trsf& theTrsf) const;
0065
0066
0067 Standard_Integer TrianglesNb() const { return mySlicesNb * myStacksNb * 2; }
0068
0069
0070 Standard_Integer VerticesNb (bool theIsIndexed = true) const
0071 {
0072 return theIsIndexed
0073 ? (mySlicesNb + 1) * (myStacksNb + 1)
0074 : TrianglesNb() * 3;
0075 }
0076
0077 public:
0078
0079
0080
0081
0082
0083 Standard_DEPRECATED("Deprecated method, CreateTriangulation() and CreatePolyTriangulation() should be used instead")
0084 Standard_EXPORT void FillArray (Handle(Graphic3d_ArrayOfTriangles)& theArray,
0085 Handle(Poly_Triangulation)& theTriangulation,
0086 const gp_Trsf& theTrsf) const;
0087
0088 protected:
0089
0090
0091 virtual gp_Pnt Vertex (const Standard_Real theU, const Standard_Real theV) const = 0;
0092
0093
0094 virtual gp_Dir Normal (const Standard_Real theU, const Standard_Real theV) const = 0;
0095
0096 protected:
0097
0098 Standard_Integer mySlicesNb;
0099 Standard_Integer myStacksNb;
0100 };
0101
0102 #endif