#include <GDynamicGeneratorCategory.h>
Inheritance diagram for GBE::GDynamicGeneratorCategory:


Public Member Functions | |
| GDynamicGeneratorCategory (double range, double radius_min, double radius_max, bool form_overlapping_allowed) | |
| virtual | ~GDynamicGeneratorCategory () |
| double | getRange () const |
| double | getRadiusMax () const |
| double | getRadiusMin () const |
| bool | formOverlapAllowed () const |
| virtual bool | checkGenerationPlausibility (const GCS::GVector3 &position) const |
| virtual GCS::GForm * | createForm (const GCS::GEnergy &energy, const GCS::GVector3 &position, Util::PseudoRNG &rng) const =0 |
| virtual void | postProcess (GCS::GElement *element, Util::PseudoRNG &rng, const GCS::GObject *own_object) const =0 |
Protected Attributes | |
| double | Range |
| double | RadiusMin |
| double | RadiusMax |
| bool | FormOverlapAllowed |
The element itself is not created in the category class but in the GDynamicGeneratorAgent class. Vital parts are provided by the category: the form and agents. The energy is provided by the parent element.
| GBE::GDynamicGeneratorCategory::GDynamicGeneratorCategory | ( | double | range, | |
| double | radius_min, | |||
| double | radius_max, | |||
| bool | form_overlapping_allowed | |||
| ) |
Constructor. Sets values for this element category.
| GBE::GDynamicGeneratorCategory::~GDynamicGeneratorCategory | ( | ) | [virtual] |
Virtual destructor.
| bool GBE::GDynamicGeneratorCategory::checkGenerationPlausibility | ( | const GCS::GVector3 & | position | ) | const [virtual] |
An element of this category will only be generated if this method returns true, if it returns false, no element will be generated. By default this method returns always true.
| virtual GCS::GForm* GBE::GDynamicGeneratorCategory::createForm | ( | const GCS::GEnergy & | energy, | |
| const GCS::GVector3 & | position, | |||
| Util::PseudoRNG & | rng | |||
| ) | const [pure virtual] |
This actually creates a form attribute for a new element of this category.
Implemented in GBE::GPlanetCategory, and GBE::GSolarsystemCategory.
| bool GBE::GDynamicGeneratorCategory::formOverlapAllowed | ( | ) | const |
| double GBE::GDynamicGeneratorCategory::getRadiusMax | ( | ) | const |
| double GBE::GDynamicGeneratorCategory::getRadiusMin | ( | ) | const |
| double GBE::GDynamicGeneratorCategory::getRange | ( | ) | const |
| virtual void GBE::GDynamicGeneratorCategory::postProcess | ( | GCS::GElement * | element, | |
| Util::PseudoRNG & | rng, | |||
| const GCS::GObject * | own_object | |||
| ) | const [pure virtual] |
Here the element can be posprocessed. This is especially important for creating agents and adding them to the element.
Implemented in GBE::GPlanetCategory, and GBE::GSolarsystemCategory.
bool GBE::GDynamicGeneratorCategory::FormOverlapAllowed [protected] |
Determines, whether the element form may overlap with other elements. If forms may overlap, the generator agent will create such an element although it will overlap with another element.
double GBE::GDynamicGeneratorCategory::RadiusMax [protected] |
Holds the maximum radius an element of this category can occupy.
double GBE::GDynamicGeneratorCategory::RadiusMin [protected] |
Holds the minimum radius an element of this category will occupy.
double GBE::GDynamicGeneratorCategory::Range [protected] |
When the correct category is chosen for element creation, this range attribute is used to determine the correct category. Range must be between 0 and 1, all Ranges of used categories summed up should result in a number less than 1 because all categories above 1 will never be chosen (as the generated random number is always between 0 and 1).
1.4.7