gfx Namespace Reference

Library of low-level graphics functions. More...


Classes

class  Events
 gfx event nexus. More...
class  FontBase
 Base font (gfxsys-neutral). More...
class  FontDesc
 Font descriptor (parameter) class. More...
class  Font
 Font class to draw fonts from bitmaps. More...
class  Global
 Global class collects globals as members to determine their order of construction. More...
class  Gfont
 Gfont is a wrapper around underlying lower-level Font class. More...
class  GuiBase
 GUI base class. More...
class  PrintDesc
 Parameter struct for GuiScreen::PrintTimer(). More...
class  GuiScreen
 Screen class. More...
class  GuiObject
 GUI object base class. More...
class  GuiPrint
 Used for messages that expire. Not for regular Print(). More...
class  GuiButtonBase
 Button base class. More...
class  Gui
 Top-level GUI class. More...
class  GuiButton
 Button class. More...
class  Matrix
 Matrix class. More...
struct  BlendImageState
class  GFX
 Facade for graphics system (OpenGL). More...
class  TexCoord
 2D texture coordinates. More...
class  TextureModes
 Component of Texture mixin class (modes). More...
class  TexelDefs
 Component of Texture mixin class (texel defs). More...
class  TextureMethods
 Component of Texture mixin class (texture methods). More...
class  TextureBase
 Texture base mixin class. More...
class  Texture
 OpenGL 2D texture. More...
class  RGBA
 RGBA class. Based on uint8[4]. Can output/convert to fp[4]. More...
class  Settings
 Global program settings. More...
struct  tga_header
struct  tga_footer
class  Targa
 C++ wrapper class around C tga_load() function. More...
struct  WidthHeight
 (width,height) tuple. More...
class  Rect
 2D rectangle. More...
struct  Vector2
 2D vector or point. More...
struct  Vector3
 3D vector or point. More...
struct  LocalVertex
 3D vertex in local coordinate space. More...
struct  WorldVertex
 3D vertex in world coordinate space. More...
struct  EyeVertex
 3D vertex in eye coordinate space. More...
struct  NormalVertex
 3D vertex in normal space. More...

Namespaces

namespace  defs
 Graphics library definitions, constants, enums.

Typedefs

typedef void(* fnMouseButtonCallback )(GuiObject *obj, uint buttons)
typedef TexCoord TexCoord2
typedef void(* TargaFilterFuncType )(uint8 *p, uint8 r, uint8 g, uint8 b, uint8 a)
typedef uint16 Vix
 Vertex index ("vix").
typedef uint16 Nix
typedef Array
< LocalVertex
LocalVertexs
typedef Array
< WorldVertex
WorldVertexs
typedef Array
< EyeVertex
EyeVertexs
typedef Array
< NormalVertex
NormalVertexs
typedef Array< VixVixs

Enumerations

enum  eFontMode {
  eFontMode_NORMAL = (0), eFontMode_CENTER = (1<<0), eFontMode_NE = (1<<1), eFontMode_SE = (1<<2),
  eFontMode_SW = (1<<3), eFontMode_NW = (1<<4), eFontMode_BG = (1<<5), eFontMode_HILITE = (1<<6),
  eFontMode_MASK_JUSTIFY_CORNER = (eFontMode_NE|eFontMode_SE|eFontMode_SW|eFontMode_NW), eFontMode_MASK_RIGHT = (eFontMode_NE|eFontMode_SE), eFontMode_MASK_LEFT = (eFontMode_NW|eFontMode_SW)
}
enum  eScreenFontType { eScreenFontType_NORMAL, eScreenFontType_THIN }
enum  eScreenFontSize {
  eScreenFontSize_SMALLEST, eScreenFontSize_SMALLER, eScreenFontSize_SMALL, eScreenFontSize_NORMAL,
  eScreenFontSize_LARGE, eScreenFontSize_LARGER, eScreenFontSize_LARGEST
}
enum  eMouseEvent {
  eMouseEvent_NONE = 0, eMouseEvent_MOTION_ENTER = (1<<0), eMouseEvent_MOTION_EXIT = (1<<1), eMouseEvent_BUTTON_1 = (1<<2),
  eMouseEvent_BUTTON_2 = (1<<3), eMouseEvent_BUTTON_3 = (1<<4), eMouseEvent_BUTTON_MASK = (eMouseEvent_BUTTON_1|eMouseEvent_BUTTON_2|eMouseEvent_BUTTON_3)
}
enum  eGuiObject { eGuiObject_INVALID, eGuiObject_BASE, eGuiObject_PRINT, eGuiObject_BUTTON }
enum  {
  Xx, Yx, Zx, Xy,
  Yy, Zy, Xz, Yz,
  Zz, Ox, Oy, Oz
}
enum  { RR, GG, BB, AA }
enum  {
  TYPESIG_VERTEX_LOCAL = TYPESIG_BASE_USER, TYPESIG_VERTEX_WORLD, TYPESIG_VERTEX_NORMAL, TYPESIG_NORMAL,
  TYPESIG_TEXTURE, TYPESIG_GFX_USER
}

Functions

void Init (UNUSED int argc, UNUSED char **argv, UNUSED const string &programName)
void Cleanup (void)
template<typename V3>
bool SelfCheckVertexFp (const string &typeName)
static void SelfCheck (void)
void Init (int argc, char **argv, const string &programName)
INLINE bool CHECK_AXIS (uint axis)
 True if axis is 0,1,2. ASSERT( CHECK_AXIS(axis) );.
INLINE uint CYCLE_AXIS (uint axis)
 Cycle {X,Y,Z}.
INLINE bool CHECK_MATRIX_IDX (uint idx)
 True if matrix index is in range 0..15.
template<typename T>
bool IF_Z_FACING (T z)
template<typename OUT, typename IN>
OUT Z_TO_DISTANCE (IN z)
INLINE bool IF_NAN (volatile fp n)
 DECLARE_DISTINCT_TYPE (Radian, fpx) DECLARE_DISTINCT_TYPE(Degree
template<typename FP>
pair< FP, FP > SinCos (const Radian rad)
INLINE Degree TruncateDeg (Degree deg)
INLINE Radian Deg2Rad (Degree deg)
INLINE Degree Rad2Deg (Radian rad)
INLINE fpx Sin (Degree deg)
INLINE fpx Cos (Degree deg)
INLINE fp Distance (const Vector2 &v)
INLINE fp Distance (const Vector3 &v)
template<typename VECTOR3A, typename VECTOR3B>
fp Distance (const VECTOR3A &v1, const VECTOR3B &v2)
INLINE fpx DistanceSquared (const Vector3 &v1, const Vector3 &v2)
template<typename MATRIX1, typename MATRIX2>
fpx DistanceSquaredMatrix (const MATRIX1 &m1, const MATRIX2 &m2)
INLINE Vector3 Normalize (const Vector3 &v)
INLINE fp NormalizeCoord (uint axis, const Vector3 &v)
INLINE Vector3 CrossProduct (const Vector3 &v0, const Vector3 &v1, const Vector3 &v2)
INLINE fp DotProduct2 (const Vector2 &v1, const Vector2 &v2)
template<typename VECTOR3A, typename VECTOR3B>
fp DotProduct3 (const VECTOR3A &v1, const VECTOR3B &v2)
template<typename VECTOR3A, typename VECTOR3B>
fpx DotProduct3_fpx (const VECTOR3A &v1, const VECTOR3B &v2)
INLINE Radian Angle2 (const Vector2 &u, const Vector2 &v)
template<typename VECTOR>
Radian Angle3 (const VECTOR &u, const VECTOR &v)
INLINE Vector3 Interpolate (const Vector3 &v1, const Vector3 &v2, const fp fraction)
template<typename T>
Midpoint (T x1, T x2)
INLINE Vector3 Midpoint (const Vector3 &v1, const Vector3 &v2)
template<typename T>
SQUARE (T x)
template<typename T>
AVG (T x, T y)
template<typename T>
Range (T val, T lo, T hi)
template<typename T>
IfInRange (T a0, T a1, T b0, T b1)
INLINE fp Remap (fp value, fp rangeOld, fp rangeNew)
INLINE fp Truncate (fp val, fp interval)
INLINE Matrix operator * (const Matrix &m, const Matrix &n)
INLINE void TransposeMatrix (Matrix &dest, const Matrix &src)
INLINE ostream & operator<< (ostream &strm, const TexCoord &texCoord)
RGBA Interpolate (const RGBA rgba0, const RGBA rgba1, const fp factor)
INLINE ostream & operator<< (ostream &strm, const RGBA rgba)
ostream & operator<< (ostream &strm, const Settings &settings)
void DefaultTargaFilterFunc (uint8 *p, uint8 r, uint8 g, uint8 b, uint8 a)
uint8 * tga_load (const uint8 *const ibuf, uint ibufLen, uint *olen, uint *w, uint *h, bool *hasAlpha, TargaFilterFuncType filterFunc)
template<typename T>
bool operator== (const Rect< T > &a, const Rect< T > &b)
template<typename T>
bool operator!= (const Rect< T > &a, const Rect< T > &b)
template<typename T>
bool operator< (const Rect< T > &a, const Rect< T > &b)
template<typename T>
ostream & operator<< (ostream &strm, const Rect< T > &o)
INLINE Vector2 operator+ (const Vector2 &v1, const Vector2 &v2)
INLINE Vector2 operator- (const Vector2 &v1, const Vector2 &v2)
INLINE Vector2 operator * (const Vector2 &v1, const Vector2 &v2)
INLINE Vector2 operator/ (const Vector2 &v1, const Vector2 &v2)
INLINE Vector2 operator+ (const Vector2 &v, fp f)
INLINE Vector2 operator- (const Vector2 &v, fp f)
INLINE Vector2 operator * (const Vector2 &v, fp f)
INLINE Vector2 operator/ (const Vector2 &v, fp f)
INLINE ostream & operator<< (ostream &strm, const Vector2 &v)
INLINE Vector3 operator+ (const Vector3 &v1, const Vector3 &v2)
INLINE Vector3 operator- (const Vector3 &v1, const Vector3 &v2)
INLINE Vector3 operator * (const Vector3 &v1, const Vector3 &v2)
INLINE Vector3 operator/ (const Vector3 &v1, const Vector3 &v2)
INLINE Vector3 operator+ (const Vector3 &v, fp f)
INLINE Vector3 operator- (const Vector3 &v, fp f)
INLINE Vector3 operator * (const Vector3 &v, fp f)
INLINE Vector3 operator/ (const Vector3 &v, fp f)
INLINE ostream & operator<< (ostream &strm, const Vector3 &v)
INLINE LocalVertex operator+ (const LocalVertex &v1, const LocalVertex &v2)
INLINE LocalVertex operator- (const LocalVertex &v1, const LocalVertex &v2)
INLINE LocalVertex operator * (const LocalVertex &v1, const LocalVertex &v2)
INLINE LocalVertex operator/ (const LocalVertex &v1, const LocalVertex &v2)
INLINE LocalVertex operator+ (const LocalVertex &v, fp f)
INLINE LocalVertex operator- (const LocalVertex &v, fp f)
INLINE LocalVertex operator * (const LocalVertex &v, fp f)
INLINE LocalVertex operator/ (const LocalVertex &v, fp f)
INLINE ostream & operator<< (ostream &strm, const LocalVertex &v)
INLINE WorldVertex operator+ (const WorldVertex &v1, const WorldVertex &v2)
INLINE WorldVertex operator- (const WorldVertex &v1, const WorldVertex &v2)
INLINE WorldVertex operator * (const WorldVertex &v1, const WorldVertex &v2)
INLINE WorldVertex operator/ (const WorldVertex &v1, const WorldVertex &v2)
INLINE WorldVertex operator+ (const WorldVertex &v, fp f)
INLINE WorldVertex operator- (const WorldVertex &v, fp f)
INLINE WorldVertex operator * (const WorldVertex &v, fp f)
INLINE WorldVertex operator/ (const WorldVertex &v, fp f)
INLINE ostream & operator<< (ostream &strm, const WorldVertex &v)
INLINE EyeVertex operator+ (const EyeVertex &v1, const EyeVertex &v2)
INLINE EyeVertex operator- (const EyeVertex &v1, const EyeVertex &v2)
INLINE EyeVertex operator * (const EyeVertex &v1, const EyeVertex &v2)
INLINE EyeVertex operator/ (const EyeVertex &v1, const EyeVertex &v2)
INLINE EyeVertex operator+ (const EyeVertex &v, fp f)
INLINE EyeVertex operator- (const EyeVertex &v, fp f)
INLINE EyeVertex operator * (const EyeVertex &v, fp f)
INLINE EyeVertex operator/ (const EyeVertex &v, fp f)
INLINE ostream & operator<< (ostream &strm, const EyeVertex &v)
INLINE NormalVertex operator+ (const NormalVertex &v1, const NormalVertex &v2)
INLINE NormalVertex operator- (const NormalVertex &v1, const NormalVertex &v2)
INLINE NormalVertex operator * (const NormalVertex &v1, const NormalVertex &v2)
INLINE NormalVertex operator/ (const NormalVertex &v1, const NormalVertex &v2)
INLINE NormalVertex operator+ (const NormalVertex &v, fp f)
INLINE NormalVertex operator- (const NormalVertex &v, fp f)
INLINE NormalVertex operator * (const NormalVertex &v, fp f)
INLINE NormalVertex operator/ (const NormalVertex &v, fp f)
INLINE ostream & operator<< (ostream &strm, const NormalVertex &v)

Variables

const int Z_FACING = -1
Global global
static const RGBA sRgbaDefault (1.0, 1.0, 1.0, 1.0)
const uint GUIBASE_PUSH_FONT_SOFT_LIMIT = 30
static const fp BUTTON_X_SCALE = 1.00
static const fp BUTTON_Y_SCALE = 1.65
const fpx PI = 3.14159265358979323846L
const fpx PI2 = 6.28318530717958647692L
const fpx PI_90 = 1.57079632679489661926L
fpx const Radian RADIAN_180 = gfx::PI
const Radian RADIAN_360 = gfx::PI2
INTERN const fpx degRadRatio = (1.0 / 360.0) * (gfx::PI2)
INTERN const fpx radDegRatio = (1.0 / gfx::PI2) * 360.0
static BlendImageState sBlendImage
const fp MIN_OPENGL_VERSION_FLOAT = 1.4
static
Texture::eMinFilter 
DEFAULT_NON_MIPMAP_MIN_FILTER = Texture::eMinFilter_LINEAR
static
Texture::eMagFilter 
DEFAULT_NON_MIPMAP_MAG_FILTER = Texture::eMagFilter_LINEAR
static
Texture::eMinFilter 
DEFAULT_MIPMAP_MIN_FILTER = Texture::eMinFilter_LINEAR_MIPMAP_LINEAR
static
Texture::eMagFilter 
DEFAULT_MIPMAP_MAG_FILTER = Texture::eMagFilter_LINEAR
Settings gSettings


Detailed Description

Library of low-level graphics functions.

Typedef Documentation

typedef Array<EyeVertex> gfx::EyeVertexs

typedef void(* gfx::fnMouseButtonCallback)(GuiObject *obj, uint buttons)

typedef Array<LocalVertex> gfx::LocalVertexs

typedef uint16 gfx::Nix

typedef Array<NormalVertex> gfx::NormalVertexs

typedef void(* gfx::TargaFilterFuncType)(uint8 *p, uint8 r, uint8 g, uint8 b, uint8 a)

typedef TexCoord gfx::TexCoord2

typedef uint16 gfx::Vix

Vertex index ("vix").

typedef Array<Vix> gfx::Vixs

typedef Array<WorldVertex> gfx::WorldVertexs


Enumeration Type Documentation

anonymous enum

Enumerator:
Xx 
Yx 
Zx 
Xy 
Yy 
Zy 
Xz 
Yz 
Zz 
Ox 
Oy 
Oz 

anonymous enum

Enumerator:
RR 
GG 
BB 
AA 

anonymous enum

Enumerator:
TYPESIG_VERTEX_LOCAL 
TYPESIG_VERTEX_WORLD 
TYPESIG_VERTEX_NORMAL 
TYPESIG_NORMAL 
TYPESIG_TEXTURE 
TYPESIG_GFX_USER 

enum gfx::eFontMode

Font mode bits. Select only one justification.

Enumerator:
eFontMode_NORMAL 
eFontMode_CENTER 
eFontMode_NE 
eFontMode_SE 
eFontMode_SW 
eFontMode_NW 
eFontMode_BG 
eFontMode_HILITE 
eFontMode_MASK_JUSTIFY_CORNER 
eFontMode_MASK_RIGHT 
eFontMode_MASK_LEFT 

enum gfx::eGuiObject

Enumerator:
eGuiObject_INVALID 
eGuiObject_BASE 
eGuiObject_PRINT 
eGuiObject_BUTTON 

enum gfx::eMouseEvent

Enumerator:
eMouseEvent_NONE 
eMouseEvent_MOTION_ENTER 
eMouseEvent_MOTION_EXIT 
eMouseEvent_BUTTON_1 
eMouseEvent_BUTTON_2 
eMouseEvent_BUTTON_3 
eMouseEvent_BUTTON_MASK 

enum gfx::eScreenFontSize

Enumerator:
eScreenFontSize_SMALLEST 
eScreenFontSize_SMALLER 
eScreenFontSize_SMALL 
eScreenFontSize_NORMAL 
eScreenFontSize_LARGE 
eScreenFontSize_LARGER 
eScreenFontSize_LARGEST 

enum gfx::eScreenFontType

Enumerator:
eScreenFontType_NORMAL 
eScreenFontType_THIN 


Function Documentation

INLINE Radian gfx::Angle2 ( const Vector2 &  u,
const Vector2 &  v 
)

Calculate angle (in radians) between two vectors sharing the same origin.

template<typename VECTOR>
Radian gfx::Angle3 ( const VECTOR &  u,
const VECTOR &  v 
) [inline]

template<typename T>
T gfx::AVG ( x,
y 
) [inline]

Average.

INLINE bool gfx::CHECK_AXIS ( uint  axis  ) 

True if axis is 0,1,2. ASSERT( CHECK_AXIS(axis) );.

INLINE bool gfx::CHECK_MATRIX_IDX ( uint  idx  ) 

True if matrix index is in range 0..15.

void gfx::Cleanup ( void   ) 

Cleanup this library.

INLINE fpx gfx::Cos ( Degree  deg  ) 

360' cos().

INLINE Vector3 gfx::CrossProduct ( const Vector3 &  v0,
const Vector3 &  v1,
const Vector3 &  v2 
)

Calculate a cross product of two vectors which yields a normal vector that is perpendicular to the plane containing the two source vectors. Note: The cross product won't be unit length.

INLINE uint gfx::CYCLE_AXIS ( uint  axis  ) 

Cycle {X,Y,Z}.

gfx::DECLARE_DISTINCT_TYPE ( Radian  ,
fpx   
)

void gfx::DefaultTargaFilterFunc ( uint8 *  p,
uint8  r,
uint8  g,
uint8  b,
uint8  a 
)

Default function to filter RGBA from Targa (pass-thru). Specifying a different filter function can be used to adjust color and alpha of Targa images.

INLINE Radian gfx::Deg2Rad ( Degree  deg  ) 

template<typename VECTOR3A, typename VECTOR3B>
fp gfx::Distance ( const VECTOR3A &  v1,
const VECTOR3B &  v2 
) [inline]

Distance between two vectors (DistanceSquared() is faster than this).

INLINE fp gfx::Distance ( const Vector3 &  v  ) 

INLINE fp gfx::Distance ( const Vector2 &  v  ) 

Distance between vector and implied zero origin.

INLINE fpx gfx::DistanceSquared ( const Vector3 &  v1,
const Vector3 &  v2 
)

Calculate the distance^2 (squared) between two vectors. DISTANCE RETURNED IS SQUARED (distance^2). SQUARE ROOT OF DISTANCE IS SKIPPED FOR SPEED. sqrt() and the underlying FPU instruction is very slow.

template<typename MATRIX1, typename MATRIX2>
fpx gfx::DistanceSquaredMatrix ( const MATRIX1 &  m1,
const MATRIX2 &  m2 
) [inline]

INLINE fp gfx::DotProduct2 ( const Vector2 &  v1,
const Vector2 &  v2 
)

Calculate the dot product of two vectors which yields a scalar. If the angle between the two vectors is between 0 and 90 degrees, the dot product will be positive, else negative.

template<typename VECTOR3A, typename VECTOR3B>
fp gfx::DotProduct3 ( const VECTOR3A &  v1,
const VECTOR3B &  v2 
) [inline]

template<typename VECTOR3A, typename VECTOR3B>
fpx gfx::DotProduct3_fpx ( const VECTOR3A &  v1,
const VECTOR3B &  v2 
) [inline]

INLINE bool gfx::IF_NAN ( volatile fp  n  ) 

template<typename T>
bool gfx::IF_Z_FACING ( z  )  [inline]

template<typename T>
T gfx::IfInRange ( a0,
a1,
b0,
b1 
) [inline]

Returns:
True if two lines overlap.

void gfx::Init ( int  argc,
char **  argv,
const string &  programName 
)

Initialize this library.

void gfx::Init ( UNUSED int  argc,
UNUSED char **  argv,
UNUSED const string &  programName 
)

Initialize this library.

RGBA gfx::Interpolate ( const RGBA  rgba0,
const RGBA  rgba1,
const fp  factor 
)

Interpolate between two RGBAs.

Parameters:
rgba0 
rgba1 
factor 0.0 : rgba0 0.5 : interpolate at mid-point. 1.0 : rgba1

INLINE Vector3 gfx::Interpolate ( const Vector3 &  v1,
const Vector3 &  v2,
const fp  fraction 
)

Interpolate between two vectors.

Parameters:
v1,v2 
frac Fraction in range {0,..,1.0}. If fraction is 0.0, v1 is returned. If fraction is 1.0, v2 is returned. If fraction is 0.5, midpoint is returned.
Returns:
Interpolated 3D point.

INLINE Vector3 gfx::Midpoint ( const Vector3 &  v1,
const Vector3 &  v2 
)

template<typename T>
T gfx::Midpoint ( x1,
x2 
) [inline]

Midpoint.

INLINE Vector3 gfx::Normalize ( const Vector3 &  v  ) 

Returns:
A normalized vector (unit-length 1.0) of the same vector. Not to be confused with calculating the normal vector of two vectors (CrossProduct).

INLINE fp gfx::NormalizeCoord ( uint  axis,
const Vector3 &  v 
)

Normalize a 3D point (unit 1 distance) then return one normalized coordinate. The return value typically is passed to asin().

INLINE NormalVertex gfx::operator * ( const NormalVertex &  v,
fp  f 
)

INLINE NormalVertex gfx::operator * ( const NormalVertex &  v1,
const NormalVertex &  v2 
)

INLINE EyeVertex gfx::operator * ( const EyeVertex &  v,
fp  f 
)

INLINE EyeVertex gfx::operator * ( const EyeVertex &  v1,
const EyeVertex &  v2 
)

INLINE WorldVertex gfx::operator * ( const WorldVertex &  v,
fp  f 
)

INLINE WorldVertex gfx::operator * ( const WorldVertex &  v1,
const WorldVertex &  v2 
)

INLINE LocalVertex gfx::operator * ( const LocalVertex &  v,
fp  f 
)

INLINE LocalVertex gfx::operator * ( const LocalVertex &  v1,
const LocalVertex &  v2 
)

INLINE Vector3 gfx::operator * ( const Vector3 &  v,
fp  f 
)

INLINE Vector3 gfx::operator * ( const Vector3 &  v1,
const Vector3 &  v2 
)

INLINE Vector2 gfx::operator * ( const Vector2 &  v,
fp  f 
)

INLINE Vector2 gfx::operator * ( const Vector2 &  v1,
const Vector2 &  v2 
)

INLINE Matrix gfx::operator * ( const Matrix &  m,
const Matrix &  n 
)

Multiply two matrixs.

 *
 * Matrix multiplication can be used to combine matrix transformations.
 *
 * For example, the two transformations of a local vertex to an eye vertex:
 * vl * wm[] = vw      // local --> world
 * vw * em[] = ve      // world --> eye
 *
 * Is mathematically equivalent to:
 * vl * wm[] * em[] = ve
 *
 * Combining the two matrixs into one using multiplication:
 * wm[] * em[] = wem[]
 *
 * Allows a faster single vertex transformation:
 * vl * wem[] = ve
 *
 * For reference:
 *
 * template<typename FPP,typename FPM,typename FPN>
 * void
 * MultiplyMatrix( FPP p[16] , const FPM m[16], const FPN n[16] )
 * {
 *     for ( uint i = 0; i < 4; ++i )
 *     for ( uint j = 0; j < 4; ++j )
 *     {
 *         FPP e = 0.0;
 *         for ( uint k = 0; k < 4; ++k )
 *         {
 * #if MATRIX_ROW_MAJOR
 *             e += m[k*4+j] * n[i*4+k];
 * #else
 *             e += m[i*4+k] * n[k*4+j];
 * #endif
 *         }
 *      p[i*4+j] = e;
 *     }
 * }
 * 

template<typename T>
bool gfx::operator!= ( const Rect< T > &  a,
const Rect< T > &  b 
) [inline]

INLINE NormalVertex gfx::operator+ ( const NormalVertex &  v,
fp  f 
)

VECTOR3 [op] fp

INLINE NormalVertex gfx::operator+ ( const NormalVertex &  v1,
const NormalVertex &  v2 
)

VECTOR3 [op] VECTOR3

INLINE EyeVertex gfx::operator+ ( const EyeVertex &  v,
fp  f 
)

VECTOR3 [op] fp

INLINE EyeVertex gfx::operator+ ( const EyeVertex &  v1,
const EyeVertex &  v2 
)

VECTOR3 [op] VECTOR3

INLINE WorldVertex gfx::operator+ ( const WorldVertex &  v,
fp  f 
)

VECTOR3 [op] fp

INLINE WorldVertex gfx::operator+ ( const WorldVertex &  v1,
const WorldVertex &  v2 
)

VECTOR3 [op] VECTOR3

INLINE LocalVertex gfx::operator+ ( const LocalVertex &  v,
fp  f 
)

VECTOR3 [op] fp

INLINE LocalVertex gfx::operator+ ( const LocalVertex &  v1,
const LocalVertex &  v2 
)

VECTOR3 [op] VECTOR3

INLINE Vector3 gfx::operator+ ( const Vector3 &  v,
fp  f 
)

VECTOR3 [op] fp

INLINE Vector3 gfx::operator+ ( const Vector3 &  v1,
const Vector3 &  v2 
)

VECTOR3 [op] VECTOR3

INLINE Vector2 gfx::operator+ ( const Vector2 &  v,
fp  f 
)

Vector2 [op] fp

INLINE Vector2 gfx::operator+ ( const Vector2 &  v1,
const Vector2 &  v2 
)

Vector2 [op] Vector2

INLINE NormalVertex gfx::operator- ( const NormalVertex &  v,
fp  f 
)

INLINE NormalVertex gfx::operator- ( const NormalVertex &  v1,
const NormalVertex &  v2 
)

INLINE EyeVertex gfx::operator- ( const EyeVertex &  v,
fp  f 
)

INLINE EyeVertex gfx::operator- ( const EyeVertex &  v1,
const EyeVertex &  v2 
)

INLINE WorldVertex gfx::operator- ( const WorldVertex &  v,
fp  f 
)

INLINE WorldVertex gfx::operator- ( const WorldVertex &  v1,
const WorldVertex &  v2 
)

INLINE LocalVertex gfx::operator- ( const LocalVertex &  v,
fp  f 
)

INLINE LocalVertex gfx::operator- ( const LocalVertex &  v1,
const LocalVertex &  v2 
)

INLINE Vector3 gfx::operator- ( const Vector3 &  v,
fp  f 
)

INLINE Vector3 gfx::operator- ( const Vector3 &  v1,
const Vector3 &  v2 
)

INLINE Vector2 gfx::operator- ( const Vector2 &  v,
fp  f 
)

INLINE Vector2 gfx::operator- ( const Vector2 &  v1,
const Vector2 &  v2 
)

INLINE NormalVertex gfx::operator/ ( const NormalVertex &  v,
fp  f 
)

INLINE NormalVertex gfx::operator/ ( const NormalVertex &  v1,
const NormalVertex &  v2 
)

INLINE EyeVertex gfx::operator/ ( const EyeVertex &  v,
fp  f 
)

INLINE EyeVertex gfx::operator/ ( const EyeVertex &  v1,
const EyeVertex &  v2 
)

INLINE WorldVertex gfx::operator/ ( const WorldVertex &  v,
fp  f 
)

INLINE WorldVertex gfx::operator/ ( const WorldVertex &  v1,
const WorldVertex &  v2 
)

INLINE LocalVertex gfx::operator/ ( const LocalVertex &  v,
fp  f 
)

INLINE LocalVertex gfx::operator/ ( const LocalVertex &  v1,
const LocalVertex &  v2 
)

INLINE Vector3 gfx::operator/ ( const Vector3 &  v,
fp  f 
)

INLINE Vector3 gfx::operator/ ( const Vector3 &  v1,
const Vector3 &  v2 
)

INLINE Vector2 gfx::operator/ ( const Vector2 &  v,
fp  f 
)

INLINE Vector2 gfx::operator/ ( const Vector2 &  v1,
const Vector2 &  v2 
)

template<typename T>
bool gfx::operator< ( const Rect< T > &  a,
const Rect< T > &  b 
) [inline]

INLINE ostream& gfx::operator<< ( ostream &  strm,
const NormalVertex &  v 
)

operator<<(VECTOR3)

INLINE ostream& gfx::operator<< ( ostream &  strm,
const EyeVertex &  v 
)

operator<<(VECTOR3)

INLINE ostream& gfx::operator<< ( ostream &  strm,
const WorldVertex &  v 
)

operator<<(VECTOR3)

INLINE ostream& gfx::operator<< ( ostream &  strm,
const LocalVertex &  v 
)

operator<<(VECTOR3)

INLINE ostream& gfx::operator<< ( ostream &  strm,
const Vector3 &  v 
)

operator<<(VECTOR3)

INLINE ostream& gfx::operator<< ( ostream &  strm,
const Vector2 &  v 
)

operator<<(VERTEX)

template<typename T>
ostream& gfx::operator<< ( ostream &  strm,
const Rect< T > &  o 
) [inline]

ostream & gfx::operator<< ( ostream &  strm,
const Settings settings 
)

Print Settings configuration.

INLINE ostream& gfx::operator<< ( ostream &  strm,
const RGBA  rgba 
)

operator<<()

INLINE ostream& gfx::operator<< ( ostream &  strm,
const TexCoord &  texCoord 
)

template<typename T>
bool gfx::operator== ( const Rect< T > &  a,
const Rect< T > &  b 
) [inline]

INLINE Degree gfx::Rad2Deg ( Radian  rad  ) 

template<typename T>
T gfx::Range ( val,
lo,
hi 
) [inline]

Force a number to be within a range.

INLINE fp gfx::Remap ( fp  value,
fp  rangeOld,
fp  rangeNew 
)

Map a number from one range into another.

static void gfx::SelfCheck ( void   )  [static]

Ensure assumptions of this code hold on this platform.

template<typename V3>
bool gfx::SelfCheckVertexFp ( const string &  typeName  )  [inline]

Check casting Vertex/Vector and fp[3]. The only place where this cast is done is at GFX::Vertex().

Remarks:
REGARDLESS OF THIS CHECK PASSING, CASTING SHOULD BE AVOIDED AND RESTRICTED TO GFX::Vertex() BECAUSE CASTING WILL CAUSE TYPESIG CHECKS TO FAIL!

INLINE fpx gfx::Sin ( Degree  deg  ) 

360' sin().

template<typename FP>
pair<FP,FP> gfx::SinCos ( const Radian  rad  )  [inline]

Compute sine and cosine. Example: pair<fp,fp> si_co = SinCos<fp>( rad ); fp& s = si_co.first; fp& c = si_co.second;

template<typename T>
T gfx::SQUARE ( x  )  [inline]

x^2

uint8 * gfx::tga_load ( const uint8 *const   ibuf,
uint  ibufLen,
uint olen,
uint w,
uint h,
bool *  hasAlpha,
TargaFilterFuncType  filterFunc 
)

Load TGA file.

As written this function only recognizes the following types of Targas: Type 02 - Uncompressed RGB, 24 or 32 bits Type 03 - Uncompressed grayscale, 8 bits Type 10 - RLE-compressed RGB, 24 or 32 bits Type 11 - RLE-compressed grayscale, 8 bits There are several other (uncommon) Targa formats which this function can't currently handle

INLINE void gfx::TransposeMatrix ( Matrix &  dest,
const Matrix &  src 
)

Transpose a matrix. Reverses the mapping between two coordinate systems.

INLINE fp gfx::Truncate ( fp  val,
fp  interval 
)

Truncate a float at an interval. Eg, Truncate(24,10) returns 20.

INLINE Degree gfx::TruncateDeg ( Degree  deg  ) 

Truncate a degree.

template<typename OUT, typename IN>
OUT gfx::Z_TO_DISTANCE ( IN  z  )  [inline]


Variable Documentation

const fp gfx::BUTTON_X_SCALE = 1.00 [static]

const fp gfx::BUTTON_Y_SCALE = 1.65 [static]

Texture::eMagFilter gfx::DEFAULT_MIPMAP_MAG_FILTER = Texture::eMagFilter_LINEAR [static]

Texture::eMinFilter gfx::DEFAULT_MIPMAP_MIN_FILTER = Texture::eMinFilter_LINEAR_MIPMAP_LINEAR [static]

Texture::eMagFilter gfx::DEFAULT_NON_MIPMAP_MAG_FILTER = Texture::eMagFilter_LINEAR [static]

Texture::eMinFilter gfx::DEFAULT_NON_MIPMAP_MIN_FILTER = Texture::eMinFilter_LINEAR [static]

INTERN const fpx gfx::degRadRatio = (1.0 / 360.0) * (gfx::PI2)

Convert a (360) degree into a radian. 360' = 2 * PI

Global gfx::global

Settings gfx::gSettings

const uint gfx::GUIBASE_PUSH_FONT_SOFT_LIMIT = 30

const fp gfx::MIN_OPENGL_VERSION_FLOAT = 1.4

const fpx gfx::PI = 3.14159265358979323846L

const fpx gfx::PI2 = 6.28318530717958647692L

const fpx gfx::PI_90 = 1.57079632679489661926L

INTERN const fpx gfx::radDegRatio = (1.0 / gfx::PI2) * 360.0

Convert a radian into a (360) degree. 360' = 2 * PI

fpx const Radian gfx::RADIAN_180 = gfx::PI

const Radian gfx::RADIAN_360 = gfx::PI2

BlendImageState gfx::sBlendImage [static]

const RGBA gfx::sRgbaDefault(1.0, 1.0, 1.0, 1.0) [static]

const int gfx::Z_FACING = -1

Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:26 2007