0027957: Visualization, AIS_InteractiveContext - protect from displaying the same...
[occt.git] / src / StdPrs / StdPrs_ToolCylinder.hxx
... / ...
CommitLineData
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 _StdPrs_ToolCylinder_HeaderFile
17#define _StdPrs_ToolCylinder_HeaderFile
18
19#include <Standard.hxx>
20#include <StdPrs_ToolQuadric.hxx>
21
22//! Standard presentation algorithm that outputs graphical primitives for cylindrical surface.
23class StdPrs_ToolCylinder : public StdPrs_ToolQuadric
24{
25public:
26
27 DEFINE_STANDARD_ALLOC
28
29 //! Initializes the algorithm.
30 Standard_EXPORT StdPrs_ToolCylinder (const Standard_ShortReal theBottomRad,
31 const Standard_ShortReal theTopRad,
32 const Standard_ShortReal theHeight,
33 const Standard_Integer theSlicesNb,
34 const Standard_Integer theStacksNb);
35
36protected:
37
38 //! Computes vertex at given parameter location of the surface.
39 Standard_EXPORT virtual gp_Pnt Vertex (const Standard_Real theU, const Standard_Real theV) Standard_OVERRIDE;
40
41 //! Computes normal at given parameter location of the surface.
42 Standard_EXPORT virtual gp_Dir Normal (const Standard_Real theU, const Standard_Real theV) Standard_OVERRIDE;
43
44protected:
45
46 Standard_ShortReal myBottomRadius;
47 Standard_ShortReal myTopRadius;
48 Standard_ShortReal myHeight;
49};
50
51#endif // _StdPrs_ToolCylinder_HeaderFile