![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
00001 /******************************************************************************** 00002 * * 00003 * O p e n G L C y l i n d e r 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: FXGLCylinder.h,v 1.22 2009/01/06 13:07:24 fox Exp $ * 00022 ********************************************************************************/ 00023 #ifndef FXGLCYLINDER_H 00024 #define FXGLCYLINDER_H 00025 00026 #ifndef FXGLSHAPE_H 00027 #include "FXGLShape.h" 00028 #endif 00029 00030 namespace FX { 00031 00032 00033 /// OpenGL Cylinder Object 00034 class FXAPI FXGLCylinder : public FXGLShape { 00035 FXDECLARE(FXGLCylinder) 00036 public: 00037 FXfloat height; 00038 FXfloat radius; 00039 protected: 00040 FXGLCylinder(); 00041 virtual void drawshape(FXGLViewer* viewer); 00042 public: 00043 00044 /// Construct with specified origin, height and radius 00045 FXGLCylinder(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 FXGLCylinder(FXfloat x,FXfloat y,FXfloat z,FXfloat h,FXfloat r,const FXMaterial& mtl); 00049 00050 /// Copy constructor 00051 FXGLCylinder(const FXGLCylinder& 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 virtual ~FXGLCylinder(); 00071 }; 00072 00073 } 00074 00075 #endif
![]() |