Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Namespaces | Functions
E:/Programming/MyProject/K_Game_hg/GameEngine/src/core/Utils.cpp File Reference
#include <core/Utils.h>
#include <algorithm>

Namespaces

namespace  core
 

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


Functions

ENGINE_PUBLIC_EXPORT u32 core::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 core::fixedToFloat (u32 value, u32 bits)
 Fixed point to float.
ENGINE_PUBLIC_EXPORT u32 core::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 core::floatToHalf (f32 i)
 Convert a float32 to a float16 (NV_half_float).Courtesy of OpenEXR.
ENGINE_PUBLIC_EXPORT std::string core::floatToString (f32 f)
ENGINE_PUBLIC_EXPORT f32 core::halfToFloat (u16 y)
 Convert a float16 (NV_half_float) to a float32.Courtesy of OpenEXR.
ENGINE_PUBLIC_EXPORT std::string core::intToString (u32 i)
ENGINE_PUBLIC_EXPORT std::string core::intToString (s32 i)
ENGINE_PUBLIC_EXPORT bool core::powerOfTwo (u64 num)
ENGINE_PUBLIC_EXPORT bool core::powerOfTwo (u32 num)
ENGINE_PUBLIC_EXPORT
std::vector< std::string > 
core::splitString (const std::string &str, const std::string &delims="\t\n ", u32 maxSplits=0)
ENGINE_PUBLIC_EXPORT f32 core::stringToFloat (std::string &str)
ENGINE_PUBLIC_EXPORT s32 core::stringToInt (std::string &str)
ENGINE_PUBLIC_EXPORT void core::stringToLower (std::string &str)
ENGINE_PUBLIC_EXPORT void core::stringToUpper (std::string &str)
ENGINE_PUBLIC_EXPORT void core::stringTrim (std::string &str, const std::string &whitespace=" \t\n", bool left=true, bool right=true)

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)