RandomGenerator Class Reference

#include <RandomGenerator.h>

List of all members.

Public Member Functions

 RandomGenerator ()
virtual ~RandomGenerator ()
void seed (unsigned int seed)
unsigned int getSeed ()
unsigned int getRandUInt ()
fixed getRandFixed ()

Protected Attributes

unsigned int position_

Static Protected Attributes

static unsigned int bufferSize_ = 0
static unsigned int * buffer_ = 0

Private Member Functions

 RandomGenerator (const RandomGenerator &other)
RandomGeneratoroperator= (const RandomGenerator &other)


Detailed Description

Definition at line 26 of file RandomGenerator.h.


Constructor & Destructor Documentation

RandomGenerator::RandomGenerator (  ) 

Definition at line 33 of file RandomGenerator.cpp.

References buffer_, bufferSize_, DIALOG_ASSERT, and S3D::getDataFile().

RandomGenerator::~RandomGenerator (  )  [virtual]

Definition at line 59 of file RandomGenerator.cpp.

RandomGenerator::RandomGenerator ( const RandomGenerator other  )  [private]


Member Function Documentation

void RandomGenerator::seed ( unsigned int  seed  ) 

Definition at line 63 of file RandomGenerator.cpp.

References position_.

Referenced by ServerShotState::enterState(), PlacementTankPosition::flattenTankPositions(), TargetMovement::generate(), GroundMaps::generateObjects(), HeightMapLoader::generateTerrain(), TankAISniperGuesser::guess(), TankAIAimGuesser::initialShot(), OptionsTransient::newGameWind(), and OptionsTransient::nextRoundWind().

unsigned int RandomGenerator::getSeed (  ) 

Definition at line 68 of file RandomGenerator.cpp.

References position_.

unsigned int RandomGenerator::getRandUInt (  ) 

Definition at line 73 of file RandomGenerator.cpp.

References buffer_, bufferSize_, and position_.

Referenced by WeaponRandomChoice::fireWeapon(), WeaponGroupSelect::fireWeapon(), TankAIStrings::getAttackLine(), TankAIStrings::getDeathLine(), getRandFixed(), HeightMapModifier::noise(), Napalm::simulateAddEdge(), and HeightMapModifier::waterErrosion().

fixed RandomGenerator::getRandFixed (  ) 

Definition at line 85 of file RandomGenerator.cpp.

References getRandUInt().

Referenced by HeightMapModifier::addCirclePeak(), WeaponRoller::addRoller(), PlacementObjectRandom::createObject(), PlacementObjectHeight::createObject(), TargetDefinition::createTarget(), Lightning::dispaceDirection(), WeaponScatterPosition::fireWeapon(), WeaponScatterDirection::fireWeapon(), WeaponRoller::fireWeapon(), WeaponPosition::fireWeapon(), WeaponNapalm::fireWeapon(), WeaponMirv::fireWeapon(), WeaponAimedUnder::fireWeapon(), WeaponAimedOver::fireWeapon(), TargetMovementEntryShips::generate(), Lightning::generateLightning(), HeightMapModifier::generateTerrain(), TankAIStrings::getAttackLine(), TankAIStrings::getDeathLine(), LandscapeConditionRandom::getNextEventTime(), LandscapeConditionTime::getNextEventTime(), PlacementTypeTree::getPositions(), PlacementTypeMask::getPositions(), PlacementTypeBounds::getPositions(), TankLib::getShotTowardsPosition(), NumberParser::getValue(), TankAISniperGuesser::guess(), OptionsTransient::newGameWind(), OptionsTransient::nextRoundWind(), PlacementTankPosition::placeTank(), HeightMapModifier::scale(), Napalm::simulateAddEdge(), and HeightMapModifier::waterErrosion().

RandomGenerator& RandomGenerator::operator= ( const RandomGenerator other  )  [private]


Member Data Documentation

unsigned int RandomGenerator::bufferSize_ = 0 [static, protected]

Definition at line 40 of file RandomGenerator.h.

Referenced by getRandUInt(), and RandomGenerator().

unsigned int * RandomGenerator::buffer_ = 0 [static, protected]

Definition at line 41 of file RandomGenerator.h.

Referenced by getRandUInt(), and RandomGenerator().

unsigned int RandomGenerator::position_ [protected]

Definition at line 42 of file RandomGenerator.h.

Referenced by getRandUInt(), getSeed(), and seed().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:05 2009 for Scorched3D by  doxygen 1.5.3