GDynamicGeneratorCategory.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Raphael Langerhorst                             *
00003  *   raphael-langerhorst@gmx.at                                            *
00004  *                                                                         *
00005  *   Permission is hereby granted, free of charge, to any person obtaining *
00006  *   a copy of this software and associated documentation files (the       *
00007  *   "Software"), to deal in the Software without restriction, including   *
00008  *   without limitation the rights to use, copy, modify, merge, publish,   *
00009  *   distribute, sublicense, and/or sell copies of the Software, and to    *
00010  *   permit persons to whom the Software is furnished to do so, subject to *
00011  *   the following conditions:                                             *
00012  *                                                                         *
00013  *   The above copyright notice and this permission notice shall be        *
00014  *   included in all copies or substantial portions of the Software.       *
00015  *                                                                         *
00016  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
00017  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
00018  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*
00019  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
00020  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
00021  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
00022  *   OTHER DEALINGS IN THE SOFTWARE.                                       *
00023  ***************************************************************************/
00024  
00025 #ifndef GBEGDYNAMICGENERATORCATEGORYH
00026 #define GBEGDYNAMICGENERATORCATEGORYH
00027 
00028 #include "PseudoRNG.h"
00029 
00030 #include <GElement.h>
00031 #include <GEnergy.h>
00032 #include <GVector3.h>
00033 #include <GForm.h>
00034 #include <GAgent.h>
00035 #include <GObject.h>
00036 
00037 // #include <q3ptrlist.h>
00038 #include <QList>
00039 
00040 namespace GBE
00041 {
00042 
00062 class GDynamicGeneratorCategory
00063 {
00064   protected:
00065   
00075     double Range;
00076     
00080     double RadiusMin;
00081     
00085     double RadiusMax;
00086     
00093     bool FormOverlapAllowed;
00094     
00095   public:
00096   
00100     GDynamicGeneratorCategory(double range,
00101                               double radius_min, double radius_max,
00102                               bool form_overlapping_allowed);
00103                               
00107     virtual ~GDynamicGeneratorCategory();
00108   
00112     double getRange() const;
00113     
00117     double getRadiusMax() const;
00118     
00122     double getRadiusMin() const;
00123     
00127     bool formOverlapAllowed() const;
00128     
00136     virtual bool checkGenerationPlausibility(const GCS::GVector3& position) const;
00137     
00142     virtual GCS::GForm* createForm(const GCS::GEnergy& energy, const GCS::GVector3& position, Util::PseudoRNG& rng) const = 0;
00143     
00151     virtual void postProcess(GCS::GElement* element, Util::PseudoRNG& rng, const GCS::GObject* own_object) const = 0;
00152     
00153 };
00154 
00155 }
00156 
00157 #endif

Generated on Thu Nov 16 07:49:12 2006 for G System by  doxygen 1.4.7