0027670: Visualization - avoid duplication of structures defining primitive array...
[occt.git] / src / OpenGl / OpenGl_Disk.hxx
CommitLineData
c827ea3a 1// Created on: 2014-10-15
2// Created by: Denis Bogolepov
3// Copyright (c) 2014 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 OpenGl_Disk_Header
17#define OpenGl_Disk_Header
18
19#include <OpenGl_Quadric.hxx>
20
21//! Tool class for generating disk (circle) tessellation.
22class OpenGl_Disk : public OpenGl_Quadric
23{
24public:
25
26 //! Create uninitialized disk (circle) primitive.
27 Standard_EXPORT OpenGl_Disk();
28
29 //! Initialize disk (circle) primitive.
30 Standard_EXPORT Standard_Boolean Init (const Standard_ShortReal theInnerRadius,
31 const Standard_ShortReal theOuterRadius,
32 const Standard_Integer theNbSlices = 10,
33 const Standard_Integer theNbStacks = 10);
34
35protected:
36
37 //! Returns surface point for the given parameters.
38 Standard_EXPORT virtual OpenGl_Vec3 evalVertex (const Standard_ShortReal theU,
39 const Standard_ShortReal theV) const Standard_OVERRIDE;
40
41 //! Returns surface normal for the given parameters.
42 Standard_EXPORT virtual OpenGl_Vec3 evalNormal (const Standard_ShortReal theU,
43 const Standard_ShortReal theV) const Standard_OVERRIDE;
44
45private:
46
47 Standard_ShortReal myInnerRadius; //!< Inner radius of the disk
48 Standard_ShortReal myOuterRadius; //!< Outer radius of the disk
49
50};
51
52#endif // OpenGl_Disk_Header