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

FXGLCone.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * O p e n G L C o n e 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: FXGLCone.h,v 1.17 2006/01/22 17:58:02 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXGLCONE_H
25 #define FXGLCONE_H
26 
27 #ifndef FXGLSHAPE_H
28 #include "FXGLShape.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /// OpenGL Cone Object
35 class FXAPI FXGLCone : public FXGLShape {
37 public:
40 protected:
41  FXGLCone();
42  virtual void drawshape(FXGLViewer* viewer);
43 public:
44 
45  /// Construct with specified origin, height and radius
46  FXGLCone(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  FXGLCone(const FXGLCone& 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  /// Destroy
72  virtual ~FXGLCone();
73  };
74 
75 }
76 
77 #endif
FXfloat height
Definition: FXGLCone.h:38
Definition: FXGLViewer.h:79
OpenGL Cone Object.
Definition: FXGLCone.h:35
Basic OpenGL object.
Definition: FXGLObject.h:39
OpenGL viewer widget.
Definition: FXGLViewer.h:100
#define FXAPI
Definition: fxdefs.h:122
OpenGL Shape Object.
Definition: FXGLShape.h:64
FXfloat radius
Definition: FXGLCone.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