Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

fog.h

Go to the documentation of this file.
00001 /*********************************************************************
00002 * lescegra                                                           *
00003 *                                                                    *
00004 * http://geeky.kicks-ass.org/projects/lescegra.html                  *
00005 *                                                                    *
00006 * Copyright 2003 by Enno Cramer <uebergeek@web.de>                   *
00007 *                                                                    *
00008 * This library is free software; you can redistribute it and/or      *
00009 * modify it under the terms of the GNU Library General Public        *
00010 * License as published by the Free Software Foundation; either       *
00011 * version 2 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 * Library General Public License for more details.                   *
00017 *                                                                    *
00018 * You should have received a copy of the GNU Library General Public  *
00019 * License along with this library; if not, write to the Free         *
00020 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
00021 *********************************************************************/
00022 
00023 #ifndef LSG_FOG_H
00024 #define LSG_FOG_H 1
00025 
00026 /**
00027  * \file  fog.h
00028  * \brief Fog effect
00029  */
00030 
00031 #include <lescegra/sg/group.h>
00032 
00033 enum LsgFogType {
00034     FOG_LINEAR,
00035     FOG_EXP,
00036     FOG_EXP2
00037 };
00038 
00039 /**
00040  * \ingroup scene
00041  * \brief   Fog effect
00042  *
00043  * Node defining a fogging effect with color and fog function.
00044  */
00045 typedef struct {
00046     LsgGroup super;
00047     int type;
00048     float color[4];
00049     float start;
00050     float end;
00051     float density;
00052 } LsgFog;
00053 
00054 LsgFog* LsgFog_create(enum LsgFogType type);
00055 void LsgFog_init(LsgFog* self, enum LsgFogType type);
00056 void LsgFog_display(LsgFog* self, LsgFrustum* frust);
00057 
00058 #define LsgFog_clean(self)       LsgGroup_clean(&(self)->super)
00059 #define LsgFog_update(self, now) LsgGroup_update(&(self)->super, now)
00060 #define LsgFog_destroy(self)     LsgGroup_destroy(&(self)->super)
00061 
00062 #endif

(c) 2003, by Enno Cramer
generated on 13 Jul 2003
lescegra - doxygen