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

FXGLCylinder.h
Go to the documentation of this file.
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,2006 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (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 GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
21 *********************************************************************************
22 * $Id: FXGLCylinder.h,v 1.17 2006/01/22 17:58:02 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXGLCYLINDER_H
25 #define FXGLCYLINDER_H
26 
27 #ifndef FXGLSHAPE_H
28 #include "FXGLShape.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /// OpenGL Cylinder Object
35 class FXAPI FXGLCylinder : public FXGLShape {
37 public:
40 protected:
41  FXGLCylinder();
42  virtual void drawshape(FXGLViewer* viewer);
43 public:
44 
45  /// Construct with specified origin, height and radius
46  FXGLCylinder(FXfloat x,FXfloat y,FXfloat z,FXfloat h=1.0f, FXfloat r=1.0f);
47 
48  /// Construct with specified origin, height, radius and material
50 
51  /// Copy constructor
52  FXGLCylinder(const FXGLCylinder& orig);
53 
54  /// Copy this object
55  virtual FXGLObject* copy();
56 
57  /// Change radius
58  void setRadius(FXfloat r){ radius=r; }
59  FXfloat getRadius() const { return radius; }
60 
61  /// Change height
62  void setHeight(FXfloat h){ height=h; }
63  FXfloat getHeight() const { return height; }
64 
65  /// Save to a stream
66  virtual void save(FXStream& store) const;
67 
68  /// Load from a stream
69  virtual void load(FXStream& store);
70 
71  virtual ~FXGLCylinder();
72  };
73 
74 }
75 
76 #endif
Definition: FXGLViewer.h:79
Basic OpenGL object.
Definition: FXGLObject.h:39
OpenGL viewer widget.
Definition: FXGLViewer.h:100
#define FXAPI
Definition: fxdefs.h:122
OpenGL Cylinder Object.
Definition: FXGLCylinder.h:35
FXfloat height
Definition: FXGLCylinder.h:38
Definition: FX4Splitter.h:31
OpenGL Shape Object.
Definition: FXGLShape.h:64
FXfloat radius
Definition: FXGLCylinder.h:39
float FXfloat
Definition: fxdefs.h:398
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition: FXObject.h:92

Copyright © 1997-2005 Jeroen van der Zijp