namespace
Math
Contents
- Reference
Namespaces
- namespace Color
Classes
-
template<typename T>struct AABB
- Axis-aligned bounding box.
-
template<typename T>struct Bounds
- 2D AABB boundaries
- struct Color3f
- RGB Color (0-1)
- struct Color4f
- RGBA Color (0-1)
- class ColorGradient
- Color gradient.
-
template<typename T>class Gradient
- Linear gradient used for animations.
-
template<typename T>class GradientStop
- Value stop within a Gradient.
- struct Mat4
- 4x4 matrix
- struct Scissor
- struct UV
- Describes the uv coordinates of a single quad.
-
template<typename T>struct Vec2
- 2-dimensional vector
-
template<typename T>struct Vec3
- 3-dimensional vector
-
template<typename T>struct Vec4
- 4-dimensional vector
Typedefs
- using AABBf = AABB<float>
- Float AABB.
- using Vec2i = Vec2<int>
- 2-dimensional integer vector
- using Vec2f = Vec2<float>
- 2-dimensional float vector
- using Vec2d = Vec2<double>
- 2-dimensional double vector
- using Vec3i = Vec3<int>
- 3-dimensional integer vector
- using Vec3f = Vec3<float>
- 3-dimensional float vector
- using Vec3d = Vec3<double>
- 3-dimensional double vector
- using Vec4i = Vec4<int>
- 4-dimensional integer vector
- using Vec4f = Vec4<float>
- 4-dimensional float vector
- using Vec4d = Vec4<double>
- 4-dimensional double vector
Functions
- auto deg2rad(double deg) -> double
- Convert degrees to radians.
- auto rad2deg(double rad) -> double
- Convert radians to degrees.
- auto nextPowerOfTwo(unsigned int x) -> unsigned int
- Get the next power of two.
- auto isPowerOfTwo(unsigned int x) -> bool
- Check if a number is a power of two.
-
template<typename T>auto approximatelyEqual(T a, T b, T epsilon) -> T
- Check if two values are 'equal' by at most
epsilon
. -
template<typename T>auto lerp(T v0, T v1, float t) -> T
- Linearly interpolates two elements.
-
template<typename T>auto clamp(T input, T min_, T max_) -> T
- Constrain a value between two others.
-
template<typename T>auto minAngleDifference(T current, T target) -> T
-
template<typename T>auto sign(T input) -> T
- Extract the sign of the parameter.
-
template<typename A, typename B>auto castMinMax(B in) -> A
Variables
- const float DEFAULT_SCISSOR_EXTENT
- static const UV UV_Default
- Default UVs for 2D quads.
Typedef documentation
typedef AABB<float>OrbitEngine:: Math:: AABBf
#include <OE/Math/AABB.hpp>
Float AABB.
typedef Vec2<int>OrbitEngine:: Math:: Vec2i
#include <OE/Math/Vec2.hpp>
2-dimensional integer vector
typedef Vec2<float>OrbitEngine:: Math:: Vec2f
#include <OE/Math/Vec2.hpp>
2-dimensional float vector
typedef Vec2<double>OrbitEngine:: Math:: Vec2d
#include <OE/Math/Vec2.hpp>
2-dimensional double vector
typedef Vec3<int>OrbitEngine:: Math:: Vec3i
#include <OE/Math/Vec3.hpp>
3-dimensional integer vector
typedef Vec3<float>OrbitEngine:: Math:: Vec3f
#include <OE/Math/Vec3.hpp>
3-dimensional float vector
typedef Vec3<double>OrbitEngine:: Math:: Vec3d
#include <OE/Math/Vec3.hpp>
3-dimensional double vector
typedef Vec4<int>OrbitEngine:: Math:: Vec4i
#include <OE/Math/Vec4.hpp>
4-dimensional integer vector
typedef Vec4<float>OrbitEngine:: Math:: Vec4f
#include <OE/Math/Vec4.hpp>
4-dimensional float vector
typedef Vec4<double>OrbitEngine:: Math:: Vec4d
#include <OE/Math/Vec4.hpp>
4-dimensional double vector
Function documentation
double OrbitEngine:: Math:: deg2rad(double deg)
#include <OE/Math/Math.hpp>
Convert degrees to radians.
double OrbitEngine:: Math:: rad2deg(double rad)
#include <OE/Math/Math.hpp>
Convert radians to degrees.
unsigned int OrbitEngine:: Math:: nextPowerOfTwo(unsigned int x)
#include <OE/Math/Math.hpp>
Get the next power of two.
bool OrbitEngine:: Math:: isPowerOfTwo(unsigned int x)
#include <OE/Math/Math.hpp>
Check if a number is a power of two.
#include <OE/Math/Math.hpp>
template<typename T>
T OrbitEngine:: Math:: approximatelyEqual(T a,
T b,
T epsilon)
Check if two values are 'equal' by at most epsilon
.
#include <OE/Math/Math.hpp>
template<typename T>
T OrbitEngine:: Math:: lerp(T v0,
T v1,
float t)
Linearly interpolates two elements.
#include <OE/Math/Math.hpp>
template<typename T>
T OrbitEngine:: Math:: clamp(T input,
T min_,
T max_)
Constrain a value between two others.
#include <OE/Math/Math.hpp>
template<typename T>
T OrbitEngine:: Math:: minAngleDifference(T current,
T target)
Returns the smallest difference between two angles
#include <OE/Math/Math.hpp>
template<typename T>
T OrbitEngine:: Math:: sign(T input)
Extract the sign of the parameter.
#include <OE/Math/Math.hpp>
template<typename A, typename B>
A OrbitEngine:: Math:: castMinMax(B in)
Variable documentation
const float OrbitEngine:: Math:: DEFAULT_SCISSOR_EXTENT
#include <OE/Math/Scissor.hpp>
static const UV OrbitEngine:: Math:: UV_Default
#include <OE/Math/UV.hpp>
Default UVs for 2D quads.