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

FXGLCone.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                        O p e n G L   C o n e    O b j e c t                   *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1999,2009 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (at your option) any later version.                                           *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 *********************************************************************************
00021 * $Id: FXGLCone.h,v 1.22 2009/01/06 13:07:24 fox Exp $                          *
00022 ********************************************************************************/
00023 #ifndef FXGLCONE_H
00024 #define FXGLCONE_H
00025 
00026 #ifndef FXGLSHAPE_H
00027 #include "FXGLShape.h"
00028 #endif
00029 
00030 namespace FX {
00031 
00032 
00033 /// OpenGL Cone Object
00034 class FXAPI FXGLCone : public FXGLShape {
00035   FXDECLARE(FXGLCone)
00036 public:
00037   FXfloat height;
00038   FXfloat radius;
00039 protected:
00040   FXGLCone();
00041   virtual void drawshape(FXGLViewer* viewer);
00042 public:
00043 
00044   /// Construct with specified origin, height and radius
00045   FXGLCone(FXfloat x,FXfloat y,FXfloat z,FXfloat h=1.0f,FXfloat r=1.0f);
00046 
00047   /// Construct with specified origin, height, radius and material
00048   FXGLCone(FXfloat x,FXfloat y,FXfloat z,FXfloat h,FXfloat r,const FXMaterial& mtl);
00049 
00050   /// Copy constructor
00051   FXGLCone(const FXGLCone& orig);
00052 
00053   /// Copy this object
00054   virtual FXGLObject* copy();
00055 
00056   /// Change radius
00057   virtual void setRadius(FXfloat r);
00058   FXfloat getRadius() const { return radius; }
00059 
00060   /// Change height
00061   virtual void setHeight(FXfloat h);
00062   FXfloat getHeight() const { return height; }
00063 
00064   /// Save to a stream
00065   virtual void save(FXStream& store) const;
00066 
00067   /// Load from a stream
00068   virtual void load(FXStream& store);
00069 
00070   /// Destroy
00071   virtual ~FXGLCone();
00072   };
00073 
00074 }
00075 
00076 #endif

Copyright © 1997-2009 Jeroen van der Zijp