fixed Class Reference

#include <fixed.h>

List of all members.

Public Member Functions

 fixed ()
 fixed (const fixed &fixedVal)
 fixed (bool bInternal, int nVal)
 fixed (unsigned int nVal)
 fixed (int nVal)
 fixed (const char *nVal)
 ~fixed ()
fixed operator++ ()
fixed operator-- ()
fixed operator- ()
fixedoperator= (fixed fixedVal)
bool operator== (fixed fixedVal)
bool operator!= (fixed fixedVal)
bool operator< (fixed fixedVal)
bool operator<= (fixed fixedVal)
bool operator> (fixed fixedVal)
bool operator>= (fixed fixedVal)
const char * asString ()
float asFloat ()
int asInt ()
int getInternal ()
int * getInternalData ()
fixed floor ()
fixed ceil ()
fixed operator+ (fixed b)
fixed operator- (fixed b)
fixed operator * (fixed b)
fixed operator/ (fixed b)
fixed sqrt ()
fixed pow (fixed fixedPower)
fixed log10 ()
fixed log ()
fixed exp ()
fixed cos ()
fixed sin ()
fixed tan ()
fixed acos ()
fixed abs ()
fixed operator% (fixed fixedVal)
fixed operator *= (fixed val)
fixed operator/= (fixed val)
fixed operator-= (fixed val)
fixed operator+= (fixed val)

Static Public Member Functions

static fixed fromFloat (float flt)

Static Public Attributes

static fixed MAX_FIXED
static fixed XPI = fixed(true,_XPI)
static fixed X2PI = fixed(true,_X2PI)
static fixed XPIO2 = fixed(true,_XPIO2)

Private Attributes

int m_nVal


Detailed Description

Definition at line 31 of file fixed.h.


Constructor & Destructor Documentation

fixed::fixed (  )  [inline]

Definition at line 36 of file fixed.h.

References m_nVal.

Referenced by _atanx(), _sinx(), abs(), absx(), acos(), atanx(), ceil(), cos(), floor(), iExp2(), iLog2(), ipow(), operator *(), operator-(), operator/(), sin(), and sqrt().

fixed::fixed ( const fixed fixedVal  )  [inline]

Definition at line 41 of file fixed.h.

References m_nVal.

fixed::fixed ( bool  bInternal,
int  nVal 
) [inline]

Definition at line 46 of file fixed.h.

References m_nVal.

fixed::fixed ( unsigned int  nVal  )  [inline]

Definition at line 51 of file fixed.h.

References FIXED_RESOLUTION, and m_nVal.

fixed::fixed ( int  nVal  )  [inline]

Definition at line 56 of file fixed.h.

References FIXED_RESOLUTION, and m_nVal.

fixed::fixed ( const char *  nVal  ) 

Definition at line 77 of file fixed.cpp.

References DIALOG_ASSERT, FIXED_RESOLUTION, S3D::formatStringBuffer(), Logger::log(), m_nVal, and LangStringUtil::strlen().

fixed::~fixed (  )  [inline]

Definition at line 63 of file fixed.h.


Member Function Documentation

fixed fixed::operator++ (  )  [inline]

Definition at line 67 of file fixed.h.

References FIXED_RESOLUTION, and m_nVal.

fixed fixed::operator-- (  )  [inline]

Definition at line 73 of file fixed.h.

References FIXED_RESOLUTION, and m_nVal.

fixed fixed::operator- (  )  [inline]

Definition at line 79 of file fixed.h.

References fixed().

fixed& fixed::operator= ( fixed  fixedVal  )  [inline]

Definition at line 84 of file fixed.h.

References m_nVal.

bool fixed::operator== ( fixed  fixedVal  )  [inline]

Definition at line 90 of file fixed.h.

References m_nVal.

bool fixed::operator!= ( fixed  fixedVal  )  [inline]

Definition at line 95 of file fixed.h.

References m_nVal.

bool fixed::operator< ( fixed  fixedVal  )  [inline]

Definition at line 100 of file fixed.h.

References m_nVal.

bool fixed::operator<= ( fixed  fixedVal  )  [inline]

Definition at line 105 of file fixed.h.

References m_nVal.

bool fixed::operator> ( fixed  fixedVal  )  [inline]

Definition at line 110 of file fixed.h.

References m_nVal.

bool fixed::operator>= ( fixed  fixedVal  )  [inline]

Definition at line 115 of file fixed.h.

References m_nVal.

const char * fixed::asString (  ) 

Definition at line 120 of file fixed.cpp.

References DIALOG_ASSERT, m_nVal, snprintf, and LangStringUtil::strlen().

Referenced by fixed_lua_number2str(), g_write(), OptionEntryFixed::getDefaultValueAsString(), OptionEntryFixed::getValueAsString(), NumberParser::setExpression(), and XMLNode::XMLNode().

float fixed::asFloat (  )  [inline]

Definition at line 122 of file fixed.h.

References FIXED_RESOLUTION_FLOAT, and m_nVal.

Referenced by ImageModifier::addHeightToBitmap(), ImageModifier::addLightMapToBitmap(), ImageModifier::addWaterToBitmap(), FixedVector4::asVector(), FixedVector::asVector(), FixedVector4::asVector4(), TankDamage::calculateDamage(), TargetDefinition::createTarget(), DeformTextures::deformLandscape(), Lightning::draw(), Laser::draw(), NapalmRenderer::draw(), LandscapePoints::draw(), SpeedChange::draw(), GLWWeaponModel::draw(), GLWTankTracker::draw(), GLWTankSlider::draw(), GLWTankModel::draw(), GLWScorchedInfo::draw(), TargetRendererImplTank::drawLife(), GLWWindView::drawScene(), SkyRoof::drawSegment(), TargetRendererImpl::drawShield(), TargetRendererImplTank::drawSight(), ImageModifier::findIntersection(), Water2Renderer::generate(), Water2::generate(), Water::generate(), generateTargetTip(), TankPosition::getElevationString(), FixedVector4::getOpenGLRotationMatrix(), TankPosition::getPowerString(), TankPosition::getRotationString(), TargetRendererImpl::getTargetSize(), ShotProjectile::init(), Explosion::init(), TankKeyboardControlUtil::leftRightHUD(), ActionController::logActions(), TankAICurrentMove::lowestHighest(), TankAICurrentMove::makeGroupShot(), SkyRoof::makeList(), TankAICurrentMove::makeMoveShot(), TargetCamera::moveCamera(), ParticleEngine::normalizedSimulate(), TankAICurrentMove::playMove(), TankHealthTip::populate(), TankShieldTip::populate(), TankKeyboardControlUtil::powerHUD(), ImageModifier::removeWaterFromBitmap(), TargetRendererImplTarget::render(), TargetRendererImplTank::render(), TargetRendererImplTank::renderShadow(), ShotState::run(), HeightMap::setHeight(), SpeedChange::setSpeed(), Action::simulate(), SoundAction::simulate(), ShotProjectile::simulate(), Napalm::simulate(), Explosion::simulate(), TargetRendererImplTank::simulate(), RenderTargets::Renderer3D::simulate(), MissileActionRenderer::simulate(), SkyDome::simulate(), Napalm::simulateAddEdge(), TankMovement::simulationMove(), TankKeyboardControlUtil::upDownHUD(), WeaponGivePower::weaponCallback(), and WeaponGiveLife::weaponCallback().

int fixed::asInt (  )  [inline]

Definition at line 127 of file fixed.h.

References FIXED_RESOLUTION, and m_nVal.

Referenced by TankDamage::calculateDamage(), TargetDefinition::createTarget(), DeformLandscape::deformLandscapeInternal(), fixed_lua_number2int(), DeformLandscape::flattenAreaInternal(), HeightMapModifier::generateTerrain(), TargetSpace::getCollisionSet(), NumberParser::getInt(), HeightMap::getInterpHeight(), HeightMap::getInterpNormal(), LUAUtil::getIntFromTable(), PlacementTypeTree::getPositions(), PlacementTypeMask::getPositions(), TankState::getStateString(), NumberParser::getUInt(), NumberParser::getValue(), HeightMapModifier::noise(), ExplosionParams::parseLUA(), PlacementTankPosition::placeTank(), VisibilityPatchGrid::recalculateErrors(), s3d_get_height(), and tankTargetCloseness().

int fixed::getInternal (  )  [inline]

Definition at line 132 of file fixed.h.

References m_nVal.

Referenced by ActionController::addAction(), LUAScript::addNumberParameter(), TankDamage::calculateDamage(), DeformLandscape::deformLandscape(), fixed_lua_str2number(), fixed_luai_numdiv(), fixed_luai_nummod(), fixed_luai_nummul(), fixed_luai_numpow(), DeformLandscape::flattenArea(), TankDamage::getActionDetails(), TargetSpace::getCollisionSet(), FixedVector::Magnitude(), math_abs(), math_acos(), math_ceil(), math_cos(), math_exp(), math_floor(), math_log(), math_log10(), math_pow(), math_sin(), math_sqrt(), math_tan(), read_number(), ComsSyncCheckMessage::readMessage(), s3d_get_height(), s3d_random(), LUAScript::setGlobal(), ShotState::setup(), and ActionController::stepActions().

int* fixed::getInternalData (  )  [inline]

Definition at line 137 of file fixed.h.

References m_nVal.

fixed fixed::floor (  )  [inline]

Definition at line 142 of file fixed.h.

References fixed(), FIXED_RESOLUTION, and m_nVal.

Referenced by floorx(), HeightMap::getInterpHeight(), HeightMap::getInterpNormal(), and math_floor().

fixed fixed::ceil (  )  [inline]

Definition at line 147 of file fixed.h.

References fixed(), FIXED_RESOLUTION, and m_nVal.

Referenced by ceilx(), and math_ceil().

fixed fixed::operator+ ( fixed  b  )  [inline]

Definition at line 152 of file fixed.h.

References m_nVal.

fixed fixed::operator- ( fixed  b  )  [inline]

Definition at line 159 of file fixed.h.

References m_nVal.

fixed fixed::operator * ( fixed  b  ) 

Definition at line 169 of file fixed.cpp.

References fixed(), fixed_internal_mult(), and m_nVal.

fixed fixed::operator/ ( fixed  b  ) 

Definition at line 174 of file fixed.cpp.

References fixed(), fixed_internal_div(), and m_nVal.

fixed fixed::sqrt (  ) 

Definition at line 304 of file fixed.cpp.

References fixed(), iSqrt(), and m_nVal.

Referenced by HeightMapModifier::addCirclePeak(), math_sqrt(), FixedVector4::Normalize(), FixedVector4::setQuatFromAxisAndAngle(), and sqrtx().

fixed fixed::pow ( fixed  fixedPower  ) 

Definition at line 316 of file fixed.cpp.

References ipow().

Referenced by fixed_luai_numpow(), math_pow(), and powx().

fixed fixed::log10 (  ) 

Definition at line 336 of file fixed.cpp.

References ilog10().

Referenced by log10x(), and math_log10().

fixed fixed::log (  ) 

Definition at line 346 of file fixed.cpp.

References iLog2().

Referenced by logx(), and math_log().

fixed fixed::exp (  ) 

Definition at line 326 of file fixed.cpp.

References iExp2().

Referenced by expx(), and math_exp().

fixed fixed::cos (  ) 

Definition at line 449 of file fixed.cpp.

References _sinx(), _X2PI, _XPIO2, fixed(), m_nVal, X2PI, XPI, and XPIO2.

Referenced by cosx(), TankLib::getGunPosition(), math_cos(), FixedVector4::setQuatFromAxisAndAngle(), and tan().

fixed fixed::sin (  ) 

Definition at line 410 of file fixed.cpp.

References _sinx(), _X2PI, fixed(), m_nVal, X2PI, XPI, and XPIO2.

Referenced by DeformLandscape::deformLandscapeInternal(), TankLib::getGunPosition(), math_sin(), FixedVector4::setQuatFromAxisAndAngle(), sinx(), and tan().

fixed fixed::tan (  ) 

Definition at line 483 of file fixed.cpp.

References cos(), and sin().

Referenced by math_tan(), and tanx().

fixed fixed::acos (  ) 

Definition at line 444 of file fixed.cpp.

References fixed().

Referenced by math_acos().

fixed fixed::abs (  )  [inline]

Definition at line 178 of file fixed.h.

References fixed(), and m_nVal.

Referenced by PlacementType::checkCloseness(), Boid2::checkGrouping(), and math_abs().

fixed fixed::operator% ( fixed  fixedVal  )  [inline]

Definition at line 184 of file fixed.h.

References m_nVal.

fixed fixed::operator *= ( fixed  val  ) 

Definition at line 179 of file fixed.cpp.

References fixed_internal_mult(), and m_nVal.

fixed fixed::operator/= ( fixed  val  ) 

Definition at line 185 of file fixed.cpp.

References fixed_internal_div(), and m_nVal.

fixed fixed::operator-= ( fixed  val  )  [inline]

Definition at line 194 of file fixed.h.

References m_nVal.

fixed fixed::operator+= ( fixed  val  )  [inline]

Definition at line 200 of file fixed.h.

References m_nVal.

fixed fixed::fromFloat ( float  flt  )  [static]

Definition at line 493 of file fixed.cpp.

References FIXED_RESOLUTION_FLOAT, int(), and m_nVal.

Referenced by ImageModifier::addHeightToBitmap(), ImageModifier::addLightMapToBitmap(), ImageModifier::addWaterToBitmap(), TankKeyboardControlUtil::autoAim(), GLWTankTracker::currentChanged(), GLWTankSlider::currentChanged(), FixedVector::fromVector(), TankAISniperGuesser::guess(), TankAIAimGuesser::guess(), TankAICurrentMove::inHole(), Napalm::init(), TankAICurrentMove::lowestHighest(), TankAICurrentMove::makeMoveShot(), GLWPlanView::mouseDown(), TankKeyboardControlUtil::moveLeftRight(), TankKeyboardControlUtil::movePower(), TankKeyboardControlUtil::moveUpDown(), TankAIAimGuesser::refineShot(), ImageModifier::removeWaterFromBitmap(), InfoMap::showHeightBands(), ActionController::simulate(), and MainCamera::simulate().


Member Data Documentation

int fixed::m_nVal [private]

Definition at line 34 of file fixed.h.

Referenced by abs(), asFloat(), asInt(), asString(), ceil(), cos(), fixed(), floor(), fromFloat(), getInternal(), getInternalData(), operator *(), operator *=(), operator!=(), operator%(), operator+(), operator++(), operator+=(), operator-(), operator--(), operator-=(), operator/(), operator/=(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), sin(), and sqrt().

fixed fixed::MAX_FIXED [static]

Definition at line 206 of file fixed.h.

Referenced by Napalm::getHeight(), RoofMaps::getInterpRoofHeight(), LandscapeConditionRandom::getNextEventTime(), LandscapeConditionTime::getNextEventTime(), LandscapeConditionGroupSize::getNextEventTime(), RoofMaps::getRoofHeight(), and HeightMapModifier::waterErrosion().

fixed fixed::XPI = fixed(true,_XPI) [static]

Definition at line 207 of file fixed.h.

Referenced by HeightMapModifier::addCirclePeak(), cos(), WeaponRedirect::fireWeapon(), TargetMovementEntryShips::generate(), TankLib::getGunPosition(), TankLib::getShotTowardsPosition(), TankLib::getSniperShotTowardsPosition(), TankLib::getVelocityVector(), TankMovement::init(), OptionsTransient::newGameWind(), OptionsTransient::nextRoundWind(), TankAIAimGuesser::refineShot(), TargetLife::setRotation(), TargetLife::setTargetPositionAndRotation(), TargetMovementEntrySpline::simulate(), TargetMovementEntryShips::simulate(), sin(), and Boid2::update().

fixed fixed::X2PI = fixed(true,_X2PI) [static]

Definition at line 208 of file fixed.h.

Referenced by cos(), and sin().

fixed fixed::XPIO2 = fixed(true,_XPIO2) [static]

Definition at line 209 of file fixed.h.

Referenced by cos(), DeformLandscape::deformLandscapeInternal(), and sin().


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