Tech/LxEngine/Sandbox/Class List

This is a sandbox page containing a rough sketch of the primary namespaces, classes, functions, concepts, design patterns, and general functionality exposed in LxEngine. This is mostly being used as a placeholder until the concepts are fleshed out more fully in the appropriate places in the documentation.

Concepts

 * copy on write
 * named functions
 * caches

lx::core::cast
Provides a safe, explicit casts between unrelated types. A safe alternative to reinterpret_cast<>.

This is useful for conversion between equivalent data type from different software libraries (e.g. simple vector primitives).

Standard C++'s only works on classes related through an inheritance hierarchy. On the other hand, works without any checking on the safety of the operation. Lastly, conversion operators have the disadvantage of being implicit; which can lead to subtle injection of added code.

Math / Geometry


Provide strictly typed, single-precision wrappers on the Ogre::Vector3.

Explicit safe type casts
These types can safely cast between one another using, e.g.

Strict typing

 * E.g. is a valid operation between two  objects, but not valid between two  objects.

GLSL
http://www.khronos.org/files/opengl-quick-reference-card.pdf

Types

 * vec2,3,4 [b|d|i|u]
 * mat2,3,4 [f|d]
 * quat [f|d]

mat sizes: 2x3,2x4,3x2,3x4,4x2,4x3 precisions: highp_int, highp_float, lowp_int, lowp_float, mediump_int, mediump_float

Trig

 * acos(type) -> type
 * acosh(type) -> type
 * asin
 * asinh
 * atan(y,x), atan(y_over_x)
 * atanh
 * cos
 * cosh
 * sin
 * sinh
 * tan
 * tanh

Bit-ops

 * bitCount
 * bitfieldExtract
 * bitfieldInsert
 * bitfieldReverse
 * findLSB
 * findMSB

Conditionals

 * any -> bool
 * all -> bool
 * equal(vecType, vecType) -> vecType
 * lessThan
 * lessThanEqual
 * not_
 * notEqual

General

 * abs(type) -> type
 * ceil
 * clamp(x, min, max)
 * cross
 * degrees
 * determinant(mat)
 * distance
 * dot
 * exp
 * exp2
 * faceforward
 * floatBitsToInt
 * floor
 * fma
 * fract
 * frexp
 * greaterThan
 * greaterThanEqual
 * imulExtended
 * intBitsToFloat
 * inverse
 * inversesqrt
 * isinf
 * isnan
 * ldexp
 * length
 * log
 * log2
 * matrixCompMult
 * max
 * min
 * mix
 * mod
 * modf
 * normalize
 * outerProduct
 * pow
 * radians
 * reflect
 * refract
 * round
 * roundEven
 * sign
 * smoothstep
 * sqrt
 * step
 * transpose
 * trunc
 * uaddCarry
 * umulExtended
 * usubBorrow

diffs from LxEngine: radians strongly typed, vec called tuple, point & vector strongly typed, fixed point precision types

Types


GLM should be used for generalized tuples, matrices, and quaternions

Math

 * ceil
 * floor
 * round
 * exp
 * log
 * max(...)
 * min(...)
 * sqrt
 * pow
 * E
 * PI
 * LN2
 * LN10
 * LOG2E
 * LOG10E
 * SQRT2
 * SQRT1_2
 * min(...)
 * sqrt
 * pow
 * E
 * PI
 * LN2
 * LN10
 * LOG2E
 * LOG10E
 * SQRT2
 * SQRT1_2