FXGLCube.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                        O p e n G L   C u b e    O b j e c t                   *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1999,2006 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: FXGLCube.h,v 1.17 2006/01/22 17:58:02 fox Exp $                          *
00023 ********************************************************************************/
00024 #ifndef FX_DISABLEGL
00025 
00026 #if FX_GRAPHINGMODULE
00027 
00028 #ifndef FXGLCUBE_H
00029 #define FXGLCUBE_H
00030 
00031 #ifndef FXGLSHAPE_H
00032 #include "FXGLShape.h"
00033 #endif
00034 
00035 namespace FX {
00036 
00037 
00039 class FXGRAPHINGMODULEAPI FXGLCube : public FXGLShape {
00040   FXDECLARE(FXGLCube)
00041 public:
00042   FXfloat width;
00043   FXfloat height;
00044   FXfloat depth;
00045 protected:
00046   FXGLCube();
00047   virtual void drawshape(FXGLViewer* viewer);
00048 public:
00049 
00051   FXGLCube(FXfloat x,FXfloat y,FXfloat z,FXfloat w=1.0f,FXfloat h=1.0f,FXfloat d=1.0f);
00052 
00054   FXGLCube(FXfloat x,FXfloat y,FXfloat z,FXfloat w,FXfloat h,FXfloat d,const FXMaterial& mtl);
00055 
00057   FXGLCube(const FXGLCube& orig);
00058 
00060   virtual FXGLObject* copy();
00061 
00063   void setWidth(FXfloat w){ width=w; }
00064   FXfloat getWidth() const { return width; }
00065 
00067   void setHeight(FXfloat h){ height=h; }
00068   FXfloat getHeight() const { return height; }
00069 
00071   void setDepth(FXfloat d){ depth=d; }
00072   FXfloat getDepth() const { return depth; }
00073 
00075   virtual void save(FXStream& store) const;
00076 
00078   virtual void load(FXStream& store);
00079 
00081   virtual ~FXGLCube();
00082   };
00083 
00084 }
00085 
00086 #endif
00087 #endif
00088 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:22 2009 for TnFOX by doxygen v1.4.7