src/defs.h File Reference

#include "aa_config.h"
#include <math.h>
#include <iosfwd>
#include <string.h>
#include <memory>
#include <typeinfo>
#include <cstdlib>
#include <iostream>

Include dependency graph for defs.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define MAX_VIEWERS   4
#define M_PI   3.14159f

Typedefs

typedef float REAL
typedef void AA_VOIDFUNC ()
typedef void INTFUNC (int)
typedef bool BOOLRETFUNC ()
typedef AA_VOIDFUNCFUNCPTR
typedef INTFUNCINTFUNCPTR

Functions

template<class T>
void Swap (T &a, T &b)
REAL sinf (REAL angle) throw ()
REAL cosf (REAL angle) throw ()
REAL tanf (REAL angle) throw ()
REAL atan2f (REAL y, REAL x) throw ()
REAL sqrtf (REAL x) throw ()
REAL logf (REAL x) throw ()
REAL expf (REAL x) throw ()
REAL fabsf (REAL x) throw ()
REAL floorf (REAL x) throw ()
bool isblank (int x)
double pow10 (double y) throw ()
float pow10f (float y) throw ()

Variables

const REAL EPS = REAL(1E-7)


Define Documentation

#define M_PI   3.14159f

Definition at line 61 of file defs.h.

Referenced by angledifff(), cWidget::Map::ClipperCircle::Begin(), eAxis::ComputeWinding(), PDDisc::Generate(), PDCone::Generate(), PDCylinder::Generate(), gParser::myxmlGetDirection(), rViewport::Perspective(), cWidget::WithAngles::Process(), zShapePolygon::render(), gCycle::Render(), zShapePolygon::render2d(), zShapeCircle::render2d(), robust_acos(), eChannel::Set3d(), and rViewport::UpDownFOV().

#define MAX_VIEWERS   4

Definition at line 57 of file defs.h.

Referenced by eSoundPlayer::End(), eSoundPlayer::eSoundPlayer(), eWall::eWall(), gNetPlayerWall::MyInitAfterCreation(), eSoundPlayer::Reset(), and eWall::~eWall().


Typedef Documentation

typedef void AA_VOIDFUNC()

Definition at line 72 of file defs.h.

typedef bool BOOLRETFUNC()

Definition at line 74 of file defs.h.

typedef AA_VOIDFUNC* FUNCPTR

Definition at line 76 of file defs.h.

typedef void INTFUNC(int)

Definition at line 73 of file defs.h.

typedef INTFUNC* INTFUNCPTR

Definition at line 77 of file defs.h.

typedef float REAL

Definition at line 64 of file defs.h.


Function Documentation

REAL atan2f ( REAL  y,
REAL  x 
) throw () [inline]

Definition at line 93 of file defs.h.

References REAL, and x.

00093 { return REAL(atan2( y, x )); }

REAL cosf ( REAL  angle  )  throw () [inline]

Definition at line 85 of file defs.h.

References cos(), and REAL.

Referenced by eAxis::ComputeWinding(), PDDisc::Generate(), PDCone::Generate(), PDCylinder::Generate(), zShapePolygon::isInside(), and gParser::myxmlGetDirection().

00085 { return REAL(cos( angle )); }

Here is the call graph for this function:

Here is the caller graph for this function:

REAL expf ( REAL  x  )  throw () [inline]

Definition at line 105 of file defs.h.

References exp(), REAL, and x.

Referenced by pNRandf(), and PDBlob::Within().

00105 { return REAL(exp( x )); }

Here is the call graph for this function:

Here is the caller graph for this function:

REAL fabsf ( REAL  x  )  throw () [inline]

Definition at line 109 of file defs.h.

References REAL, and x.

Referenced by angledifff(), nServerInfo::CalcScore(), gCycleChatBot::Distance(), gAISensor::gAISensor(), PDCone::PDCone(), PDCylinder::PDCylinder(), and PDDisc::PDDisc().

00109 { return REAL(fabs( x )); }

Here is the caller graph for this function:

REAL floorf ( REAL  x  )  throw () [inline]

Definition at line 113 of file defs.h.

References REAL, and x.

Referenced by tRandomizer::Get(), and remf().

00113 { return REAL(floor( x )); }

Here is the caller graph for this function:

bool isblank ( int  x  )  [inline]

Definition at line 118 of file defs.h.

Referenced by tConfItemBase::EatWhitespace(), IsLegalPlayerName(), tString::LTrim(), operator>>(), tString::ReadLine(), s_Veto(), se_IsBlank(), se_IsInvalidNameEnd(), se_OptionalNameFilters(), rTextField::StringOutput(), tString::StripWhitespace(), tIsInList(), uJoystick::uJoystick(), and uKeyInput::uKeyInput().

00118 { return ((x == ' ') || (x == '\t')); }

Here is the caller graph for this function:

REAL logf ( REAL  x  )  throw () [inline]

Definition at line 101 of file defs.h.

References log(), REAL, and x.

Referenced by pNRandf().

00101 { return REAL(log( x )); }

Here is the call graph for this function:

Here is the caller graph for this function:

double pow10 ( double  y  )  throw () [inline]

Definition at line 132 of file defs.h.

Referenced by Puiss10().

00132 { return pow(10.0, y); }

Here is the caller graph for this function:

float pow10f ( float  y  )  throw () [inline]

Definition at line 136 of file defs.h.

00136 { return powf(10.0, y); }

REAL sinf ( REAL  angle  )  throw () [inline]

Definition at line 81 of file defs.h.

References REAL, and sin().

Referenced by eAxis::ComputeWinding(), PDDisc::Generate(), PDCone::Generate(), PDCylinder::Generate(), zShapePolygon::isInside(), and gParser::myxmlGetDirection().

00081 { return REAL(sin( angle )); }

Here is the call graph for this function:

Here is the caller graph for this function:

REAL sqrtf ( REAL  x  )  throw () [inline]

Definition at line 97 of file defs.h.

References REAL, sqrt(), and x.

Referenced by PAAvoid::Exec(), exponent(), pVec::length(), pVec::normalize(), PDCone::PDCone(), PDCylinder::PDCylinder(), sn_GetTimeout(), and gCycleMovement::TimestepCore().

00097 { return REAL(sqrt( x )); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
void Swap ( T &  a,
T &  b 
) [inline]

Definition at line 67 of file defs.h.

References c.

Referenced by gPlayerWall::Flip(), gWallRim_helper(), gNetPlayerWall::RenderList(), gWallRim::RenderReal(), tMemManager::SwapIf(), and tHeapBase::SwapIf().

00067                                       {
00068     T c=a;
00069     a=b;
00070     b=c;
00071 }

Here is the caller graph for this function:

REAL tanf ( REAL  angle  )  throw () [inline]

Definition at line 89 of file defs.h.

References REAL, and tan().

00089 { return REAL(tan( angle )); }

Here is the call graph for this function:


Variable Documentation

const REAL EPS = REAL(1E-7)

Definition at line 65 of file defs.h.

Referenced by gCycleChatBot::Activate(), gAIPlayer::ActOnData(), gHitData::AddHit(), gCycleMovement::ApplyAcceleration(), tRecorderSync< DATA >::Archive(), eTimer::AverageFPS(), gPlayerWall::Check(), eFace::Create(), gCycleMovement::DistanceToDestination(), gCycle::DoTurn(), eGrid::DrawLine(), gCycleExtrapolator::EdgeIsDangerous(), gCycle::gCycle(), gCycleMovement::GetMaxSpaceAhead(), tCoord::GrahamScan(), eFace::Insideness(), eHalfEdge::IntersectWithCareless(), eFace::IsInside(), gArena::LeastDangerousSpawnPoint(), eCameraSensor::LookAround(), eGameObject::Move(), gCycle::OnNotifyNewDestination(), tCoord::GrahamComparator::operator()(), tCoord::operator==(), gCycle::PassEdge(), eTimer::ReadSync(), gNetPlayerWall::RealWallReceived(), gWallRim::RenderReal(), nServerLag::Report(), eTimer::Reset(), eChannel::Set3d(), eWall::SetVisHeight(), sg_Gap(), eAxis::SnapWinding(), gCycle::SyncEnemy(), nServerLag::TakeCredit(), gCycleMovement::Timestep(), gAIPlayer::Timestep(), gCycleMovement::TimestepCore(), and gCycle::TimestepCore().


Generated on Sat Mar 15 22:56:33 2008 for Armagetron Advanced by  doxygen 1.5.4