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

glrendermode.h

00001 /***************************************************************************
00002                           glrendermode.h  -  description
00003                              -------------------
00004     begin                : Wed Jul 30 2003
00005     copyright            : (C) 2003 by Jacques Gasselin de Richebourg
00006     email                : jacquesgasselin@hotmail.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU Lesser General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef GLRENDERMODE_H
00019 #define GLRENDERMODE_H
00020 
00021 #include "glscene.h"
00022 
00027 namespace GLScene
00028 {
00029    
00030    class GLRenderMode: public GLRenderState
00031    {
00032       unsigned int state;
00033    public:
00034 
00035       GLRenderMode();
00036       GLRenderMode(unsigned int);
00037       GLRenderMode(const GLRenderMode&);
00038       virtual ~GLRenderMode();
00039 
00040       SML_TAG(rendermode);
00041 
00042       inline GLRenderMode& operator =(const GLRenderMode& rm)
00043       { state = rm.state; return *this; }
00044 
00045       inline GLRenderMode& operator =(const unsigned int s)
00046       { state = s; return *this; }
00047       
00048       inline const unsigned int operator &(const unsigned int val) const
00049       { return state & val; }
00050       inline const unsigned int operator ^(const unsigned int val) const
00051       { return state ^ val; }
00052       inline const unsigned int operator |(const unsigned int val) const
00053       { return state | val; }
00054       inline const unsigned int operator ~(void) const
00055       { return ~state; }
00056 
00057       inline GLRenderMode& operator &=(const unsigned int val)
00058       { state = state & val; return *this; }
00059       inline GLRenderMode& operator ^=(const unsigned int val)
00060       { state = state ^ val; return *this; }
00061       inline GLRenderMode& operator |=(const unsigned int val)
00062       { state = state | val; return *this; }
00063       
00064       const GLRenderMode operator +(const unsigned int val) const
00065       { return GLRenderMode(state + val); }
00066       const GLRenderMode operator -(const unsigned int val) const
00067       { return GLRenderMode(state - val); }
00068 
00069       GLRenderMode& operator +=(const unsigned int val)
00070       { state += val; return *this; }
00071       GLRenderMode& operator -=(const unsigned int val)
00072       { state -= val; return *this; }
00073    
00074       static const unsigned int POINTS;
00075       static const unsigned int WIRE;
00076       static const unsigned int CONTROL_POINTS;
00077       static const unsigned int FLAT;
00078       static const unsigned int SMOOTH;
00079       static const unsigned int TEXTURE;
00080       static const unsigned int SURFACE_NORMALS;
00081       static const unsigned int VERTEX_NORMALS;
00082       static const unsigned int SKELETAL;
00083       static const unsigned int VERTEX_ARRAY;
00084       static const unsigned int DISPLAY_LIST;
00085 
00086       virtual void render() {};
00087    
00088    };
00089 };
00090 #endif

Generated on Wed Feb 4 23:11:33 2004 by doxygen 1.3.3