1 // Created on: 2016-02-04
2 // Created by: Anastasia BORISOVA
3 // Copyright (c) 2016 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _Prs3d_ToolCylinder_HeaderFile
17 #define _Prs3d_ToolCylinder_HeaderFile
19 #include <Standard.hxx>
20 #include <Prs3d_ToolQuadric.hxx>
22 //! Standard presentation algorithm that outputs graphical primitives for cylindrical surface.
23 class Prs3d_ToolCylinder : public Prs3d_ToolQuadric
27 //! Generate primitives for 3D quadric surface and return a filled array.
28 Standard_EXPORT static Handle(Graphic3d_ArrayOfTriangles) Create (const Standard_Real theBottomRad,
29 const Standard_Real theTopRad,
30 const Standard_Real theHeight,
31 const Standard_Integer theNbSlices,
32 const Standard_Integer theNbStacks,
33 const gp_Trsf& theTrsf);
36 //! Initializes the algorithm.
37 Standard_EXPORT Prs3d_ToolCylinder (const Standard_Real theBottomRad,
38 const Standard_Real theTopRad,
39 const Standard_Real theHeight,
40 const Standard_Integer theNbSlices,
41 const Standard_Integer theNbStacks);
45 //! Computes vertex at given parameter location of the surface.
46 Standard_EXPORT virtual gp_Pnt Vertex (const Standard_Real theU, const Standard_Real theV) Standard_OVERRIDE;
48 //! Computes normal at given parameter location of the surface.
49 Standard_EXPORT virtual gp_Dir Normal (const Standard_Real theU, const Standard_Real theV) Standard_OVERRIDE;
53 Standard_Real myBottomRadius;
54 Standard_Real myTopRadius;
55 Standard_Real myHeight;
59 #endif // _Prs3d_ToolCylinder_HeaderFile