DefinesMath.h File Reference

Go to the source code of this file.

Defines

#define PI   3.14159f
#define TWOPI   6.28318f
#define HALFPI   1.570795f
#define RAND   ((float) rand() / (float) RAND_MAX)
#define MAX(x, y)   ((x)>(y)?(x):(y))
#define MIN(x, y)   ((x)<(y)?(x):(y))

Functions

float getFastSin (float angle)
float getFastCos (float angle)


Define Documentation

#define HALFPI   1.570795f

Definition at line 26 of file DefinesMath.h.

Referenced by Hemisphere::draw(), Hemisphere::drawColored(), and TargetCamera::moveCamera().

#define MAX ( x,
y   )     ((x)>(y)?(x):(y))

Definition at line 29 of file DefinesMath.h.

Referenced by ImageModifier::addBitmap(), ImageModifier::addCircle(), HeightMapModifier::addCirclePeak(), ShadowMap::addShadow(), calculateError(), LandVisibilityPatch::calculateErrors(), GLWLabel::calcWidth(), Model::centre(), TargetLife::collision(), TargetLife::collisionDistance(), MeshLODVector::computeEdgeCollapseCost(), Image::createAlphaMult(), Lightning::damageTargets(), DeformTextures::deformLandscape(), ModelRendererMesh::draw(), GLWPlanView::drawCameraPointer(), RenderGeoms::drawCollisionGeoms(), Hemisphere::drawColored(), GLWPlanView::drawMap(), GLWWindView::drawScene(), Landscape::drawShadows(), GLWPlanView::drawTanks(), HeightMapModifier::edgeEnhance(), fmtint(), Water2Renderer::generate(), Water2::generate(), HeightMapModifier::generateTerrain(), PlacementTypeTree::getPositions(), PlacementTypeMask::getPositions(), TargetSpace::getSquares(), TargetRendererImpl::getTargetSize(), WaterWaveDistance::getWaveDistance(), Mesh::insertVertex(), MovementMap::inShield(), GLWTabContainer::layout(), GLWPanel::layout(), TankAICurrentMove::makeMoveShot(), Vector::Max(), FixedVector::Max(), MissileMesh::MissileMesh(), GLWPlanView::mouseDown(), GLCamera::moveViewport(), HeightMapModifier::noise(), TargetSpace::normalizeCoords(), Triangle::pointInBoundingBox(), ServerWebHandler::LogHandler::processRequest(), ComsSyncCheckMessage::readMessage(), VisibilityPatchGrid::recalculateErrors(), ParticleRendererQuads::renderParticle(), ImageModifier::scalePlanBitmap(), GLWScrollWBackwards::setCurrent(), LandscapeSoundPositionGroup::setPosition(), WaterVisibilityPatch::setVisible(), TankAICurrentMove::shotAtTank(), ViewPoints::simulate(), Laser::simulate(), LandscapeMusicManager::simulate(), tankTargetCloseness(), TargetLife::updateAABB(), PlacementShadowDefinition::updateLandscapeHeight(), PlacementShadowDefinition::updateLandscapeTexture(), HeightMapModifier::waterErrosion(), WeaponGivePower::weaponCallback(), and WeaponGiveLives::weaponCallback().

#define MIN ( x,
y   )     ((x)<(y)?(x):(y))

Definition at line 30 of file DefinesMath.h.

Referenced by FileList::addAllFiles(), ImageModifier::addBitmap(), ImageModifier::addCircle(), HeightMapModifier::addCirclePeak(), ImageModifier::addLightMapToBitmap(), TargetGroupsGroupEntry::addObject(), ShadowMap::addShadow(), ImageModifier::addTexturesToBitmap(), Model::centre(), PhysicsParticleObject::checkCollision(), MeshLODVector::computeEdgeCollapseCost(), Image::createAlphaMult(), DeformTextures::deformLandscape(), ModelRendererMesh::draw(), GLWWeaponModel::draw(), GLWIconTable::draw(), GLWIconList::draw(), GLWBitmap::draw(), Hemisphere::drawColored(), GLWWindView::drawDisplay(), Landscape::drawShadows(), ParticleEmitter::emitExplosion(), WaterWaveDistance::generate(), LandSurround::generateList(), MovementMap::getFuel(), MipMapPatchIndexs::getIndex(), LandscapeSoundPositionSet::getInitCount(), PlacementTypeMask::getPositions(), WaterWaveDistance::getWaveDistance(), Napalm::init(), Mesh::insertVertex(), TankAICurrentMove::makeMoveShot(), SkyRoof::makeNormal(), TankAICurrentMove::makeProjectileShot(), GLCamera::moveViewport(), TargetSpace::normalizeCoords(), Triangle::pointInBoundingBox(), ServerWebHandler::LogHandler::processRequest(), ProgressDialogSync::progressChange(), VisibilityPatchGrid::recalculateErrors(), ParticleRendererQuads::renderParticle(), ImageModifier::scalePlanBitmap(), ServerFileServer::sendNextFile(), LandscapeSoundPositionGroup::setPosition(), WaterVisibilityPatch::setVisible(), TankAICurrentMove::shotAtTank(), TankBatteryTip::showItems(), ViewPoints::simulate(), LandscapeMusicManager::simulate(), user_read_fn(), HeightMapModifier::waterErrosion(), WeaponGiveLife::weaponCallback(), and WeaponGiveAccessory::weaponCallback().

#define PI   3.14159f

Definition at line 24 of file DefinesMath.h.

Referenced by SkyLine::actualDraw(), ModelMaths::angleMatrix(), GLWidget::draw(), GLWidget::drawCircle(), drawPalmLevel(), drawPalmTrunc(), drawPineLevel(), drawPineTrunc(), TargetRendererImpl::drawShield(), Bone::getRotationAtTime(), TankAICurrentMove::inHole(), TankAICurrentMove::lowestHighest(), and Model::setupBones().

#define RAND   ((float) rand() / (float) RAND_MAX)

Definition at line 28 of file DefinesMath.h.

Referenced by TankDamage::calculateDamage(), WaterWaves::constructLines(), DebrisActionRenderer::DebrisActionRenderer(), drawPalmLevel(), drawPineLevel(), ParticleEmitter::emitDebris(), ParticleEmitter::emitExplosion(), ParticleEmitter::emitExplosionRing(), ParticleEmitter::emitMushroom(), ParticleEmitter::emitPrecipitation(), ParticleEmitter::emitSmoke(), ParticleEmitter::emitSpray(), ExplosionNukeRendererEntry::ExplosionNukeRendererEntry(), Water2Renderer::generate(), Water2::generate(), Counter::genNextTime(), ExplosionParams::getExplosionColor(), LandscapeSoundTimingRepeat::getNextEventTime(), LandscapeDefinitions::getRandomLandscapeDefnEntry(), TankAICurrentTarget::getTargets(), Explosion::init(), TankAICurrentMove::makeProjectileShot(), NapalmRenderer::NapalmRenderer(), TurnController::newGame(), OptionsTransient::newGameWall(), TankAICurrentMove::playMove(), randomScalar(), randomVector(), TankAICurrentMove::shotAtTank(), TargetRendererImplTank::simulate(), and GLCamera::simulate().

#define TWOPI   6.28318f

Definition at line 25 of file DefinesMath.h.

Referenced by Hemisphere::draw(), Hemisphere::drawColored(), and ParticleEmitter::emitExplosion().


Function Documentation

float getFastCos ( float  angle  ) 

Definition at line 50 of file DefinesMath.cpp.

References calculatedFast, calculateFast(), fastCos, and int().

float getFastSin ( float  angle  ) 

Definition at line 40 of file DefinesMath.cpp.

References calculatedFast, calculateFast(), fastSin, and int().


Generated on Mon Feb 16 15:14:57 2009 for Scorched3D by  doxygen 1.5.3