Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXGLCylinder.h
1 /********************************************************************************
2 * *
3 * O p e n G L C y l i n d e r O b j e c t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1999,2016 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXGLCYLINDER_H
22 #define FXGLCYLINDER_H
23 
24 #ifndef FXGLSHAPE_H
25 #include "FXGLShape.h"
26 #endif
27 
28 namespace FX {
29 
30 
32 class FXAPI FXGLCylinder : public FXGLShape {
33  FXDECLARE(FXGLCylinder)
34 public:
35  FXfloat height;
36  FXfloat radius;
37 protected:
38  FXGLCylinder();
39  virtual void drawshape(FXGLViewer* viewer);
40 public:
41 
43  FXGLCylinder(FXfloat x,FXfloat y,FXfloat z,FXfloat h=1.0f, FXfloat r=1.0f);
44 
46  FXGLCylinder(FXfloat x,FXfloat y,FXfloat z,FXfloat h,FXfloat r,const FXMaterial& mtl);
47 
49  FXGLCylinder(const FXGLCylinder& orig);
50 
52  virtual FXGLObject* copy();
53 
55  virtual void setRadius(FXfloat r);
56  FXfloat getRadius() const { return radius; }
57 
59  virtual void setHeight(FXfloat h);
60  FXfloat getHeight() const { return height; }
61 
63  virtual void save(FXStream& store) const;
64 
66  virtual void load(FXStream& store);
67 
68  virtual ~FXGLCylinder();
69  };
70 
71 }
72 
73 #endif

Copyright © 1997-2016 Jeroen van der Zijp