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

FXGLCube.h
1 /********************************************************************************
2 * *
3 * O p e n G L C u b e O b j e c t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1999,2016 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (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 *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXGLCUBE_H
22 #define FXGLCUBE_H
23 
24 #ifndef FXGLSHAPE_H
25 #include "FXGLShape.h"
26 #endif
27 
28 namespace FX {
29 
30 
32 class FXAPI FXGLCube : public FXGLShape {
33  FXDECLARE(FXGLCube)
34 public:
35  FXfloat width;
36  FXfloat height;
37  FXfloat depth;
38 protected:
39  FXGLCube();
40  virtual void drawshape(FXGLViewer* viewer);
41 public:
42 
44  FXGLCube(FXfloat x,FXfloat y,FXfloat z,FXfloat w=1.0f,FXfloat h=1.0f,FXfloat d=1.0f);
45 
47  FXGLCube(FXfloat x,FXfloat y,FXfloat z,FXfloat w,FXfloat h,FXfloat d,const FXMaterial& mtl);
48 
50  FXGLCube(const FXGLCube& orig);
51 
53  virtual FXGLObject* copy();
54 
56  virtual void setWidth(FXfloat w);
57  FXfloat getWidth() const { return width; }
58 
60  virtual void setHeight(FXfloat h);
61  FXfloat getHeight() const { return height; }
62 
64  virtual void setDepth(FXfloat d);
65  FXfloat getDepth() const { return depth; }
66 
68  virtual void save(FXStream& store) const;
69 
71  virtual void load(FXStream& store);
72 
74  virtual ~FXGLCube();
75  };
76 
77 }
78 
79 #endif

Copyright © 1997-2016 Jeroen van der Zijp