0031313: Foundation Classes - Dump improvement for classes
[occt.git] / src / Prs3d / Prs3d_ToolDisk.hxx
1 // Created on: 2016-02-04
2 // Created by: Anastasia BORISOVA
3 // Copyright (c) 2016 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _Prs3d_ToolDisk_HeaderFile
17 #define _Prs3d_ToolDisk_HeaderFile
18
19 #include <Standard.hxx>
20 #include <Prs3d_ToolQuadric.hxx>
21
22 //! Standard presentation algorithm that outputs graphical primitives for disk surface.
23 class Prs3d_ToolDisk : public Prs3d_ToolQuadric
24 {
25 public:
26
27   //! Generate primitives for 3D quadric surface and return a filled array.
28   Standard_EXPORT static Handle(Graphic3d_ArrayOfTriangles) Create (const Standard_Real    theInnerRadius,
29                                                                     const Standard_Real    theOuterRadius,
30                                                                     const Standard_Integer theNbSlices,
31                                                                     const Standard_Integer theNbStacks,
32                                                                     const gp_Trsf&         theTrsf);
33 public:
34
35   //! Initializes the algorithm.
36   Standard_EXPORT Prs3d_ToolDisk (const Standard_Real    theInnerRadius,
37                                   const Standard_Real    theOuterRadius,
38                                   const Standard_Integer theNbSlices,
39                                   const Standard_Integer theNbStacks);
40
41   //! Set angle range in radians [0, 2*PI] by default.
42   //! @param theStartAngle [in] Start angle in counter clockwise order
43   //! @param theEndAngle   [in] End   angle in counter clockwise order
44   void SetAngleRange (Standard_Real theStartAngle,
45                       Standard_Real theEndAngle)
46   {
47     myStartAngle = theStartAngle;
48     myEndAngle   = theEndAngle;
49   }
50
51 protected:
52
53   //! Computes vertex at given parameter location of the surface.
54   Standard_EXPORT virtual gp_Pnt Vertex (const Standard_Real theU, const Standard_Real theV) Standard_OVERRIDE;
55
56   //! Computes normal at given parameter location of the surface.
57   virtual gp_Dir Normal (const Standard_Real , const Standard_Real ) Standard_OVERRIDE { return gp_Dir (0.0, 0.0, -1.0); }
58
59 protected:
60
61   Standard_Real myInnerRadius;
62   Standard_Real myOuterRadius;
63   Standard_Real myStartAngle;  //!< Start angle in counter clockwise order
64   Standard_Real myEndAngle;    //!< End   angle in counter clockwise order
65
66 };
67
68 #endif