Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Utility.h File Reference

Header for miscellaneous utility functions. More...

#include "FlyLegacy.h"

Go to the source code of this file.

Classes

struct  SCIE
class  CImageTIFF
class  CMaskImage
class  CRawImage
class  CSunRawImage
class  CModelBIN
class  CModelSMF
class  CModelACM
class  CDataLookup
class  CDataMap

Defines

#define MILES_PER_NM   (1.151)
#define KM_PER_NM   (1.852)
#define METRES_PER_FOOT   (0.3048)
#define FEET_PER_NM   (6076.0)
#define PI   (3.1415926)
#define DEG2RAD   (PI / 180.0)
#define RAD2DEG   (180.0 / PI)
#define FEET_PER_MILE   (5280.0)
#define FEET_PER_METRE   (3.2808399)
#define POLAR_CIRCUMFERENCE   (double)(1.3104211E+08)
#define FEET_PER_LAT_ARCSEC   (double)(1.0111274E+02)
#define EQUATORIAL_CIRCUMFERENCE   (double)(1.3147339E+08)
#define MEAN_CIRCUMFERENCE   (FEET_PER_NM * 21600)

Functions

SPosition GeocToGeod (SPosition)
SPosition GeodToGeoc (SPosition)
SVector GeocToCartesian (SPosition)
SPosition CartesianToGeoc (SVector)
SVector GeodToCartesian (SPosition)
SPosition CartesianToGeod (SVector)
void test_geodesy (void)
float GreatCircleDistance (SPosition *from, SPosition *to)
SPosition GreatCirclePosition (SPosition *from, SVector *polar)
SVector GreatCirclePolar (SPosition *from, SPosition *to)
SVector VectorSum (SVector v1, SVector v2)
SVector VectorDifference (SVector v1, SVector v2)
double WrapTwoPi (double rad)
double WrapPi (double rad)
double Wrap360 (double deg)
int Wrap360 (int deg)
double Wrap180 (double deg)
float Wrap24 (float hrs)
float Wrap60 (float min)
double FeetPerLonArcsec (double lat)
SPosition AddVector (SPosition &from, SVector &v)
SPosition SubtractVector (SPosition &from, SVector &v)
SVector SubtractPosition (SPosition &from, SPosition &to)
float NmToMi (float nm)
float MiToNm (float mi)
float FeetToNm (float feet)
float NmToFeet (float nm)
float FpsToKt (float fps)
double FeetToMetres (double ft)
double MetresToFeet (double m)
float KmToNm (float km)
float NmToKm (float nm)
float RadToDeg (float rad)
double RadToDeg (double rad)
float DegToRad (float deg)
double DegToRad (double deg)
char * TagString (char *s, Tag tag)
Tag StringToTag (const char *s)
void TagToString (char *s, Tag tag)
void FormatPosition (SPosition pos, char *s)
void FormatRADec (double ra, double dec, char *s)
void FormatSiderealTime (double st, char *s)
void TrimTrailingWhitespace (char *s)
EMessageResult SendMessage (SMessage *msg)
void CIE_Yxy_to_XYZ (SCIE in, SCIE &out)
void CIE_XYZ_to_RGB_D65 (SCIE XYZ, sgdVec3 &RGB)
void init_globe_tile_table ()
 Initialize globe tile latitude lookup table.
void lat_lon_to_qgt (double latArg, double lonArg, int &x, int &z)
 Convert lat/lon into quarter globe tile indices.
void lat_lon_to_globe_tile (double latArg, double lonArg, int &x, int &z)
 Convert lat/lon into globe tile indices.
void qgt_lon_bounds (int x, double &w, double &e)
 Find longitude bounds for a given QGT x-index.
void qgt_lat_bounds (int z, double &s, double &n)
 Find latitude bounds for a given QGT z-index.
void globe_tile_lon_bounds (int x, double &w, double &e)
 Find longitude bounds for a given GT x-index.
void globe_tile_lat_bounds (int z, double &s, double &n)
 Find latitude bounds for a given GT x-index.
void qgt_position (SPosition pos, int &qx, int &qz, double &x, double &z)
 Calculate distance between a position and the center of a given QGT, in QGT units.
void delta_qgt (SPosition pos, int rx, int rz, double &x, double &z)
float TerrainScale (SPosition pos)
float GlobeTileDistance (void)
SVector PosToFlatCartesian (SPosition pos, int gx, int gz)
SVector PosToFlatCartesian (SPosition pos)
SVector PosToScaledFlatCartesian (SPosition pos)
SVector PosToFlatCartesianQgt (SPosition pos, int x, int z)
 Find unscaled cartesian coordinate of world position relative to the given QGT.
SVector PosToFlatCartesianQgt (SPosition pos)
 Find cartesian coordinate of world position relative to the QGT it is in.
SVector PosToScaledFlatCartesianQgt (SPosition pos)
 Find scaled cartesian coordinate of world position relative to the QGT it is in.
SSurfaceCreateSurface (int width, int height)
void FreeSurface (SSurface *surface)
void EraseSurface (SSurface *surface)
void EraseSurfaceRGB (SSurface *surface, unsigned int rgb)
void EraseSurfaceRGBA (SSurface *surface, unsigned int rgba)
void DrawDot (SSurface *surface, int x, int y, unsigned int rgbColor)
void DrawLine (SSurface *surface, int x1, int y1, int x2, int y2, unsigned int rgbColor)
void DrawRect (SSurface *surface, int x1, int y1, int x2, int y2, unsigned int rgbColor)
void FillRect (SSurface *surface, int x1, int y1, int x2, int y2, unsigned int rgbColor)
void DrawCircle (SSurface *surface, int xCenter, int yCenter, int radius, unsigned int rgbColor)
unsigned int MakeRGB (unsigned int r, unsigned int g, unsigned int b)
unsigned int MakeRGBA (unsigned int r, unsigned int g, unsigned int b, unsigned int a)
void UnmakeRGB (unsigned int rgb, unsigned int *r, unsigned int *g, unsigned int *b)
void Blit (SSurface *surface)
void BlitTransparent (SSurface *surface, unsigned int rgbTransparentColor)
GLuint TextureFromSurface (SSurface *s, bool mipmap)
int LoadBitmap (SBitmap *bm)
void DrawBitmap (SSurface *surface, SBitmap *bm, int x, int y, int frame)
void DrawBitmapPartial (SSurface *surface, SBitmap *bm, int dx, int dy, int sx1, int sy1, int sx2, int sy2, int frame)
void GetBitmapSize (SBitmap *bm, int *xSize, int *ySize)
int NumBitmapFrames (SBitmap *bm)
void FreeBitmap (SBitmap *bm)
int LoadFont (SFont *font)
void FreeFont (SFont *font)
void DrawChar (SSurface *surface, SFont *font, int x, int y, unsigned int rgbColour, char ascii)
void DrawText (SSurface *surface, SFont *font, int x, int y, unsigned int rgbColour, const char *text)
void DrawTextC (SSurface *surface, SFont *font, int x, int y, unsigned int rgbColour, const char *text)
void DrawTextR (SSurface *surface, SFont *font, int x, int y, unsigned int rgbColour, const char *text)
int TextHeight (SFont *font, const char *text)
int TextWidth (SFont *font, const char *text)
int CharHeight (SFont *font, char c)
int CharWidth (SFont *font, char c)
int MaxCharHeight (SFont *font)
int MaxCharWidth (SFont *font)


Detailed Description

Definition in file Utility.h.


Define Documentation

#define DEG2RAD   (PI / 180.0)
 

Definition at line 42 of file Utility.h.

#define EQUATORIAL_CIRCUMFERENCE   (double)(1.3147339E+08)
 

Definition at line 52 of file Utility.h.

#define FEET_PER_LAT_ARCSEC   (double)(1.0111274E+02)
 

Definition at line 49 of file Utility.h.

Referenced by AddVector(), and SubtractPosition().

#define FEET_PER_METRE   (3.2808399)
 

Definition at line 45 of file Utility.h.

Referenced by CElevationBlockBT::Load().

#define FEET_PER_MILE   (5280.0)
 

Definition at line 44 of file Utility.h.

Referenced by CTerrainManager::UpdateMaxVisibility().

#define FEET_PER_NM   (6076.0)
 

Definition at line 40 of file Utility.h.

Referenced by FeetToNm(), and NmToFeet().

#define KM_PER_NM   (1.852)
 

Definition at line 38 of file Utility.h.

Referenced by KmToNm(), and NmToKm().

#define MEAN_CIRCUMFERENCE   (FEET_PER_NM * 21600)
 

Definition at line 55 of file Utility.h.

Referenced by FeetPerLonArcsec().

#define METRES_PER_FOOT   (0.3048)
 

Definition at line 39 of file Utility.h.

Referenced by FeetToMetres(), and MetresToFeet().

#define MILES_PER_NM   (1.151)
 

Definition at line 37 of file Utility.h.

Referenced by MiToNm(), and NmToMi().

#define PI   (3.1415926)
 

Definition at line 41 of file Utility.h.

Referenced by CartesianToGeoc(), CSkyManager::CSkyManager(), DegToRad(), CCameraOverhead::GetCameraOrientation(), CCameraTower::GetCameraOrientation(), CCameraFlyby::GetCameraOrientation(), CCameraObserver::PanDown(), CCameraSpot::PanDown(), CCameraObserver::PanUp(), CCameraSpot::PanUp(), and RadToDeg().

#define POLAR_CIRCUMFERENCE   (double)(1.3104211E+08)
 

Definition at line 48 of file Utility.h.

#define RAD2DEG   (180.0 / PI)
 

Definition at line 43 of file Utility.h.


Function Documentation

SPosition AddVector SPosition from,
SVector v
 

Definition at line 195 of file Math.cpp.

References SPosition::alt, FEET_PER_LAT_ARCSEC, FeetPerLonArcsec(), SPosition::lat, SPosition::lon, WrapArcsec(), SVector::x, SVector::y, and SVector::z.

Referenced by SubtractVector(), and CCamera::UpdateCamera().

void Blit SSurface surface  ) 
 

Definition at line 320 of file Bitmaps.cpp.

References SSurface::drawBuffer, SSurface::xSize, and SSurface::ySize.

Referenced by CGaugeKnob::Draw(), and Draw2D().

void BlitTransparent SSurface surface,
unsigned int  rgbTransparentColor
 

Definition at line 337 of file Bitmaps.cpp.

References SSurface::drawBuffer, SSurface::xSize, and SSurface::ySize.

Referenced by BlitSurface(), and CPanel::Draw().

SPosition CartesianToGeoc SVector   ) 
 

Definition at line 236 of file Geodesy.cpp.

References SPosition::alt, SPosition::lat, SPosition::lon, PI, SVector::x, SVector::y, and SVector::z.

Referenced by test_geodesy().

SPosition CartesianToGeod SVector   ) 
 

int CharHeight SFont font,
char  c
 

Definition at line 635 of file Fonts.cpp.

References CBitmappedFont::CharHeight(), and SFont::font.

int CharWidth SFont font,
char  c
 

Definition at line 652 of file Fonts.cpp.

References CBitmappedFont::CharWidth(), and SFont::font.

void CIE_XYZ_to_RGB_D65 SCIE  XYZ,
sgdVec3 &  RGB
 

Definition at line 498 of file Scenery.cpp.

References SCIE::XYZ.

void CIE_Yxy_to_XYZ SCIE  in,
SCIE out
 

Definition at line 487 of file Scenery.cpp.

References SCIE::XYZ, and SCIE::Yxy.

SSurface* CreateSurface int  width,
int  height
 

Definition at line 55 of file Bitmaps.cpp.

References SSurface::drawBuffer, SSurface::xScreen, SSurface::xSize, SSurface::xSpan, SSurface::yScreen, and SSurface::ySize.

Referenced by CPanel::Activate(), CDefaultSuperTile::CDefaultSuperTile(), CQuarterGlobeTile::Create(), CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), InitExitScreen(), InitLoadingScreen(), InitSplashScreen(), CFuiComponent::MakeSurface(), CNavigationGauge::ReadFinished(), CGauge::ReadFinished(), CGaugeKnob::ReadFinished(), and CFuiComponent::SetSize().

double DegToRad double  deg  ) 
 

Definition at line 323 of file Math.cpp.

References PI.

float DegToRad float  deg  ) 
 

Definition at line 318 of file Math.cpp.

Referenced by calc_zenith_azimuth_angles(), CCameraObserver::CCameraObserver(), CCameraSpot::CCameraSpot(), FeetPerLonArcsec(), init_globe_tile_table(), KeySlewBankLeft(), KeySlewBankRight(), KeySlewPitchDown(), KeySlewPitchUp(), KeySlewRotateLeft(), KeySlewRotateLeft45(), KeySlewRotateRight(), KeySlewRotateRight45(), CStarImages::LoadBSCDatabase(), CStarImages::LoadFlyDatabase(), CCameraObserver::PanDown(), CCameraSpot::PanDown(), CCameraObserver::PanLeft(), CCameraSpot::PanLeft(), CCameraObserver::PanRight(), CCameraSpot::PanRight(), CCameraObserver::PanUp(), CCameraSpot::PanUp(), CCameraCockpit::Read(), CSkyDomeImage::Repaint(), and TerrainScale().

void delta_qgt SPosition  pos,
int  rx,
int  rz,
double &  x,
double &  z
 

Definition at line 191 of file Scenery.cpp.

References qgt_position().

Referenced by CQuarterGlobeTile::UpdatePosition().

void DrawBitmap SSurface surface,
SBitmap bm,
int  x,
int  y,
int  frame
 

Definition at line 797 of file Bitmaps.cpp.

References SBitmap::bitmap, gtfo, SBitmap::type, TYPE_FRAMES, and TYPE_SINGLE.

Referenced by CPanel::Activate(), CFuiList::Draw(), CFuiGroupBox::Draw(), CFuiSlider::Draw(), CFuiTextField::Draw(), CFuiRadioButton::Draw(), CFuiCheckbox::Draw(), CBasicMagnetoSwitch::Draw(), CBasicBatterySwitch::Draw(), CSimpleInOutStateSwitch::Draw(), CSimpleSwitch::Draw(), CNavigationGauge::Draw(), CVerticalSpeedGauge::Draw(), CGaugeKnob::Draw(), CGaugeClickArea::Draw(), CGaugeNeedle::Draw(), CFuiPicture::DrawNoTiling(), CBitmapGauge::DrawOverlay(), CFuiPicture::DrawTiledBitmap(), CBitmapGauge::DrawUnderlay(), InitExitScreen(), InitLoadingScreen(), and InitSplashScreen().

void DrawBitmapPartial SSurface surface,
SBitmap bm,
int  dx,
int  dy,
int  sx1,
int  sy1,
int  sx2,
int  sy2,
int  frame
 

Definition at line 818 of file Bitmaps.cpp.

References SBitmap::bitmap, gtfo, SBitmap::type, TYPE_FRAMES, and TYPE_SINGLE.

Referenced by InitLoadingScreen().

void DrawChar SSurface surface,
SFont font,
int  x,
int  y,
unsigned int  rgbColour,
char  ascii
 

Definition at line 522 of file Fonts.cpp.

References CBitmappedFontChar::Draw(), SFont::font, and CBitmappedFont::GetAscii().

Referenced by CBKADFKR87Gauge::Draw().

void DrawCircle SSurface surface,
int  xCenter,
int  yCenter,
int  radius,
unsigned int  rgbColor
 

Definition at line 298 of file Bitmaps.cpp.

void DrawDot SSurface surface,
int  x,
int  y,
unsigned int  rgbColor
 

Definition at line 140 of file Bitmaps.cpp.

References SSurface::drawBuffer, SSurface::xSize, SSurface::xSpan, and SSurface::ySize.

Referenced by CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), CBitmappedFontChar::Draw(), CFuiGraphTrace::Draw(), and DrawLine().

void DrawLine SSurface surface,
int  x1,
int  y1,
int  x2,
int  y2,
unsigned int  rgbColor
 

Definition at line 161 of file Bitmaps.cpp.

References DrawDot(), and DrawLine().

Referenced by CDefaultSuperTile::CDefaultSuperTile(), CQuarterGlobeTile::Create(), CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), CFuiGraphTrace::Draw(), CFuiLine::Draw(), DrawLine(), DrawRect(), and FillRect().

void DrawRect SSurface surface,
int  x1,
int  y1,
int  x2,
int  y2,
unsigned int  rgbColor
 

Definition at line 273 of file Bitmaps.cpp.

References DrawLine().

void DrawText SSurface surface,
SFont font,
int  x,
int  y,
unsigned int  rgbColour,
const char *  text
 

Definition at line 540 of file Fonts.cpp.

References CBitmappedFontChar::Draw(), SFont::font, CBitmappedFont::GetAscii(), CBitmappedFontChar::GetWidth(), and CBitmappedFont::space.

Referenced by CFuiGroupBox::Draw(), CFuiTextField::Draw(), CFuiLabel::Draw(), CFuiRadioButton::Draw(), CFuiCheckbox::Draw(), CFuiPopupMenu::Draw(), CBKADFKR87Gauge::Draw(), CBKXPDRKT76Gauge::Draw(), CBKNavComKX155Gauge::Draw(), DrawTextC(), and DrawTextR().

void DrawTextC SSurface surface,
SFont font,
int  x,
int  y,
unsigned int  rgbColour,
const char *  text
 

Definition at line 566 of file Fonts.cpp.

References DrawText(), SFont::font, and CBitmappedFont::TextWidth().

Referenced by CDefaultSuperTile::CDefaultSuperTile(), CQuarterGlobeTile::Create(), CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), CFuiLabel::Draw(), CFuiButton::Draw(), CFuiWindowTitle::Draw(), CBKADFKR87Gauge::Draw(), InitExitScreen(), and InitSplashScreen().

void DrawTextR SSurface surface,
SFont font,
int  x,
int  y,
unsigned int  rgbColour,
const char *  text
 

Definition at line 583 of file Fonts.cpp.

References DrawText(), SFont::font, and CBitmappedFont::TextWidth().

Referenced by CFuiLabel::Draw(), CBKADFKR87Gauge::Draw(), and CBKNavComKX155Gauge::Draw().

void EraseSurface SSurface surface  ) 
 

Definition at line 77 of file Bitmaps.cpp.

References EraseSurfaceRGBA().

Referenced by CPanel::Activate(), CGauge::ClearSurface(), CFuiLabel::Draw(), CNavigationGauge::Draw(), CGaugeKnob::Draw(), InitExitScreen(), InitLoadingScreen(), InitSplashScreen(), and CFuiComponent::MakeSurface().

void EraseSurfaceRGB SSurface surface,
unsigned int  rgb
 

Definition at line 82 of file Bitmaps.cpp.

References EraseSurfaceRGBA().

Referenced by CDefaultSuperTile::CDefaultSuperTile(), CQuarterGlobeTile::Create(), CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), and CFuiTextField::Draw().

void EraseSurfaceRGBA SSurface surface,
unsigned int  rgba
 

Definition at line 87 of file Bitmaps.cpp.

References SSurface::drawBuffer, SSurface::xSpan, and SSurface::ySize.

Referenced by EraseSurface(), and EraseSurfaceRGB().

double FeetPerLonArcsec double  lat  ) 
 

Definition at line 178 of file Math.cpp.

References DegToRad(), and MEAN_CIRCUMFERENCE.

Referenced by AddVector(), and SubtractPosition().

double FeetToMetres double  ft  ) 
 

Definition at line 284 of file Math.cpp.

References METRES_PER_FOOT.

Referenced by GeocToGeod(), GeodToGeoc(), GreatCirclePolar(), and GreatCirclePosition().

float FeetToNm float  feet  ) 
 

Definition at line 266 of file Math.cpp.

References FEET_PER_NM.

Referenced by FpsToKt().

void FillRect SSurface surface,
int  x1,
int  y1,
int  x2,
int  y2,
unsigned int  rgbColor
 

Definition at line 285 of file Bitmaps.cpp.

References DrawLine(), and FillRect().

Referenced by FillRect().

void FormatPosition SPosition  pos,
char *  s
 

Definition at line 399 of file Scenery.cpp.

References SPosition::lat, and SPosition::lon.

Referenced by CTerrainTile::FormatBounds(), init_globe_tile_table(), CCameraManager::Print(), and test_geodesy().

void FormatRADec double  ra,
double  dec,
char *  s
 

Definition at line 437 of file Scenery.cpp.

References RadToDeg(), and WrapTwoPi().

Referenced by CSkyManager::Print().

void FormatSiderealTime double  st,
char *  s
 

Definition at line 466 of file Scenery.cpp.

Referenced by CTimeManager::Print().

float FpsToKt float  fps  ) 
 

Definition at line 276 of file Math.cpp.

References FeetToNm().

void FreeBitmap SBitmap bm  ) 
 

Definition at line 878 of file Bitmaps.cpp.

References SBitmap::bitmap, gtfo, SBitmap::type, TYPE_FRAMES, TYPE_INVALID, and TYPE_SINGLE.

Referenced by CleanupExitScreen(), CleanupLoadingScreen(), CleanupSplashScreen(), CPanel::Deactivate(), CFuiThemeWidget::ParseBitmap(), CBitmapGauge::~CBitmapGauge(), CFuiPicture::~CFuiPicture(), CFuiThemeWidget::~CFuiThemeWidget(), CGaugeClickArea::~CGaugeClickArea(), CGaugeKnob::~CGaugeKnob(), CGaugeNeedle::~CGaugeNeedle(), CNavigationGauge::~CNavigationGauge(), CPanel::~CPanel(), CSimpleInOutStateSwitch::~CSimpleInOutStateSwitch(), and CVerticalSpeedGauge::~CVerticalSpeedGauge().

void FreeFont SFont font  ) 
 

Definition at line 514 of file Fonts.cpp.

References SFont::font.

Referenced by cleanup_fonts().

void FreeSurface SSurface surface  ) 
 

Definition at line 69 of file Bitmaps.cpp.

References SSurface::drawBuffer.

Referenced by CDefaultSuperTile::CDefaultSuperTile(), CleanupExitScreen(), CleanupLoadingScreen(), CleanupSplashScreen(), CQuarterGlobeTile::Create(), CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), CPanel::Deactivate(), CFuiComponent::SetSize(), CFuiWindow::~CFuiWindow(), CGaugeKnob::~CGaugeKnob(), and CPanel::~CPanel().

SVector GeocToCartesian SPosition   ) 
 

Definition at line 209 of file Geodesy.cpp.

References SPosition::alt, SPosition::lat, SPosition::lon, SVector::x, SVector::y, and SVector::z.

Referenced by GeodToCartesian(), and test_geodesy().

SPosition GeocToGeod SPosition   ) 
 

Definition at line 104 of file Geodesy.cpp.

References SPosition::alt, ARCSEC_TO_RAD, E, EPS, EQ_RAD_SQUARE_M, EQUATORIAL_RADIUS_M, FeetToMetres(), SPosition::lat, SPosition::lon, MetresToFeet(), ONE_ARCSEC, and PI_2.

Referenced by test_geodesy().

SVector GeodToCartesian SPosition   ) 
 

Definition at line 252 of file Geodesy.cpp.

References GeocToCartesian(), and GeodToGeoc().

Referenced by CSkyManager::Update().

SPosition GeodToGeoc SPosition   ) 
 

Definition at line 169 of file Geodesy.cpp.

References SPosition::alt, ARCSEC_TO_RAD, E, EQ_RAD_SQUARE_M, FeetToMetres(), SPosition::lat, SPosition::lon, and MetresToFeet().

Referenced by GeodToCartesian(), and test_geodesy().

void GetBitmapSize SBitmap bm,
int *  xSize,
int *  ySize
 

Definition at line 840 of file Bitmaps.cpp.

References SBitmap::bitmap, gtfo, SBitmap::type, TYPE_FRAMES, and TYPE_SINGLE.

Referenced by CFuiSlider::Draw(), CFuiRadioButton::Draw(), CFuiCheckbox::Draw(), CGaugeNeedle::Draw(), CFuiPicture::DrawTiledBitmap(), CFuiZoomButton::Fill(), CFuiMinimizeButton::Fill(), CFuiCloseButton::Fill(), CFuiWindowTitle::Fill(), InitExitScreen(), InitLoadingScreen(), InitSplashScreen(), CFuiTextField::ReadFinished(), CFuiPopupMenu::ReadFinished(), CFuiButton::ReadFinished(), CFuiWindow::ReadFinished(), CGaugeNeedle::ReadFinished(), and CFuiPicture::SetBitmap().

void globe_tile_lat_bounds int  z,
double &  s,
double &  n
 

Parameters:
z GT z-index in range [0,255]
&w Updated with western longitude boundary in degrees E of prime meridian
&e Updated with eastern longitude boundary in degrees E of prime meridian

Definition at line 336 of file Scenery.cpp.

References globe_tile_lat_table, and gtfo.

Referenced by CDetailTile::CDetailTile(), CSuperTile::CSuperTile(), init_globe_tile_table(), lat_lon_to_qgt(), PosToFlatCartesian(), and qgt_lat_bounds().

void globe_tile_lon_bounds int  x,
double &  w,
double &  e
 

Parameters:
x GT x-index in range [0,255]
&w Updated with western longitude boundary in degrees E of prime meridian
&e Updated with eastern longitude boundary in degrees E of prime meridian

Definition at line 317 of file Scenery.cpp.

References globe_tile_lon(), and gtfo.

Referenced by CDetailTile::CDetailTile(), CSuperTile::CSuperTile(), lat_lon_to_qgt(), PosToFlatCartesian(), and qgt_lon_bounds().

float GlobeTileDistance void   ) 
 

Definition at line 532 of file Scenery.cpp.

References NmToFeet().

float GreatCircleDistance SPosition from,
SPosition to
 

SVector GreatCirclePolar SPosition from,
SPosition to
 

Definition at line 524 of file Geodesy.cpp.

References SPosition::alt, FeetToMetres(), geo_inverse_wgs_84(), SVector::h, SPosition::lat, SPosition::lon, MetresToFeet(), SVector::p, and SVector::r.

Referenced by CBKKX155Radio::TimeSlice(), and CNavRadio::TimeSlice().

SPosition GreatCirclePosition SPosition from,
SVector polar
 

Definition at line 376 of file Geodesy.cpp.

References SPosition::alt, FeetToMetres(), geo_direct_wgs_84(), SVector::h, SPosition::lat, SPosition::lon, and SVector::r.

void init_globe_tile_table  ) 
 

The globe tile latitude lookup table allows determination of N and S latitude boundaries for all 256 possible globe tile z-indices. Entry zero is latitude 0 (the equator) and successive entries are the latitudes of each globe tile boundary approaching the poles.

The formula for globe tile latitude boundaries is: k = (360 / 256) L(0) = 0 L(n) = L(n-1) + k * cos[L(n-1)]

Definition at line 61 of file Scenery.cpp.

References SPosition::alt, DegToRad(), FormatPosition(), globe_tile_lat_bounds(), globe_tile_lat_table, SPosition::lat, SPosition::lon, and qgt_lat_bounds().

Referenced by Initialize().

float KmToNm float  km  ) 
 

Definition at line 294 of file Math.cpp.

References KM_PER_NM.

void lat_lon_to_globe_tile double  latArg,
double  lonArg,
int &  x,
int &  z
 

Parameters:
latArg Latitude is specified as decimal value in the range [-90.0, +90.0] \ as degrees North (+) or South (-) of the Equator. The Fly! scenery \ system does not model extreme latitudes north or south of approx. \ 85 degrees.
lonArg Longitude is specified as decimal value in the range [-180.0, 180.0] \ as degrees East (+) or West (-) of the Prime Meridian.
iLatGlobe Globe tile z-index (latitude)
iLonGlobe Globe tile x-index (longitude)

Definition at line 264 of file Scenery.cpp.

References globe_tile_lat_table, and gtfo.

Referenced by GetLocalNavaids(), lat_lon_to_qgt(), PosToFlatCartesian(), and PosToScaledFlatCartesian().

void lat_lon_to_qgt double  latArg,
double  lonArg,
int &  x,
int &  z
 

Parameters:
latArg Latitude is specified as arcseconds north (+) or south (-) of the equator
lonArg Longitude is specified as arcseconds east of the Prime Meridian
x Quarter globe tile x-index (longitude), range [0,511]
z Quarter globe tile z-index (latitude), range [0,511]
Returns:
bool Indicates success or failure of the conversion. If the function \ returns false then the values of the tile indices are undefined.

Definition at line 213 of file Scenery.cpp.

References globe_tile_lat_bounds(), globe_tile_lon_bounds(), and lat_lon_to_globe_tile().

Referenced by PosToFlatCartesianQgt(), qgt_position(), and CTerrainManager::SetPosition().

int LoadBitmap SBitmap bm  ) 
 

Definition at line 764 of file Bitmaps.cpp.

References SBitmap::bitmap, SBitmap::bitmapName, gtfo, SBitmap::type, TYPE_FRAMES, TYPE_INVALID, and TYPE_SINGLE.

Referenced by CPanel::Activate(), InitExitScreen(), InitLoadingScreen(), InitSplashScreen(), CFuiThemeWidget::ParseBitmap(), CFuiPicture::Read(), CSimpleInOutStateSwitch::ReadFinished(), CSimpleSwitch::ReadFinished(), CNavigationGauge::ReadFinished(), CVerticalSpeedGauge::ReadFinished(), CBitmapGauge::ReadFinished(), CGaugeKnob::ReadFinished(), CGaugeClickArea::ReadFinished(), and CGaugeNeedle::ReadFinished().

int LoadFont SFont font  ) 
 

Todo:
If not a default font then attempt to load the custom font

Definition at line 465 of file Fonts.cpp.

References CBitmappedFont::end, SDefaultFont::end, SFont::font, SFont::fontName, CBitmappedFont::h, SDefaultFont::h, CBitmappedFont::LoadRaw(), SDefaultFont::rawFilename, CBitmappedFont::rawFilename, CBitmappedFont::space, SDefaultFont::space, CBitmappedFont::start, SDefaultFont::start, CBitmappedFont::w, and SDefaultFont::w.

Referenced by InitFonts().

unsigned int MakeRGB unsigned int  r,
unsigned int  g,
unsigned int  b
 

Definition at line 302 of file Bitmaps.cpp.

Referenced by CDefaultSuperTile::CDefaultSuperTile(), CFuiBox::CFuiBox(), CFuiGroupBox::CFuiGroupBox(), CFuiLabel::CFuiLabel(), CFuiList::CFuiList(), CFuiPopupMenu::CFuiPopupMenu(), CFuiTextField::CFuiTextField(), CFuiWindowTitle::CFuiWindowTitle(), CQuarterGlobeTile::Create(), CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), CFuiRadioButton::Draw(), CFuiCheckbox::Draw(), CBKADFKR87Gauge::Draw(), CBKXPDRKT76Gauge::Draw(), CBKNavComKX155Gauge::Draw(), FrameRateNotify(), InitExitScreen(), InitSplashScreen(), and CFuiThemeWidget::ParseColour().

unsigned int MakeRGBA unsigned int  r,
unsigned int  g,
unsigned int  b,
unsigned int  a
 

Definition at line 307 of file Bitmaps.cpp.

Referenced by CBitmapPBM::Draw(), and CBitmapPBM::DrawPartial().

int MaxCharHeight SFont font  ) 
 

Definition at line 670 of file Fonts.cpp.

References SFont::font, and CBitmappedFont::MaxCharHeight().

Referenced by CFuiLabel::Draw().

int MaxCharWidth SFont font  ) 
 

Definition at line 689 of file Fonts.cpp.

References SFont::font, and CBitmappedFont::MaxCharWidth().

double MetresToFeet double  m  ) 
 

Definition at line 289 of file Math.cpp.

References METRES_PER_FOOT.

Referenced by CQTRFile::ExtractAbsoluteData(), CQTRFile::ExtractRelativeData(), GeocToGeod(), GeodToGeoc(), and GreatCirclePolar().

float MiToNm float  mi  ) 
 

Definition at line 261 of file Math.cpp.

References MILES_PER_NM.

float NmToFeet float  nm  ) 
 

Definition at line 271 of file Math.cpp.

References FEET_PER_NM.

Referenced by GlobeTileDistance(), PosToFlatCartesian(), and PosToFlatCartesianQgt().

float NmToKm float  nm  ) 
 

Definition at line 299 of file Math.cpp.

References KM_PER_NM.

float NmToMi float  nm  ) 
 

Definition at line 256 of file Math.cpp.

References MILES_PER_NM.

int NumBitmapFrames SBitmap bm  ) 
 

Definition at line 858 of file Bitmaps.cpp.

References SBitmap::bitmap, SBitmap::type, TYPE_FRAMES, and TYPE_SINGLE.

Referenced by CGaugeKnob::Draw(), CNavigationGauge::ReadFinished(), and CGaugeNeedle::ReadFinished().

SVector PosToFlatCartesian SPosition  pos  ) 
 

Definition at line 584 of file Scenery.cpp.

References SPosition::lat, lat_lon_to_globe_tile(), SPosition::lon, and PosToFlatCartesian().

SVector PosToFlatCartesian SPosition  pos,
int  gx,
int  gz
 

Definition at line 544 of file Scenery.cpp.

Referenced by CDefaultSuperTile::CDefaultSuperTile(), CSlicedSuperTile::Create(), CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), PosToFlatCartesian(), and PosToScaledFlatCartesian().

SVector PosToFlatCartesianQgt SPosition  pos  ) 
 

Parameters:
pos Position in Fly SPosition format (lat/lon double arcsecs, alt 'MSL)
Returns:
Cartesian coordinates relative to the QGT the position is in

Definition at line 673 of file Scenery.cpp.

References SPosition::lat, lat_lon_to_qgt(), SPosition::lon, and PosToFlatCartesianQgt().

SVector PosToFlatCartesianQgt SPosition  pos,
int  x,
int  z
 

Parameters:
pos World position in Fly SPosition format
x QGT x-index in range [0,511]
z QGT z-index in range [0,511]
Returns:
Unscaled Cartesian coordinates relative to the given QGT

Definition at line 623 of file Scenery.cpp.

Referenced by PosToFlatCartesianQgt(), and PosToScaledFlatCartesianQgt().

SVector PosToScaledFlatCartesian SPosition  pos  ) 
 

Definition at line 591 of file Scenery.cpp.

References SPosition::lat, lat_lon_to_globe_tile(), SPosition::lon, PosToFlatCartesian(), TerrainScale(), SVector::x, and SVector::y.

SVector PosToScaledFlatCartesianQgt SPosition  pos  ) 
 

Parameters:
pos Position in Fly SPosition format (lat/lon double arcsecs, alt 'MSL)
Returns:
Scaled Cartesian coordinates relative to the QGT the position is in

Definition at line 686 of file Scenery.cpp.

References PosToFlatCartesianQgt(), TerrainScale(), SVector::x, and SVector::y.

Referenced by CCameraManager::Print(), CTerrainManager::SetCamera(), and CModelObject::SetPosition().

void qgt_lat_bounds int  z,
double &  s,
double &  n
 

Parameters:
z QGT z-index in range [0,511]
&s Updated with southern latitude boundary in degrees N/S of equator
&n Updated with northern longitude boundary in degrees N/S of equator

Definition at line 380 of file Scenery.cpp.

References globe_tile_lat_bounds().

Referenced by init_globe_tile_table(), PosToFlatCartesianQgt(), and qgt_position().

void qgt_lon_bounds int  x,
double &  w,
double &  e
 

Parameters:
x QGT x-index in range [0,511]
&w Updated with western longitude boundary in degrees E of prime meridian
&e Updated with eastern longitude boundary in degrees E of prime meridian

Definition at line 359 of file Scenery.cpp.

References globe_tile_lon_bounds().

Referenced by PosToFlatCartesianQgt(), and qgt_position().

void qgt_position SPosition  pos,
int &  qx,
int &  qz,
double &  x,
double &  z
 

Parameters:
x Longitude delta in QGT units
z Latitude delta in QGT units
Returns:
bool Indicates success or failure of the conversion. If the function \ returns false then the values of the tile indices are undefined.

Definition at line 171 of file Scenery.cpp.

References SPosition::lat, lat_lon_to_qgt(), SPosition::lon, qgt_lat_bounds(), and qgt_lon_bounds().

Referenced by delta_qgt().

double RadToDeg double  rad  ) 
 

Definition at line 313 of file Math.cpp.

References PI.

float RadToDeg float  rad  ) 
 

Definition at line 308 of file Math.cpp.

Referenced by FormatRADec(), limitingMagnitude(), CCameraManager::Print(), CVenusImage::Reposition(), CSolImage::Reposition(), CSkyDomeImage::Reposition(), CSaturnImage::Reposition(), CMoonImage::Reposition(), CMercuryImage::Reposition(), CMarsImage::Reposition(), CJupiterImage::Reposition(), CModelObject::SetPosition(), and CTimeManager::SunriseSunset().

EMessageResult SendMessage SMessage msg  ) 
 

Todo:
Build message observer list based on MSG_USED return code
Todo:
Also send message to all observers

Definition at line 103 of file Messaging.cpp.

References CSituation::GetUserVehicle(), CSituation::GetUserVehicleType(), globals, SMessage::group, SMessage::id, SGlobals::logWarning, MSG_IGNORED, CAirplaneObject::pAirplane, CSubsystem::ReceiveMessage(), SMessage::receiver, SMessage::result, SendMessageToAirplane(), SGlobals::sit, TagToString(), TYPE_FLY_AIRPLANE, SMessage::user, and CLogFile::Write().

Referenced by CSimpleSwitch::DecState(), CBasicMagnetoSwitch::Draw(), CBasicBatterySwitch::Draw(), CSimpleInOutStateSwitch::Draw(), CSimpleSwitch::Draw(), CBKAP140Gauge::Draw(), CBKADFKR87Gauge::Draw(), CBKXPDRKT76Gauge::Draw(), CBKNavComKX155Gauge::Draw(), CNavigationGauge::Draw(), CBasicADFGauge::Draw(), CVerticalSpeedGauge::Draw(), CSimpleSwitch::IncState(), CBasicMagnetoSwitch::MouseClick(), CBasicBatterySwitch::MouseClick(), CSimpleInOutStateSwitch::MouseClick(), CBKADFKR87Gauge::MouseClick(), CBKXPDRKT76Gauge::MouseClick(), CBKNavComKX155Gauge::MouseClick(), msg_debug_send_cb(), CGenericIndicator::ReceiveMessage(), CBasicMagnetoSwitch::StopClick(), CBKADFKR87Gauge::StopClick(), CBKXPDRKT76Gauge::StopClick(), CGenericMonitor::TimeSlice(), CDependent::TimeSlice(), and CGauge::Update().

Tag StringToTag const char *  s  ) 
 

Definition at line 132 of file Math.cpp.

Referenced by CCockpitPanel::CCockpitPanel(), CFuiManager::CFuiManager(), CFuiTheme::CFuiTheme(), CDatabaseTemplate::Load(), msg_debug_send_cb(), CCameraCockpit::PanDown(), CCameraCockpit::PanLeft(), CCameraCockpit::PanRight(), CCameraCockpit::PanUp(), CRadioManager::Read(), CLevelOfDetail::Read(), CElectricalSystem::Read(), CFuelSystem::Read(), CSituation::Read(), ReadMessage(), ReadTag(), and snexttag().

SVector SubtractPosition SPosition from,
SPosition to
 

Definition at line 233 of file Math.cpp.

References SPosition::alt, FEET_PER_LAT_ARCSEC, FeetPerLonArcsec(), SPosition::lat, SPosition::lon, WrapArcsec(), SVector::x, SVector::y, and SVector::z.

SPosition SubtractVector SPosition from,
SVector v
 

Definition at line 220 of file Math.cpp.

References AddVector(), SVector::x, SVector::y, and SVector::z.

char* TagString char *  s,
Tag  tag
 

Definition at line 143 of file Math.cpp.

References TagToString().

Referenced by CFuiGroupBox::Read(), CFuiWindow::Read(), and CFuiComponent::Read().

void TagToString char *  s,
Tag  tag
 

Definition at line 149 of file Math.cpp.

Referenced by AircraftTeleportNotify(), CAnnouncement::CAnnouncement(), CGenericIndicator::CGenericIndicator(), CGenericMonitor::CGenericMonitor(), CStaticSourceSwitch::CStaticSourceSwitch(), CFuiZoomButton::Fill(), CFuiMinimizeButton::Fill(), CFuiCloseButton::Fill(), CFuiWindowTitle::Fill(), OptionsCockpitNotify(), OptionsKeysButtonsNotify(), OptionsRealismNotify(), OptionsSceneryNotify(), OptionsSetupAxesNotify(), OptionsStartupNotify(), OptionsTestControlsNotify(), CFuiTheme::Print(), CCameraManager::Print(), CKeyMap::Print(), CWorldObject::Read(), CSlopeWindData::Read(), CFlightControlSystem::Read(), CChecklists::Read(), CControlMixer::Read(), CEngineManager::Read(), CExternalLights::Read(), CRadioManager::Read(), CLevelOfDetail::Read(), CCameraManager::Read(), CCockpitManager::Read(), CVariableLoadouts::Read(), CLoadoutUnit::Read(), CGroundSuspension::Read(), CPitotStaticSystem::Read(), CElectricalSystem::Read(), CAerodynamicModel::Read(), CFuelSystem::Read(), CSimulatedVehicle::Read(), CPitotStaticPort::Read(), CAPUFuelSource::Read(), CFuelManagement::Read(), CEngineFuelPump::Read(), CFuelTank::Read(), CFuelSource::Read(), CFuelPump::Read(), CFuelMath::Read(), CFuelHeater::Read(), CFuelCell::Read(), CFuelTap::Read(), CFuelSubsystem::Read(), CBKKLN89GPSRadio::Read(), CBKKT76Radio::Read(), CTransponderRadio::Read(), CADFRadio::Read(), CNavRadio::Read(), CRadio::Read(), CFlapControl::Read(), CMixtureControl::Read(), CBaseControl::Read(), COilPressure::Read(), CEngineSubsystem::Read(), CAmmeter::Read(), CBKKAP140Panel::Read(), CTurnCoordinator::Read(), CVacuumIndicator::Read(), CDirectionalGyro::Read(), CAttitudeIndicator::Read(), CPneumaticSubsystem::Read(), CAirspeedIndicator::Read(), CVerticalSpeedIndicator::Read(), CAltimeter::Read(), CPitotStaticSubsystem::Read(), CAlternator::Read(), CBattery::Read(), CSwitchSet::Read(), CLightSettingState::Read(), CStallWarning::Read(), CAnnunciatorLight::Read(), CPitotStaticSwitch::Read(), CExteriorLight::Read(), CEmergencyLocator::Read(), CPneumaticPump::Read(), CGenericIndicator::Read(), CGenericMonitor::Read(), CSubsystem::Read(), CSituation::Read(), CPanel::Read(), CKeyMap::Read(), CKeySet::Read(), CKeyDefinition::Read(), CHelicopter::Read(), CCursor::Read(), CCameraCockpit::Read(), CCockpitPanel::Read(), CDataMap::Read(), CDataMapTable::Read(), CDataMapPolynomial::Read(), CAirplane::Read(), CRockerSwitch::Read(), CLightSwitchSetGauge::Read(), CWalkerFirePanel::Read(), CWalkerAPPanel::Read(), CKAFireExtinguisherButton::Read(), CMasterCautionWarningButtonGauge::Read(), CTurnSwitchGauge::Read(), CLightButtonGauge::Read(), CPushButtonGauge::Read(), CFlapsIndicatorGauge::Read(), CIndicatorGauge::Read(), CTrimWheelIndicatorGauge::Read(), CTrimWheelGauge::Read(), CVerticalSliderGauge::Read(), CCoveredLightButtonGauge::Read(), CCoveredSwitch::Read(), CTurnKnobGauge::Read(), CFlyhawkLightKnobGauge::Read(), CDualKnobGauge::Read(), CReversibleThrottleKnobGauge::Read(), CMixtureKnobGauge::Read(), CLitLandingGearKnobGauge::Read(), CFlapsSwitchGauge::Read(), CPrimerKnobGauge::Read(), CPushPullKnobGauge::Read(), CDualSwitch::Read(), CSimpleFloatSwitch::Read(), CSwitchPairGauge::Read(), CTwoStateELTGauge::Read(), CBasicBatterySwitch::Read(), CSimpleInOutStateSwitch::Read(), CSimpleSwitch::Read(), CLitInOutSwitch::Read(), CMomentaryHotSpotGauge::Read(), CAnalogAltPreselectGauge::Read(), CWeatherRadarGauge::Read(), CDME2Gauge::Read(), CDMEGauge::Read(), CPropSyncGauge::Read(), CVerticalRateGauge::Read(), CGyroSlavingGauge::Read(), CWalkerTempAirspeedGauge::Read(), CPilatusEFISPanel::Read(), CUniversalFMSGauge::Read(), CCollinsMNDGauge::Read(), CCollinsAirDataGauge::Read(), CCollinsRTUGauge::Read(), CCollinsNDGauge::Read(), CCollinsPFDGauge::Read(), CCollinsHFRadioGauge::Read(), CCollinsVspeedPanel::Read(), CCollinsEFISSelectionGauge::Read(), CNavajoRadarAltimeterGauge::Read(), CNavajoAmmeterGauge::Read(), CNavajoFuelSelectorGauge::Read(), CMalybooEngineMonitorGauge::Read(), CMalybooDigitalClockGauge::Read(), CMalybooNavGpsPanelGauge::Read(), CMalybooCHTButtonGauge::Read(), CMalybooCHTIndicatorGauge::Read(), CFlyhawkElevatorTrimGauge::Read(), CFlyhawkFuelSelectorGauge::Read(), CFlyhawkNavGpsPanelGauge::Read(), CFlyhawkAnnunciatorTest::Read(), CFlyhawkAnnunciator::Read(), CAnnunciator::Read(), CRadioGaugeGroup::Read(), CNavGaugeGroup::Read(), CRMINeedleGauge::Read(), CGenericADFRadioGauge::Read(), CGenericTransponderGauge::Read(), CGenericCommRadioGauge::Read(), CGenericNavRadioGauge::Read(), CBKAudioKMA26Gauge::Read(), CBKKFC150Gauge::Read(), CBKKFC200Gauge::Read(), CBKAP140Gauge::Read(), CBKGPSKLN89Gauge::Read(), CBKADFKR87Gauge::Read(), CBKXPDRKT76Gauge::Read(), CBKNavComKX155Gauge::Read(), CNavigationGauge::Read(), CHobbsMeterGauge::Read(), CSlipIndicatorGauge::Read(), CFlyhawkELTGauge::Read(), CHSIGauge::Read(), CTurnCoordinatorGauge::Read(), CAOANeedleGauge::Read(), CBrakePressureGauge::Read(), CCabinPressureGauge::Read(), CCabinPressureRateKnobGauge::Read(), CDigitsReadoutGauge::Read(), CDigitalReadoutGauge::Read(), CBasicADFGauge::Read(), CBasicDigitalClockGauge::Read(), CFlyhawkDigitalClockGauge::Read(), CAmmeterGauge::Read(), CAnalogClockGauge::Read(), CBasicCompassGauge::Read(), CExhaustGasTemperatureGauge::Read(), CN1TachometerGauge::Read(), CDualTachometerGauge::Read(), CTachometerGauge::Read(), COilTemperatureGauge::Read(), COilPressureGauge::Read(), CFuelFlowGauge::Read(), CFuelGauge::Read(), CSuctionGauge::Read(), CVacuumGauge::Read(), CDirectionalGyroGauge::Read(), CVerticalSpeedGauge::Read(), CAirspeedGauge::Read(), CHorizontalBallGauge::Read(), CFDHorizonGauge::Read(), CHorizonGauge::Read(), CRollingAltimeterGauge::Read(), CAltimeterGauge::Read(), CDigitalNeedleGauge::Read(), CThreeNeedleGauge::Read(), CTwoNeedleGauge::Read(), CNeedleGauge::Read(), CBitmapGauge::Read(), CGauge::Read(), CGaugeAnnunciator::Read(), CGaugeKnob::Read(), CGaugeClickArea::Read(), CGaugeRectangle::Read(), CGaugeNeedle::Read(), CFuiList::ReadFinished(), CFuiTextField::ReadFinished(), CFuiLabel::ReadFinished(), CFuiRadioButton::ReadFinished(), CFuiCheckbox::ReadFinished(), CFuiPopupMenu::ReadFinished(), CFuiButton::ReadFinished(), CFuiWindow::ReadFinished(), ReadMessage(), SendMessage(), TagString(), and CSubsystem::TypeIs().

float TerrainScale SPosition  pos  ) 
 

Definition at line 524 of file Scenery.cpp.

References DegToRad(), and SPosition::lat.

Referenced by CTerrainManager::Draw(), PosToScaledFlatCartesian(), PosToScaledFlatCartesianQgt(), CTerrainManager::SetCamera(), and CTerrainManager::SetPosition().

void test_geodesy void   ) 
 

Definition at line 44 of file Geodesy.cpp.

References SPosition::alt, CartesianToGeoc(), FormatPosition(), GeocToCartesian(), GeocToGeod(), GeodToGeoc(), SPosition::lat, and SPosition::lon.

int TextHeight SFont font,
const char *  text
 

Definition at line 601 of file Fonts.cpp.

References SFont::font, and CBitmappedFont::TextHeight().

Referenced by CFuiButton::Draw(), CFuiWindowTitle::Draw(), and CBKADFKR87Gauge::Draw().

GLuint TextureFromSurface SSurface s,
bool  mipmap
 

Definition at line 97 of file Bitmaps.cpp.

References SSurface::drawBuffer, SSurface::xSize, and SSurface::ySize.

Referenced by CDefaultSuperTile::CDefaultSuperTile(), CQuarterGlobeTile::Create(), CDetailTile::CreateFanGeometry(), and CDetailTile::CreateStripGeometry().

int TextWidth SFont font,
const char *  text
 

Definition at line 619 of file Fonts.cpp.

References SFont::font, and CBitmappedFont::TextWidth().

Referenced by CFuiLabel::Draw(), CFuiRadioButton::Draw(), and CFuiCheckbox::Draw().

void TrimTrailingWhitespace char *  s  ) 
 

Definition at line 365 of file Ini.cpp.

Referenced by CFuiManager::CFuiManager(), CFuiTheme::CFuiTheme(), CModelACM::CModelACM(), CStarImages::LoadConstellations(), ParseKeyValue(), and ParseSection().

void UnmakeRGB unsigned int  rgb,
unsigned int *  r,
unsigned int *  g,
unsigned int *  b
 

Definition at line 312 of file Bitmaps.cpp.

Referenced by CFuiThemeWidget::Print().

SVector VectorDifference SVector  v1,
SVector  v2
 

Definition at line 345 of file Math.cpp.

References SVector::x, SVector::y, and SVector::z.

SVector VectorSum SVector  v1,
SVector  v2
 

Definition at line 332 of file Math.cpp.

References SVector::x, SVector::y, and SVector::z.

double Wrap180 double  deg  ) 
 

Definition at line 89 of file Math.cpp.

References Wrap360().

Referenced by CTimeManager::GetLocalSiderealTime(), and CNavRadio::TimeSlice().

float Wrap24 float  hrs  ) 
 

Definition at line 106 of file Math.cpp.

Referenced by CTimeManager::GetGreenwichSiderealTime(), CTimeManager::GetLocalSiderealTime(), and CTimeManager::SunriseSunset().

int Wrap360 int  deg  ) 
 

Definition at line 75 of file Math.cpp.

double Wrap360 double  deg  ) 
 

Definition at line 61 of file Math.cpp.

Referenced by CNavigationGauge::Draw(), CGaugeNeedle::Draw(), CBasicADFGauge::MouseClick(), CBKKX155Radio::ReceiveMessage(), CTimeManager::SunriseSunset(), CBKKX155Radio::TimeSlice(), CNavRadio::TimeSlice(), and Wrap180().

float Wrap60 float  min  ) 
 

Definition at line 120 of file Math.cpp.

double WrapPi double  rad  ) 
 

Definition at line 47 of file Math.cpp.

double WrapTwoPi double  rad  ) 
 

Definition at line 33 of file Math.cpp.

Referenced by calc_zenith_azimuth_angles(), CModelACM::CModelACM(), FormatRADec(), CStarImages::LoadBSCDatabase(), CStarImages::LoadFlyDatabase(), CCameraObserver::PanLeft(), CCameraSpot::PanLeft(), CCameraObserver::PanRight(), CCameraSpot::PanRight(), CCamera::UpdateCamera(), CCelestialBody::UpdateOrbElements(), and CMoon::UpdatePosition().

SourceForge.net Logo Documentation generated by doxygen