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

FXGLCone.h

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,2005 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or * 00009 * modify it under the terms of the GNU Lesser General Public * 00010 * License as published by the Free Software Foundation; either * 00011 * version 2.1 of the License, or (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 GNU * 00016 * Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public * 00019 * License along with this library; if not, write to the Free Software * 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * 00021 ********************************************************************************* 00022 * $Id: FXGLCone.h,v 1.16 2005/01/16 16:06:06 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXGLCONE_H 00025 #define FXGLCONE_H 00026 00027 #ifndef FXGLSHAPE_H 00028 #include "FXGLShape.h" 00029 #endif 00030 00031 namespace FX { 00032 00033 00034 /// OpenGL Cone Object 00035 class FXAPI FXGLCone : public FXGLShape { 00036 FXDECLARE(FXGLCone) 00037 public: 00038 FXfloat height; 00039 FXfloat radius; 00040 protected: 00041 FXGLCone(); 00042 virtual void drawshape(FXGLViewer* viewer); 00043 public: 00044 00045 /// Construct with specified origin, height and radius 00046 FXGLCone(FXfloat x,FXfloat y,FXfloat z,FXfloat h=1.0f,FXfloat r=1.0f); 00047 00048 /// Construct with specified origin, height, radius and material 00049 FXGLCone(FXfloat x,FXfloat y,FXfloat z,FXfloat h,FXfloat r,const FXMaterial& mtl); 00050 00051 /// Copy constructor 00052 FXGLCone(const FXGLCone& orig); 00053 00054 /// Copy this object 00055 virtual FXGLObject* copy(); 00056 00057 /// Change radius 00058 void setRadius(FXfloat r){ radius=r; } 00059 FXfloat getRadius() const { return radius; } 00060 00061 /// Change height 00062 void setHeight(FXfloat h){ height=h; } 00063 FXfloat getHeight() const { return height; } 00064 00065 /// Save to a stream 00066 virtual void save(FXStream& store) const; 00067 00068 /// Load from a stream 00069 virtual void load(FXStream& store); 00070 00071 /// Destroy 00072 virtual ~FXGLCone(); 00073 }; 00074 00075 } 00076 00077 #endif

Copyright © 1997-2005 Jeroen van der Zijp