Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Classes | Functions | Variables
core Namespace Reference

In this namespace can be found basic classes like vectors, planes, arrays, lists and so on. More...

Classes

class  aabox3d
class  ConfigFile
class  line2d
 2D line between two points with intersection methods. More...
class  line3d
 3D line between two points with intersection methods. More...
class  matrix4
class  plane3d
 Template plane class with some intersection testing methods. More...
class  position2d
 Simple class for holding 2d coordinates. More...
class  quaternion
 Quaternion class. More...
class  Singleton
 Singleton template. More...
class  sphere3d
 Sphere. More...
class  vector2d
 2d vector class with lots of operators and methods. More...
class  vector3d
 3d vector class with lots of operators and methods. More...
class  vector4d

Functions

f32 ENGINE_PUBLIC_EXPORT abs (f32 val)
 returns abs of two values. Own implementation to get rid of STL (VS6 problems)
f64 ENGINE_PUBLIC_EXPORT abs (f64 val)
f32 ENGINE_PUBLIC_EXPORT acos (f32 val)
f64 ENGINE_PUBLIC_EXPORT acos (f64 val)
f64 ENGINE_PUBLIC_EXPORT asin (f64 val)
f32 ENGINE_PUBLIC_EXPORT asin (f32 val)
f32 ENGINE_PUBLIC_EXPORT atan (f32 val)
f64 ENGINE_PUBLIC_EXPORT atan (f64 val)
f32 ENGINE_PUBLIC_EXPORT atan2 (f32 valy, f32 valx)
f64 ENGINE_PUBLIC_EXPORT atan2 (f64 valy, f64 valx)
f32 ENGINE_PUBLIC_EXPORT ceil (f32 val)
f64 ENGINE_PUBLIC_EXPORT ceil (f64 val)
s32 ENGINE_PUBLIC_EXPORT ceil32 (f32 val)
s64 ENGINE_PUBLIC_EXPORT ceil64 (f64 val)
f32 ENGINE_PUBLIC_EXPORT clamp (f32 val, f32 min, f32 max)
f64 ENGINE_PUBLIC_EXPORT clamp (f64 val, f64 min, f64 max)
f32 ENGINE_PUBLIC_EXPORT cos (f32 val)
f64 ENGINE_PUBLIC_EXPORT cos (f64 val)
bool ENGINE_PUBLIC_EXPORT equals (const f32 a, const f32 b)
bool ENGINE_PUBLIC_EXPORT equals (const f64 a, const f64 b)
f32 ENGINE_PUBLIC_EXPORT exp (f32 val)
f64 ENGINE_PUBLIC_EXPORT exp (f64 val)
ENGINE_PUBLIC_EXPORT u32 fixedToFixed (u32 value, u32 n, u32 p)
 Convert N bit color channel value to P bits. It fills P bits with the bit pattern repeated.
ENGINE_PUBLIC_EXPORT f32 fixedToFloat (u32 value, u32 bits)
 Fixed point to float.
ENGINE_PUBLIC_EXPORT u32 floatToFixed (const f32 value, const u32 bits)
 Convert floating point color channel value between 0.0 and 1.0 (otherwise clamped) to integer of a certain number of bits. Works for any value of bits between 0 and 31.
ENGINE_PUBLIC_EXPORT u16 floatToHalf (f32 i)
 Convert a float32 to a float16 (NV_half_float).Courtesy of OpenEXR.
ENGINE_PUBLIC_EXPORT std::string floatToString (f32 f)
f32 ENGINE_PUBLIC_EXPORT floor (f32 val)
f64 ENGINE_PUBLIC_EXPORT floor (f64 val)
s32 ENGINE_PUBLIC_EXPORT floor32 (f32 val)
s64 ENGINE_PUBLIC_EXPORT floor64 (f64 val)
ENGINE_PUBLIC_EXPORT f32 halfToFloat (u16 y)
 Convert a float16 (NV_half_float) to a float32.Courtesy of OpenEXR.
ENGINE_PUBLIC_EXPORT std::string intToString (u32 i)
ENGINE_PUBLIC_EXPORT std::string intToString (s32 i)
f32 ENGINE_PUBLIC_EXPORT log (f32 val)
f64 ENGINE_PUBLIC_EXPORT log (f64 val)
f64 ENGINE_PUBLIC_EXPORT max (const f64 a, const f64 b)
f64 ENGINE_PUBLIC_EXPORT max (const f64 a, const f64 b, const f64 c)
f32 ENGINE_PUBLIC_EXPORT max (const f32 a, const f32 b)
 returns maximum of two values. Own implementation to get rid of the STL (VS6 problems)
f32 ENGINE_PUBLIC_EXPORT max (const f32 a, const f32 b, const f32 c)
 returns maximum of three values.
f64 ENGINE_PUBLIC_EXPORT min (const f64 a, const f64 b)
f32 ENGINE_PUBLIC_EXPORT min (const f32 a, const f32 b, const f32 c)
 returns minimum of three values.
f32 ENGINE_PUBLIC_EXPORT min (const f32 a, const f32 b)
 Constant for 64bit 1/3.
f64 ENGINE_PUBLIC_EXPORT min (const f64 a, const f64 b, const f64 c)
ENGINE_PUBLIC_EXPORT bool powerOfTwo (u64 num)
ENGINE_PUBLIC_EXPORT bool powerOfTwo (u32 num)
f32 ENGINE_PUBLIC_EXPORT sin (f32 val)
f64 ENGINE_PUBLIC_EXPORT sin (f64 val)
ENGINE_PUBLIC_EXPORT
std::vector< std::string > 
splitString (const std::string &str, const std::string &delims="\t\n ", u32 maxSplits=0)
f32 ENGINE_PUBLIC_EXPORT sqr (f32 val)
f64 ENGINE_PUBLIC_EXPORT sqr (f64 val)
f64 ENGINE_PUBLIC_EXPORT sqrt (f64 val)
f32 ENGINE_PUBLIC_EXPORT sqrt (f32 val)
ENGINE_PUBLIC_EXPORT f32 stringToFloat (std::string &str)
ENGINE_PUBLIC_EXPORT s32 stringToInt (std::string &str)
ENGINE_PUBLIC_EXPORT void stringToLower (std::string &str)
ENGINE_PUBLIC_EXPORT void stringToUpper (std::string &str)
ENGINE_PUBLIC_EXPORT void stringTrim (std::string &str, const std::string &whitespace=" \t\n", bool left=true, bool right=true)
f32 ENGINE_PUBLIC_EXPORT tan (f32 val)
f64 ENGINE_PUBLIC_EXPORT tan (f64 val)

Variables

const f32 DEGTORAD = 0.0174532925199432957692369076848f
 Constant for 64bit PI/2.
const f64 DEGTORAD64 = PI64 / 180.0
const f32 EPSILON = 1.192092896e-07f
const f64 EPSILON64 = 2.2204460492503131e-016
 Constant often used when comparing float values.
const f32 FLOAT_MAX = 3.402823466e+38f
 Constant for 64bit min float.
const f64 FLOAT_MAX64 = 1.7976931348623158e+308
 Constant for max float.
const f32 FLOAT_MIN = 1.175494351e-38f
 Constant for max unsigned int.
const f64 FLOAT_MIN64 = 2.2250738585072014e-308
 Constant for min float.
const f32 HALF_PI = 1.5707963267948966192313216916398f
 Constant for 64bit PI.
const f64 HALF_PI64 = 0.5 * PI64
const f32 ONE_THIRD = 0.3333333333333333333333333333333f
 64bit constant for converting from radians to degrees
const f64 ONE_THIRD64 = 0.3333333333333333333333333333333333333333333333333
 Constant for 1/3.
const f32 PI = 3.1415926535897932384626433832795f
 Constant for 64bit max float.
const f64 PI64 = 3.1415926535897932384626433832795028841971693993751
 Constant for PI.
const f32 RADTODEG = 57.295779513082320876798154814105f
 64bit constant for converting from degrees to radians
const f64 RADTODEG64 = 180.0 / PI64
static const std::string STRING_BLANK = ""
const u32 UNSIGNEDINT_MAX = 0xffffffff
 Constant often used when comparing 64bit float values.

Detailed Description

In this namespace can be found basic classes like vectors, planes, arrays, lists and so on.


Function Documentation

f32 core::abs ( f32  val) [inline]

returns abs of two values. Own implementation to get rid of STL (VS6 problems)

Referenced by abs(), core::plane3d::getIntersectionWithPlane(), and core::matrix4::getRotationDegrees().

f64 core::abs ( f64  val) [inline]

References abs().

f32 core::acos ( f32  val) [inline]

References PI.

Referenced by acos().

f64 core::acos ( f64  val) [inline]

References acos(), and PI64.

f64 core::asin ( f64  val) [inline]

References asin(), and HALF_PI64.

f32 core::asin ( f32  val) [inline]
f32 core::atan ( f32  val) [inline]
f64 core::atan ( f64  val) [inline]

References atan().

f32 core::atan2 ( f32  valy,
f32  valx 
) [inline]
f64 core::atan2 ( f64  valy,
f64  valx 
) [inline]

References atan2().

f32 core::ceil ( f32  val) [inline]

Referenced by ceil(), and ceil64().

f64 core::ceil ( f64  val) [inline]

References ceil().

s32 core::ceil32 ( f32  val) [inline]
s64 core::ceil64 ( f64  val) [inline]

References ceil().

f32 core::clamp ( f32  val,
f32  min,
f32  max 
) [inline]

References max(), and min().

f64 core::clamp ( f64  val,
f64  min,
f64  max 
) [inline]

References max(), and min().

f32 core::cos ( f32  val) [inline]
f64 core::cos ( f64  val) [inline]

References cos().

bool core::equals ( const f32  a,
const f32  b 
) [inline]

returns if a value equals the other one, taking rounding errors into account

References EPSILON.

bool core::equals ( const f64  a,
const f64  b 
) [inline]

References EPSILON64.

f32 core::exp ( f32  val) [inline]

Referenced by exp().

f64 core::exp ( f64  val) [inline]

References exp().

u32 core::fixedToFixed ( u32  value,
u32  n,
u32  p 
) [inline]

Convert N bit color channel value to P bits. It fills P bits with the bit pattern repeated.

f32 core::fixedToFloat ( u32  value,
u32  bits 
) [inline]

Fixed point to float.

Referenced by resource::PixelUtil::unpackColor().

u32 core::floatToFixed ( const f32  value,
const u32  bits 
) [inline]

Convert floating point color channel value between 0.0 and 1.0 (otherwise clamped) to integer of a certain number of bits. Works for any value of bits between 0 and 31.

Referenced by resource::PixelUtil::packColor().

u16 core::floatToHalf ( f32  i) [inline]

Convert a float32 to a float16 (NV_half_float).Courtesy of OpenEXR.

Referenced by resource::PixelUtil::packColor().

std::string core::floatToString ( f32  f) [inline]
f32 core::floor ( f32  val) [inline]

Referenced by floor(), floor32(), and floor64().

f64 core::floor ( f64  val) [inline]

References floor().

s32 core::floor32 ( f32  val) [inline]

References floor().

s64 core::floor64 ( f64  val) [inline]

References floor().

f32 core::halfToFloat ( u16  y) [inline]

Convert a float16 (NV_half_float) to a float32.Courtesy of OpenEXR.

Referenced by resource::PixelUtil::unpackColor().

std::string core::intToString ( u32  i) [inline]
std::string core::intToString ( s32  i) [inline]
f32 core::log ( f32  val) [inline]

Referenced by log(), and engine::LogManager::pushLog().

f64 core::log ( f64  val) [inline]

References log().

f64 core::max ( const f64  a,
const f64  b 
) [inline]
f64 core::max ( const f64  a,
const f64  b,
const f64  c 
) [inline]
f32 core::max ( const f32  a,
const f32  b 
) [inline]

returns maximum of two values. Own implementation to get rid of the STL (VS6 problems)

Referenced by clamp(), render::ShaderParameter::ShaderParameter(), render::Model::updateImpl(), and render::RenderTarget::updateStats().

f32 core::max ( const f32  a,
const f32  b,
const f32  c 
) [inline]

returns maximum of three values.

f64 core::min ( const f64  a,
const f64  b 
) [inline]
f32 core::min ( const f32  a,
const f32  b,
const f32  c 
) [inline]

returns minimum of three values.

f32 core::min ( const f32  a,
const f32  b 
) [inline]

Constant for 64bit 1/3.

returns minimum of two values. Own implementation to get rid of the STL (VS6 problems)

Referenced by clamp(), and render::RenderTarget::updateStats().

f64 core::min ( const f64  a,
const f64  b,
const f64  c 
) [inline]
bool core::powerOfTwo ( u64  num) [inline]
bool core::powerOfTwo ( u32  num) [inline]
f32 core::sin ( f32  val) [inline]
f64 core::sin ( f64  val) [inline]

References sin().

std::vector< std::string > core::splitString ( const std::string &  str,
const std::string &  delims = "\t\n ",
u32  maxSplits = 0 
) [inline]
f32 core::sqr ( f32  val) [inline]
f64 core::sqr ( f64  val) [inline]
f64 core::sqrt ( f64  val) [inline]

References sqrt().

f32 core::sqrt ( f32  val) [inline]
f32 core::stringToFloat ( std::string &  str) [inline]
s32 core::stringToInt ( std::string &  str) [inline]
void core::stringToLower ( std::string &  str) [inline]

Referenced by resource::parseColor().

void core::stringToUpper ( std::string &  str) [inline]
void core::stringTrim ( std::string &  str,
const std::string &  whitespace = " \t\n",
bool  left = true,
bool  right = true 
) [inline]
f32 core::tan ( f32  val) [inline]
f64 core::tan ( f64  val) [inline]

References tan().


Variable Documentation

const f32 core::DEGTORAD = 0.0174532925199432957692369076848f
const f64 core::DEGTORAD64 = PI64 / 180.0
const f32 core::EPSILON = 1.192092896e-07f
const f64 core::EPSILON64 = 2.2204460492503131e-016

Constant often used when comparing float values.

Referenced by equals(), and core::plane3d::getIntersectionWithPlane().

const f32 core::FLOAT_MAX = 3.402823466e+38f

Constant for 64bit min float.

Referenced by physics::HingeJoint::initProperties().

const f64 core::FLOAT_MAX64 = 1.7976931348623158e+308

Constant for max float.

const f32 core::FLOAT_MIN = 1.175494351e-38f

Constant for max unsigned int.

const f64 core::FLOAT_MIN64 = 2.2250738585072014e-308

Constant for min float.

const f32 core::HALF_PI = 1.5707963267948966192313216916398f

Constant for 64bit PI.

Referenced by asin(), core::quaternion::getZDegrees(), and core::quaternion::toEulerAngles().

const f64 core::HALF_PI64 = 0.5 * PI64

Referenced by asin().

const f32 core::ONE_THIRD = 0.3333333333333333333333333333333f

64bit constant for converting from radians to degrees

const f64 core::ONE_THIRD64 = 0.3333333333333333333333333333333333333333333333333

Constant for 1/3.

const f32 core::PI = 3.1415926535897932384626433832795f

Constant for 64bit max float.

Referenced by acos(), and render::Camera::setDirection().

const f64 core::PI64 = 3.1415926535897932384626433832795028841971693993751

Constant for PI.

Referenced by acos().

const f32 core::RADTODEG = 57.295779513082320876798154814105f
const f64 core::RADTODEG64 = 180.0 / PI64
const std::string core::STRING_BLANK = "" [static]
const u32 core::UNSIGNEDINT_MAX = 0xffffffff

Constant often used when comparing 64bit float values.

Referenced by resource::ResourceManager::ResourceManager().


The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:06 by Doxygen (1.7.4)