Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
Math Support

Math Support Functionality, e.g. More...

Classes

class  jau::math::geom::AABBox2f
 Axis Aligned Bounding Box. More...
 
class  jau::math::geom::AABBox3f
 Axis Aligned Bounding Box. More...
 
class  jau::math::geom::plane::AffineTransform
 Represents a affine 2x3 transformation matrix in column major order (memory layout). More...
 
class  jau::math::geom::AGeom2f
 Animated geometric object. More...
 
class  jau::math::geom::Disk2f
 
class  jau::math::FovHVHalves
 Horizontal and vertical field of view (FOV) halves, allowing a non-centered projection. More...
 
class  jau::math::geom::Frustum
 Providing frustum planes derived by different inputs (P*MV, ..) used to classify objects. More...
 
class  jau::math::geom::Geom2f
 Geometric object. More...
 
class  jau::math::geom::LineSeg2f
 
struct  jau::math::geom::LineSeg3f
 
class  jau::math::geom::LineStrip2f
 A clockwise (CW) polyline. More...
 
class  jau::math::MathDivByZeroError
 math_error_t::div_by_zero, i.e. More...
 
class  jau::math::MathDomainError
 math_error_t::invalid More...
 
class  jau::math::MathError
 
class  jau::math::MathErrorBase
 
class  jau::math::MathInexactError
 math_error_t::inexact More...
 
class  jau::math::MathOverflowError
 math_error_t::overflow More...
 
class  jau::math::MathRuntimeErrorBase
 
class  jau::math::MathUnderflowError
 math_error_t::underflow More...
 
class  jau::math::Matrix4< Value_type, >
 Basic 4x4 value_type matrix implementation using fields for intensive use-cases (host operations). More...
 
class  jau::math::util::MatrixStack< Value_type, >
 A Matrix stack of compounds, each consisting of 16 * T More...
 
class  jau::math::util::PMVMatrix4< Value_type, >
 PMVMatrix4 implements the basic computer graphics Matrix4 pack using projection (P), modelview (Mv) and texture (T) Matrix4 operations. More...
 
class  jau::math::Quaternion< Value_type, >
 Quaternion implementation supporting Gimbal-Lock free rotations. More...
 
class  jau::math::Ray2F< Value_type, >
 Simple compound denoting a ray. More...
 
class  jau::math::Ray3F< Value_type, >
 Simple compound denoting a ray. More...
 
class  jau::math::geom::Rect2f
 
class  jau::math::RectI< Value_type, >
 Rectangle with x, y, width and height value_type components. More...
 
class  jau::math::util::SimpleStack< Value_type, Element_size, >
 A simple stack of compounds, each consisting of element_size * T More...
 
class  jau::math::util::SyncBuffer
 Convenient tuple of a sync_action_t and data buffer. More...
 
class  jau::math::util::SyncMatrices4< Value_type, >
 SyncBuffer interface with multiple underlying Matrix4. More...
 
class  jau::math::util::SyncMatrix4< Value_type, >
 SyncBuffer interface with a single underlying Matrix4. More...
 
class  jau::math::Vector2F< Value_type, >
 2D vector using two value_type components. More...
 
class  jau::math::Vector2I< Value_type, >
 2D vector using two value_type components. More...
 
class  jau::math::Vector3F< Value_type, >
 3D vector using three value_type components. More...
 
class  jau::math::Vector4F< Value_type, >
 4D vector using four value_type components. More...
 

Typedefs

typedef std::vector< AGeom2f_refjau::math::geom::AGeom2f_list
 
typedef std::shared_ptr< AGeom2fjau::math::geom::AGeom2f_ref
 
typedef std::shared_ptr< Disk2fjau::math::geom::Disk2f_ref
 
typedef std::vector< Geom2f_refjau::math::geom::Geom2f_list
 
typedef std::shared_ptr< Geom2fjau::math::geom::Geom2f_ref
 
typedef std::shared_ptr< LineStrip2fjau::math::geom::LineStrip2f_ref
 
typedef Matrix4< float > jau::math::Mat4f
 
typedef MatrixStack< float > jau::math::util::Mat4fStack
 4x4 float matrix stack
 
typedef PMVMatrix4< float > jau::math::util::PMVMat4f
 
template<typename Value_type, std::enable_if_t< std::is_floating_point_v< Value_type > &&sizeof(Value_type)==alignof(Value_type), bool > = true>
using jau::math::Point2F = Vector2F<Value_type>
 Point2F alias of Vector2F.
 
typedef Point2F< float > jau::math::Point2f
 
template<typename Value_type, std::enable_if_t< std::numeric_limits< Value_type >::is_integer &&sizeof(Value_type)==alignof(Value_type), bool > = true>
using jau::math::Point2I = Vector2I<Value_type>
 Point2I alias of Vector2I.
 
typedef Point2I< int > jau::math::Point2i
 
template<typename Value_type, std::enable_if_t< std::is_floating_point_v< Value_type > &&sizeof(Value_type)==alignof(Value_type), bool > = true>
using jau::math::Point3F = Vector3F<Value_type>
 Point3F alias of Vector3F.
 
typedef Point3F< float > jau::math::Point3f
 
template<typename Value_type, std::enable_if_t< std::is_floating_point_v< Value_type > &&sizeof(Value_type)==alignof(Value_type), bool > = true>
using jau::math::Point4F = Vector4F<Value_type>
 Point4F alias of Vector4F.
 
typedef Point4F< float > jau::math::Point4f
 
typedef Quaternion< float > jau::math::Quat4f
 
typedef Ray2F< float > jau::math::Ray2f
 
typedef Ray3F< float > jau::math::Ray3f
 
typedef std::shared_ptr< Rect2fjau::math::geom::Rect2f_ref
 
typedef RectI< int > jau::math::Recti
 
typedef SimpleStack< float, 16 > jau::math::util::Stack16f
 4x4 float matrix stack based on single float elements
 
typedef void(* jau::math::util::sync_action_fptr) ()
 Plain function pointer type matching sync_action_t.
 
typedef jau::function< void()> jau::math::util::sync_action_t
 Specific data synchronization action implemented by the data provider to update the buffer with the underlying data before usage, e.g.
 
typedef SyncMatrix4< float > jau::math::util::SyncMat4f
 
typedef SyncMatrices4< float > jau::math::util::SyncMats4f
 
typedef Vector2F< float > jau::math::Vec2f
 
typedef Vector2I< int > jau::math::Vec2i
 
typedef Vector3F< float > jau::math::Vec3f
 
typedef jau::darray< Vec3f, jau::nsize_tjau::math::geom::Vec3fList
 
typedef Vector4F< float > jau::math::Vec4f
 

Enumerations

enum class  jau::math::geom::plane::AffineTransformType : uint16_t {
  jau::math::geom::plane::AffineTransformType::unknown = 0 , jau::math::geom::plane::AffineTransformType::identity = 1 << 0 , jau::math::geom::plane::AffineTransformType::translation = 1 << 1 , jau::math::geom::plane::AffineTransformType::uniform_scale = 1 << 2 ,
  jau::math::geom::plane::AffineTransformType::general_scale = 1 << 3 , jau::math::geom::plane::AffineTransformType::quadrant_rotation = 1 << 4 , jau::math::geom::plane::AffineTransformType::general_rotation = 1 << 5 , jau::math::geom::plane::AffineTransformType::general_transform = 1 << 6 ,
  jau::math::geom::plane::AffineTransformType::flip = 1 << 7 , jau::math::geom::plane::AffineTransformType::mask_scale = uniform_scale | general_scale , jau::math::geom::plane::AffineTransformType::mask_rotation = quadrant_rotation | general_rotation
}
 
enum class  jau::math::math_error_t : uint16_t {
  jau::math::math_error_t::none = 0 , jau::math::math_error_t::invalid , jau::math::math_error_t::div_by_zero , jau::math::math_error_t::overflow ,
  jau::math::math_error_t::underflow , jau::math::math_error_t::inexact , jau::math::math_error_t::undefined = 1U << 15
}
 Error types as specified by C++ Math Error Handling More...
 
enum class  jau::math::geom::orientation_t : uint16_t { jau::math::geom::orientation_t::COL , jau::math::geom::orientation_t::CW , jau::math::geom::orientation_t::CCW }
 
enum class  jau::math::geom::Winding : uint16_t { jau::math::geom::Winding::CW , jau::math::geom::Winding::CCW }
 

Functions

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector2F< T > jau::math::abs (const Vector2F< T > &lhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector2I< T > jau::math::abs (const Vector2I< T > &lhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector3F< T > jau::math::abs (const Vector3F< T > &lhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector4F< T > jau::math::abs (const Vector4F< T > &lhs) noexcept
 
constexpr double jau::math::geom::area2D (const Vec3fList &vertices) noexcept
 Computes the area of a list of vertices via shoelace formula.
 
constexpr Winding jau::math::geom::get2DWinding (const Vec3f &a, const Vec3f &b, const Vec3f &c) noexcept
 Compute the winding of the 3 given points.
 
constexpr Winding jau::math::geom::getArea2DWinding (const Vec3fList &vertices) noexcept
 Compute the winding using the area2D() function over all vertices for complex shapes.
 
constexpr jau::math::Vec3f jau::math::util::getEulerAngleOrientation (const jau::math::Vec3f &eulerRotation) noexcept
 Returns an orientation vector for given eurler X/Y/Z angles in radians.
 
constexpr float jau::math::util::getOrthoWinZ (float orthoZ, float zNear, float zFar) noexcept
 Returns orthogonal distance (1f/zNear-1f/orthoZ) / (1f/zNear-1f/zFar);.
 
Quatjau::math::Matrix4< Value_type, >::getRotation (Quat &res) const noexcept
 Returns the rotation [m00 .
 
constexpr float jau::math::util::getZBufferEpsilon (int zBits, float z, float zNear) noexcept
 Returns resolution of Z buffer of given parameter, see Love Your Z-Buffer.
 
constexpr int jau::math::util::getZBufferValue (int zBits, float z, float zNear, float zFar) noexcept
 Returns Z buffer value of given parameter, see Love Your Z-Buffer.
 
constexpr double jau::math::geom::inCircle2DVal (const Vec3f &a, const Vec3f &b, const Vec3f &c, const Vec3f &d) noexcept
 
constexpr bool jau::math::geom::is2DCCW (const Vec3f &a, const Vec3f &b, const Vec3f &c) noexcept
 Check if points are in ccw order.
 
constexpr bool jau::math::geom::isInCircle2D (const Vec3f &a, const Vec3f &b, const Vec3f &c, const Vec3f &d) noexcept
 Check if vertices in triangle circumcircle given d vertex, from paper by Guibas and Stolfi (1985).
 
constexpr bool jau::math::geom::isInTriangle3 (const Vec3f &a, const Vec3f &b, const Vec3f &c, const Vec3f &p1, const Vec3f &p2, const Vec3f &p3) noexcept
 Check if one of three vertices are in triangle using barycentric coordinates computation.
 
 jau::math::geom::plane::JAU_MAKE_BITFIELD_ENUM_STRING (AffineTransformType, identity, translation, uniform_scale, general_scale, quadrant_rotation, general_rotation, general_transform, flip)
 
 jau::math::geom::JAU_MAKE_ENUM_STRING (orientation_t, COL, CW, CCW)
 
 jau::math::geom::JAU_MAKE_ENUM_STRING (Winding, CW, CCW)
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector2F< T > jau::math::max (const Vector2F< T > &lhs, const Vector2F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
constexpr Vector2I< T > jau::math::max (const Vector2I< T > &lhs, const Vector2I< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector3F< T > jau::math::max (const Vector3F< T > &lhs, const Vector3F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector4F< T > jau::math::max (const Vector4F< T > &lhs, const Vector4F< T > &rhs) noexcept
 
constexpr Vec3f jau::math::geom::midpoint (const Vec3f &a, const Vec3f &b) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector2F< T > jau::math::min (const Vector2F< T > &lhs, const Vector2F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
constexpr Vector2I< T > jau::math::min (const Vector2I< T > &lhs, const Vector2I< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector3F< T > jau::math::min (const Vector3F< T > &lhs, const Vector3F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector4F< T > jau::math::min (const Vector4F< T > &lhs, const Vector4F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
constexpr Vector2I< T > jau::math::operator* (const float s, const Vector2I< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Matrix4< T > jau::math::operator* (const Matrix4< T > &lhs, const Matrix4< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Matrix4< T > jau::math::operator* (const Matrix4< T > &lhs, const T s) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Quaternion< T > jau::math::operator* (const Quaternion< T > &lhs, const Quaternion< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Quaternion< T > jau::math::operator* (const Quaternion< T > &lhs, const T s) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Matrix4< T > jau::math::operator* (const T s, const Matrix4< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Quaternion< T > jau::math::operator* (const T s, const Quaternion< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector2F< T > jau::math::operator* (const T s, const Vector2F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector3F< T > jau::math::operator* (const T s, const Vector3F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector4F< T > jau::math::operator* (const T s, const Vector4F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector2F< T > jau::math::operator* (const Vector2F< T > &lhs, const T s) noexcept
 
template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
constexpr Vector2I< T > jau::math::operator* (const Vector2I< T > &lhs, const float s) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector3F< T > jau::math::operator* (const Vector3F< T > &lhs, const T s) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector4F< T > jau::math::operator* (const Vector4F< T > &lhs, const T s) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Quaternion< T > jau::math::operator+ (const Quaternion< T > &lhs, const Quaternion< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector2F< T > jau::math::operator+ (const Vector2F< T > &lhs, const Vector2F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
constexpr Vector2I< T > jau::math::operator+ (const Vector2I< T > &lhs, const Vector2I< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector3F< T > jau::math::operator+ (const Vector3F< T > &lhs, const Vector3F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector4F< T > jau::math::operator+ (const Vector4F< T > &lhs, const Vector4F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Quaternion< T > jau::math::operator- (const Quaternion< T > &lhs, const Quaternion< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector2F< T > jau::math::operator- (const Vector2F< T > &lhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector2F< T > jau::math::operator- (const Vector2F< T > &lhs, const Vector2F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
constexpr Vector2I< T > jau::math::operator- (const Vector2I< T > &lhs) noexcept
 
template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
constexpr Vector2I< T > jau::math::operator- (const Vector2I< T > &lhs, const Vector2I< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector3F< T > jau::math::operator- (const Vector3F< T > &lhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector3F< T > jau::math::operator- (const Vector3F< T > &lhs, const Vector3F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector4F< T > jau::math::operator- (const Vector4F< T > &lhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector4F< T > jau::math::operator- (const Vector4F< T > &lhs, const Vector4F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector2F< T > jau::math::operator/ (const T s, const Vector2F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector2I< T > jau::math::operator/ (const T s, const Vector2I< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector3F< T > jau::math::operator/ (const T s, const Vector3F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector4F< T > jau::math::operator/ (const T s, const Vector4F< T > &rhs) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector2F< T > jau::math::operator/ (const Vector2F< T > &lhs, const T s) noexcept
 
template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
constexpr Vector2I< T > jau::math::operator/ (const Vector2I< T > &lhs, const float s) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector3F< T > jau::math::operator/ (const Vector3F< T > &lhs, const T s) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector4F< T > jau::math::operator/ (const Vector4F< T > &lhs, const T s) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< (std::ostream &out, const Matrix4< T > &v) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< (std::ostream &out, const Quaternion< T > &v) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< (std::ostream &out, const Ray2F< T > &v) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< (std::ostream &out, const Ray3F< T > &v) noexcept
 
template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
std::ostream & jau::math::operator<< (std::ostream &out, const RectI< T > &v) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< (std::ostream &out, const Vector2F< T > &v) noexcept
 
template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
std::ostream & jau::math::operator<< (std::ostream &out, const Vector2I< T > &v) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< (std::ostream &out, const Vector3F< T > &v) noexcept
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< (std::ostream &out, const Vector4F< T > &v) noexcept
 
template<typename Value_type, std::enable_if_t< std::is_floating_point_v< Value_type >, bool > = true>
std::ostream & jau::math::util::operator<< (std::ostream &out, const PMVMatrix4< Value_type > &v) noexcept
 
constexpr orientation_t jau::math::geom::orientation (const Point2f &a, const Point2f &b, const Point2f &c) noexcept
 Return the orientation of the given point triplet a, b and c using triArea()
 
Matrix4jau::math::Matrix4< Value_type, >::setToRotation (const Quat &q)
 Set this matrix to rotation using the given Quaternion.
 
constexpr double jau::math::geom::sqlend (double x, double y) noexcept
 
constexpr bool jau::math::geom::testSeg2SegIntersection2D (const Vec3f &p, const Vec3f &p2, const Vec3f &q, const Vec3f &q2) noexcept
 2D line segment intersection test w/o considering collinear-case
 
constexpr bool jau::math::geom::testSeg2SegIntersection2D (Vec2f *result, const Vec2f &p, const Vec2f &p2, const Vec2f &q, const Vec2f &q2, const bool do_collinear=false) noexcept
 See p + t r = q + u s and its terse C# implementation
 
constexpr bool jau::math::geom::testTri2SegIntersection2D (const Vec3f &a, const Vec3f &b, const Vec3f &c, const Vec3f &d, const Vec3f &e)
 Check if a segment intersects with a triangle using FloatUtil#EPSILON w/o considering collinear-case.
 
std::string jau::math::to_string (const math_error_t v) noexcept
 Returns std::string representation of math_error_t.
 
template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
constexpr Vector3F< T > jau::math::to_vec3 (const Vector4F< T > &v) noexcept
 out = { this.x, this.y, this.z } dropping w, returns out.
 
constexpr double jau::math::geom::tri_area (const Point2f &a, const Point2f &b, const Point2f &c)
 Computes oriented double area of a triangle, i.e.
 
constexpr double jau::math::geom::triArea (double ax, double ay, double bx, double by, double cx, double cy) noexcept
 
constexpr double jau::math::geom::triArea (float ax, float ay, float bx, float by, float cx, float cy) noexcept
 
constexpr double jau::math::geom::triArea2D (const Vec3f &a, const Vec3f &b, const Vec3f &c) noexcept
 Computes oriented double area of a triangle, i.e.
 

Detailed Description

Math Support Functionality, e.g.

linear algebra, meta group

Further support is coming from

Typedef Documentation

◆ Geom2f_ref

typedef std::shared_ptr<Geom2f> jau::math::geom::Geom2f_ref

Definition at line 154 of file geom2f.hpp.

◆ Geom2f_list

Definition at line 155 of file geom2f.hpp.

◆ AGeom2f_ref

typedef std::shared_ptr<AGeom2f> jau::math::geom::AGeom2f_ref

Definition at line 408 of file geom2f.hpp.

◆ AGeom2f_list

Definition at line 409 of file geom2f.hpp.

◆ Disk2f_ref

typedef std::shared_ptr<Disk2f> jau::math::geom::Disk2f_ref

Definition at line 498 of file geom2f.hpp.

◆ Rect2f_ref

typedef std::shared_ptr<Rect2f> jau::math::geom::Rect2f_ref

Definition at line 701 of file geom2f.hpp.

◆ LineStrip2f_ref

Definition at line 842 of file geom2f.hpp.

◆ Vec3fList

◆ Mat4f

typedef Matrix4<float> jau::math::Mat4f
Examples
GearsES2.cpp, GearsES2.hpp, GraphShapes01.cpp, and Primitives02.cpp.

Definition at line 1973 of file mat4f.hpp.

◆ Quat4f

typedef Quaternion<float> jau::math::Quat4f
Examples
GraphShapes01.cpp, and Primitives02.cpp.

Definition at line 1186 of file quaternion.hpp.

◆ Recti

typedef RectI<int> jau::math::Recti
Examples
GearsES2.hpp, GraphShapes01.cpp, Primitives02.cpp, and RedSquareES2.hpp.

Definition at line 139 of file recti.hpp.

◆ PMVMat4f

◆ Stack16f

4x4 float matrix stack based on single float elements

Definition at line 95 of file sstack.hpp.

◆ Mat4fStack

4x4 float matrix stack

Definition at line 152 of file sstack.hpp.

◆ sync_action_t

Specific data synchronization action implemented by the data provider to update the buffer with the underlying data before usage, e.g.

uploading the GLUniformData data to the GPU.

Definition at line 34 of file syncbuffer.hpp.

◆ sync_action_fptr

typedef void(* jau::math::util::sync_action_fptr) ()

Plain function pointer type matching sync_action_t.

Definition at line 37 of file syncbuffer.hpp.

◆ SyncMat4f

Definition at line 118 of file syncbuffer.hpp.

◆ SyncMats4f

Definition at line 158 of file syncbuffer.hpp.

◆ Vec2f

typedef Vector2F<float> jau::math::Vec2f

Definition at line 416 of file vec2f.hpp.

◆ Point2F

template<typename Value_type, std::enable_if_t< std::is_floating_point_v< Value_type > &&sizeof(Value_type)==alignof(Value_type), bool > = true>
using jau::math::Point2F = Vector2F<Value_type>

Point2F alias of Vector2F.

Definition at line 429 of file vec2f.hpp.

◆ Point2f

typedef Point2F<float> jau::math::Point2f

Definition at line 431 of file vec2f.hpp.

◆ Ray2f

typedef Ray2F<float> jau::math::Ray2f

Definition at line 483 of file vec2f.hpp.

◆ Vec2i

typedef Vector2I<int> jau::math::Vec2i
Examples
GearsES2.cpp.

Definition at line 328 of file vec2i.hpp.

◆ Point2I

template<typename Value_type, std::enable_if_t< std::numeric_limits< Value_type >::is_integer &&sizeof(Value_type)==alignof(Value_type), bool > = true>
using jau::math::Point2I = Vector2I<Value_type>

Point2I alias of Vector2I.

Definition at line 341 of file vec2i.hpp.

◆ Point2i

Definition at line 343 of file vec2i.hpp.

◆ Vec3f

typedef Vector3F<float> jau::math::Vec3f
Examples
GearsES2.cpp, GearsES2.hpp, GraphShapes01.cpp, and Primitives02.cpp.

Definition at line 436 of file vec3f.hpp.

◆ Point3F

template<typename Value_type, std::enable_if_t< std::is_floating_point_v< Value_type > &&sizeof(Value_type)==alignof(Value_type), bool > = true>
using jau::math::Point3F = Vector3F<Value_type>

Point3F alias of Vector3F.

Definition at line 449 of file vec3f.hpp.

◆ Point3f

typedef Point3F<float> jau::math::Point3f

Definition at line 451 of file vec3f.hpp.

◆ Ray3f

typedef Ray3F<float> jau::math::Ray3f
Examples
GearsES2.cpp.

Definition at line 502 of file vec3f.hpp.

◆ Vec4f

typedef Vector4F<float> jau::math::Vec4f
Examples
GearsES2.hpp, GraphShapes01.cpp, and Primitives02.cpp.

Definition at line 375 of file vec4f.hpp.

◆ Point4F

template<typename Value_type, std::enable_if_t< std::is_floating_point_v< Value_type > &&sizeof(Value_type)==alignof(Value_type), bool > = true>
using jau::math::Point4F = Vector4F<Value_type>

Point4F alias of Vector4F.

Definition at line 388 of file vec4f.hpp.

◆ Point4f

typedef Point4F<float> jau::math::Point4f

Definition at line 390 of file vec4f.hpp.

Enumeration Type Documentation

◆ orientation_t

enum class jau::math::geom::orientation_t : uint16_t
strong
Enumerator
COL 

Collinear.

CW 

Clockwise.

CCW 

Counter-Clockwise.

Definition at line 25 of file geom.hpp.

◆ Winding

enum class jau::math::geom::Winding : uint16_t
strong
Enumerator
CW 

Clockwise.

CCW 

Counter-Clockwise.

Definition at line 35 of file geom.hpp.

◆ AffineTransformType

enum class jau::math::geom::plane::AffineTransformType : uint16_t
strong
Enumerator
unknown 

The AffineTransformType::unknown is the initial value.

identity 
translation 
uniform_scale 
general_scale 
quadrant_rotation 
general_rotation 
general_transform 
flip 
mask_scale 
mask_rotation 

Definition at line 31 of file affine_transform.hpp.

◆ math_error_t

enum class jau::math::math_error_t : uint16_t
strong

Error types as specified by C++ Math Error Handling

Enumerator
none 

no math error

invalid 

See FE_INVALID, i.e.

MathDomainError, std::domain_error : std::logic_error

div_by_zero 

See FE_DIVBYZERO, i.e.

MathDivByZeroError, std::domain_error : std::logic_error

overflow 

See FE_OVERFLOW, i.e.

MathOverflowError, std::overflow_error : std::runtime_error

underflow 

See FE_UNDERFLOW, i.e.

MathUnderflowError, std::underflow_error : std::runtime_error

inexact 

See FE_INEXACT, i.e.

MathInexactError, std::runtime_error

undefined 

undefined math error

Definition at line 33 of file math_error.hpp.

Function Documentation

◆ JAU_MAKE_ENUM_STRING() [1/2]

jau::math::geom::JAU_MAKE_ENUM_STRING ( orientation_t ,
COL ,
CW ,
CCW  )

◆ JAU_MAKE_ENUM_STRING() [2/2]

jau::math::geom::JAU_MAKE_ENUM_STRING ( Winding ,
CW ,
CCW  )

◆ tri_area()

double jau::math::geom::tri_area ( const Point2f & a,
const Point2f & b,
const Point2f & c )
constexpr

Computes oriented double area of a triangle, i.e.

the 2x2 determinant with b-a and c-a per column.

      | bx-ax, cx-ax |
det = | by-ay, cy-ay |
Parameters
afirst vertex
bsecond vertex
cthird vertex
Returns
area > 0 CCW, ..

Definition at line 42 of file geom2f.hpp.

Here is the caller graph for this function:

◆ orientation()

orientation_t jau::math::geom::orientation ( const Point2f & a,
const Point2f & b,
const Point2f & c )
constexprnoexcept

Return the orientation of the given point triplet a, b and c using triArea()

Definition at line 49 of file geom2f.hpp.

◆ testSeg2SegIntersection2D() [1/2]

bool jau::math::geom::testSeg2SegIntersection2D ( Vec2f * result,
const Vec2f & p,
const Vec2f & p2,
const Vec2f & q,
const Vec2f & q2,
const bool do_collinear = false )
constexprnoexcept

See p + t r = q + u s and its terse C# implementation

Definition at line 61 of file geom2f.hpp.

Here is the caller graph for this function:

◆ midpoint()

Vec3f jau::math::geom::midpoint ( const Vec3f & a,
const Vec3f & b )
constexprnoexcept

Definition at line 126 of file geom3f.hpp.

◆ isInTriangle3()

bool jau::math::geom::isInTriangle3 ( const Vec3f & a,
const Vec3f & b,
const Vec3f & c,
const Vec3f & p1,
const Vec3f & p2,
const Vec3f & p3 )
constexprnoexcept

Check if one of three vertices are in triangle using barycentric coordinates computation.

Parameters
afirst triangle vertex
bsecond triangle vertex
cthird triangle vertex
p1the vertex in question
p2the vertex in question
p3the vertex in question
Returns
true if p1 or p2 or p3 is in triangle (a, b, c), false otherwise.

Definition at line 140 of file geom3f.hpp.

◆ area2D()

double jau::math::geom::area2D ( const Vec3fList & vertices)
constexprnoexcept

Computes the area of a list of vertices via shoelace formula.

This method is utilized e.g. to reliably compute the Winding of complex shapes.

Implementation uses double precision.

Parameters
vertices
Returns
positive area if ccw else negative area value
See also
#getWinding()

Definition at line 45 of file geom3f2D.hpp.

Here is the caller graph for this function:

◆ getArea2DWinding()

Winding jau::math::geom::getArea2DWinding ( const Vec3fList & vertices)
constexprnoexcept

Compute the winding using the area2D() function over all vertices for complex shapes.

Uses the area(List) function over all points on complex shapes for a reliable result!

Implementation uses double precision.

Parameters
verticesarray of Vertices
Returns
Winding::CCW or Winding::CLW
See also
area2D()

Definition at line 68 of file geom3f2D.hpp.

◆ sqlend()

double jau::math::geom::sqlend ( double x,
double y )
constexprnoexcept

Definition at line 73 of file geom3f2D.hpp.

Here is the caller graph for this function:

◆ triArea() [1/2]

double jau::math::geom::triArea ( double ax,
double ay,
double bx,
double by,
double cx,
double cy )
constexprnoexcept

Definition at line 76 of file geom3f2D.hpp.

Here is the caller graph for this function:

◆ triArea() [2/2]

double jau::math::geom::triArea ( float ax,
float ay,
float bx,
float by,
float cx,
float cy )
constexprnoexcept

Definition at line 79 of file geom3f2D.hpp.

◆ triArea2D()

double jau::math::geom::triArea2D ( const Vec3f & a,
const Vec3f & b,
const Vec3f & c )
constexprnoexcept

Computes oriented double area of a triangle, i.e.

the 2x2 determinant with b-a and c-a per column.

      | bx-ax, cx-ax |
det = | by-ay, cy-ay |
Parameters
afirst vertex
bsecond vertex
cthird vertex
Returns
area > 0 CCW, ..

Definition at line 94 of file geom3f2D.hpp.

Here is the caller graph for this function:

◆ inCircle2DVal()

double jau::math::geom::inCircle2DVal ( const Vec3f & a,
const Vec3f & b,
const Vec3f & c,
const Vec3f & d )
constexprnoexcept

Definition at line 97 of file geom3f2D.hpp.

Here is the caller graph for this function:

◆ isInCircle2D()

bool jau::math::geom::isInCircle2D ( const Vec3f & a,
const Vec3f & b,
const Vec3f & c,
const Vec3f & d )
constexprnoexcept

Check if vertices in triangle circumcircle given d vertex, from paper by Guibas and Stolfi (1985).

Implementation uses double precision.

Parameters
atriangle vertex 1
btriangle vertex 2
ctriangle vertex 3
dvertex in question
Returns
true if the vertex d is inside the circle defined by the vertices a, b, c.

Definition at line 117 of file geom3f2D.hpp.

◆ is2DCCW()

bool jau::math::geom::is2DCCW ( const Vec3f & a,
const Vec3f & b,
const Vec3f & c )
constexprnoexcept

Check if points are in ccw order.

Consider using getWinding(List) using the area(List) function over all points on complex shapes for a reliable result!

Parameters
afirst vertex
bsecond vertex
cthird vertex
Returns
true if the points a,b,c are in a ccw order
See also
#getWinding(List)

Definition at line 133 of file geom3f2D.hpp.

Here is the caller graph for this function:

◆ get2DWinding()

Winding jau::math::geom::get2DWinding ( const Vec3f & a,
const Vec3f & b,
const Vec3f & c )
constexprnoexcept

Compute the winding of the 3 given points.

Consider using getWinding(List) using the area(List) function over all points on complex shapes for a reliable result!

Parameters
afirst vertex
bsecond vertex
cthird vertex
Returns
Winding#CCW or Winding#CW
See also
#getWinding(List)

Definition at line 149 of file geom3f2D.hpp.

◆ testSeg2SegIntersection2D() [2/2]

bool jau::math::geom::testSeg2SegIntersection2D ( const Vec3f & p,
const Vec3f & p2,
const Vec3f & q,
const Vec3f & q2 )
constexprnoexcept

2D line segment intersection test w/o considering collinear-case

See p + t r = q + u s and its terse C# implementation

Implementation uses float precision.

Parameters
pvertex 1 of first segment
p2vertex 2 of first segment
qvertex 1 of second segment
q2vertex 2 of second segment
Returns
true if line segments are intersecting, otherwise false

Definition at line 168 of file geom3f2D.hpp.

◆ testTri2SegIntersection2D()

bool jau::math::geom::testTri2SegIntersection2D ( const Vec3f & a,
const Vec3f & b,
const Vec3f & c,
const Vec3f & d,
const Vec3f & e )
constexpr

Check if a segment intersects with a triangle using FloatUtil#EPSILON w/o considering collinear-case.

Implementation uses float precision.

Parameters
avertex 1 of the triangle
bvertex 2 of the triangle
cvertex 3 of the triangle
dvertex 1 of first segment
evertex 2 of first segment
Returns
true if the segment intersects at least one segment of the triangle, false otherwise
See also
#testSeg2SegIntersection(Vert2fImmutable, Vert2fImmutable, Vert2fImmutable, Vert2fImmutable, float, boolean)

Definition at line 220 of file geom3f2D.hpp.

◆ JAU_MAKE_BITFIELD_ENUM_STRING()

jau::math::geom::plane::JAU_MAKE_BITFIELD_ENUM_STRING ( AffineTransformType ,
identity ,
translation ,
uniform_scale ,
general_scale ,
quadrant_rotation ,
general_rotation ,
general_transform ,
flip  )

◆ operator*() [1/14]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Matrix4< T > jau::math::operator* ( const Matrix4< T > & lhs,
const Matrix4< T > & rhs )
constexprnoexcept

Definition at line 1951 of file mat4f.hpp.

Here is the caller graph for this function:

◆ operator*() [2/14]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Matrix4< T > jau::math::operator* ( const Matrix4< T > & lhs,
const T s )
constexprnoexcept

Definition at line 1957 of file mat4f.hpp.

◆ operator*() [3/14]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Matrix4< T > jau::math::operator* ( const T s,
const Matrix4< T > & rhs )
constexprnoexcept

Definition at line 1963 of file mat4f.hpp.

◆ operator<<() [1/10]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< ( std::ostream & out,
const Matrix4< T > & v )
noexcept

Definition at line 1969 of file mat4f.hpp.

◆ to_string()

std::string jau::math::to_string ( const math_error_t v)
noexcept

Returns std::string representation of math_error_t.

Definition at line 906 of file basic_types.cpp.

Here is the caller graph for this function:

◆ operator+() [1/5]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Quaternion< T > jau::math::operator+ ( const Quaternion< T > & lhs,
const Quaternion< T > & rhs )
constexprnoexcept

Definition at line 1152 of file quaternion.hpp.

Here is the caller graph for this function:

◆ operator-() [1/9]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Quaternion< T > jau::math::operator- ( const Quaternion< T > & lhs,
const Quaternion< T > & rhs )
constexprnoexcept

Definition at line 1158 of file quaternion.hpp.

Here is the caller graph for this function:

◆ operator*() [4/14]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Quaternion< T > jau::math::operator* ( const Quaternion< T > & lhs,
const Quaternion< T > & rhs )
constexprnoexcept

Definition at line 1164 of file quaternion.hpp.

◆ operator*() [5/14]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Quaternion< T > jau::math::operator* ( const Quaternion< T > & lhs,
const T s )
constexprnoexcept

Definition at line 1170 of file quaternion.hpp.

◆ operator*() [6/14]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Quaternion< T > jau::math::operator* ( const T s,
const Quaternion< T > & rhs )
constexprnoexcept

Definition at line 1176 of file quaternion.hpp.

◆ operator<<() [2/10]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< ( std::ostream & out,
const Quaternion< T > & v )
noexcept

Definition at line 1182 of file quaternion.hpp.

◆ operator<<() [3/10]

template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
std::ostream & jau::math::operator<< ( std::ostream & out,
const RectI< T > & v )
noexcept

Definition at line 135 of file recti.hpp.

◆ getZBufferEpsilon()

float jau::math::util::getZBufferEpsilon ( int zBits,
float z,
float zNear )
constexprnoexcept

Returns resolution of Z buffer of given parameter, see Love Your Z-Buffer.

 return z * z / ( zNear * (1<<zBits) - z )

Examples:

1.5256461E-4 = 16 zBits, -0.2 zDist, 0.1 zNear
6.1033297E-6 = 16 zBits, -1.0 zDist, 0.1 zNear
Parameters
zBitsnumber of bits of Z precision, i.e. z-buffer depth
zdistance from the eye to the object
zNeardistance from eye to near clip plane
Returns
smallest resolvable Z separation at this range.

Definition at line 46 of file float_util.hpp.

◆ getZBufferValue()

int jau::math::util::getZBufferValue ( int zBits,
float z,
float zNear,
float zFar )
constexprnoexcept

Returns Z buffer value of given parameter, see Love Your Z-Buffer.

 float a = zFar / ( zFar - zNear )
 float b = zFar * zNear / ( zNear - zFar )
 return (int) ( (1<<zBits) * ( a + b / z ) )
Parameters
zBitsnumber of bits of Z precision, i.e. z-buffer depth
zdistance from the eye to the object
zNeardistance from eye to near clip plane
zFardistance from eye to far clip plane
Returns
z buffer value

Definition at line 64 of file float_util.hpp.

◆ getOrthoWinZ()

float jau::math::util::getOrthoWinZ ( float orthoZ,
float zNear,
float zFar )
constexprnoexcept

Returns orthogonal distance (1f/zNear-1f/orthoZ) / (1f/zNear-1f/zFar);.

Definition at line 74 of file float_util.hpp.

◆ getEulerAngleOrientation()

jau::math::Vec3f jau::math::util::getEulerAngleOrientation ( const jau::math::Vec3f & eulerRotation)
constexprnoexcept

Returns an orientation vector for given eurler X/Y/Z angles in radians.

Returned vector reflect each axis and is either 1 for not-flipped or -1 for flipped orientation..

Examples
GearsES2.cpp.

Definition at line 83 of file float_util.hpp.

◆ operator<<() [4/10]

template<typename Value_type, std::enable_if_t< std::is_floating_point_v< Value_type >, bool > = true>
std::ostream & jau::math::util::operator<< ( std::ostream & out,
const PMVMatrix4< Value_type > & v )
inlinenoexcept

Definition at line 1457 of file pmvmat4f.hpp.

◆ operator+() [2/5]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector2F< T > jau::math::operator+ ( const Vector2F< T > & lhs,
const Vector2F< T > & rhs )
constexprnoexcept

Definition at line 340 of file vec2f.hpp.

◆ operator-() [2/9]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector2F< T > jau::math::operator- ( const Vector2F< T > & lhs,
const Vector2F< T > & rhs )
constexprnoexcept

Definition at line 352 of file vec2f.hpp.

◆ operator-() [3/9]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector2F< T > jau::math::operator- ( const Vector2F< T > & lhs)
constexprnoexcept

Definition at line 358 of file vec2f.hpp.

◆ operator*() [7/14]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector2F< T > jau::math::operator* ( const Vector2F< T > & lhs,
const T s )
constexprnoexcept

Definition at line 366 of file vec2f.hpp.

◆ operator*() [8/14]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector2F< T > jau::math::operator* ( const T s,
const Vector2F< T > & rhs )
constexprnoexcept

Definition at line 372 of file vec2f.hpp.

◆ operator/() [1/8]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector2F< T > jau::math::operator/ ( const Vector2F< T > & lhs,
const T s )
constexprnoexcept

Definition at line 378 of file vec2f.hpp.

◆ operator/() [2/8]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector2F< T > jau::math::operator/ ( const T s,
const Vector2F< T > & rhs )
constexprnoexcept

Definition at line 384 of file vec2f.hpp.

◆ min() [1/4]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector2F< T > jau::math::min ( const Vector2F< T > & lhs,
const Vector2F< T > & rhs )
constexprnoexcept

Definition at line 392 of file vec2f.hpp.

Here is the caller graph for this function:

◆ max() [1/4]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector2F< T > jau::math::max ( const Vector2F< T > & lhs,
const Vector2F< T > & rhs )
constexprnoexcept

Definition at line 398 of file vec2f.hpp.

Here is the caller graph for this function:

◆ abs() [1/4]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector2F< T > jau::math::abs ( const Vector2F< T > & lhs)
constexprnoexcept

Definition at line 404 of file vec2f.hpp.

Here is the caller graph for this function:

◆ operator<<() [5/10]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< ( std::ostream & out,
const Vector2F< T > & v )
noexcept

Definition at line 410 of file vec2f.hpp.

◆ operator<<() [6/10]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< ( std::ostream & out,
const Ray2F< T > & v )
noexcept

Definition at line 479 of file vec2f.hpp.

◆ operator+() [3/5]

template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
Vector2I< T > jau::math::operator+ ( const Vector2I< T > & lhs,
const Vector2I< T > & rhs )
constexprnoexcept

Definition at line 254 of file vec2i.hpp.

◆ operator-() [4/9]

template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
Vector2I< T > jau::math::operator- ( const Vector2I< T > & lhs,
const Vector2I< T > & rhs )
constexprnoexcept

Definition at line 266 of file vec2i.hpp.

◆ operator-() [5/9]

template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
Vector2I< T > jau::math::operator- ( const Vector2I< T > & lhs)
constexprnoexcept

Definition at line 272 of file vec2i.hpp.

◆ operator*() [9/14]

template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
Vector2I< T > jau::math::operator* ( const Vector2I< T > & lhs,
const float s )
constexprnoexcept

Definition at line 280 of file vec2i.hpp.

◆ operator*() [10/14]

template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
Vector2I< T > jau::math::operator* ( const float s,
const Vector2I< T > & rhs )
constexprnoexcept

Definition at line 286 of file vec2i.hpp.

◆ operator/() [3/8]

template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
Vector2I< T > jau::math::operator/ ( const Vector2I< T > & lhs,
const float s )
constexprnoexcept

Definition at line 292 of file vec2i.hpp.

◆ operator/() [4/8]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector2I< T > jau::math::operator/ ( const T s,
const Vector2I< T > & rhs )
constexprnoexcept

Definition at line 298 of file vec2i.hpp.

◆ min() [2/4]

template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
Vector2I< T > jau::math::min ( const Vector2I< T > & lhs,
const Vector2I< T > & rhs )
constexprnoexcept

Definition at line 306 of file vec2i.hpp.

◆ max() [2/4]

template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
Vector2I< T > jau::math::max ( const Vector2I< T > & lhs,
const Vector2I< T > & rhs )
constexprnoexcept

Definition at line 312 of file vec2i.hpp.

◆ abs() [2/4]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector2I< T > jau::math::abs ( const Vector2I< T > & lhs)
constexprnoexcept

Definition at line 318 of file vec2i.hpp.

◆ operator<<() [7/10]

template<typename T, std::enable_if_t< std::numeric_limits< T >::is_integer, bool > = true>
std::ostream & jau::math::operator<< ( std::ostream & out,
const Vector2I< T > & v )
noexcept

Definition at line 324 of file vec2i.hpp.

◆ operator+() [4/5]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector3F< T > jau::math::operator+ ( const Vector3F< T > & lhs,
const Vector3F< T > & rhs )
constexprnoexcept

Definition at line 356 of file vec3f.hpp.

◆ operator-() [6/9]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector3F< T > jau::math::operator- ( const Vector3F< T > & lhs,
const Vector3F< T > & rhs )
constexprnoexcept

Definition at line 368 of file vec3f.hpp.

◆ operator-() [7/9]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector3F< T > jau::math::operator- ( const Vector3F< T > & lhs)
constexprnoexcept

Definition at line 374 of file vec3f.hpp.

◆ operator*() [11/14]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector3F< T > jau::math::operator* ( const Vector3F< T > & lhs,
const T s )
constexprnoexcept

Definition at line 382 of file vec3f.hpp.

◆ operator*() [12/14]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector3F< T > jau::math::operator* ( const T s,
const Vector3F< T > & rhs )
constexprnoexcept

Definition at line 388 of file vec3f.hpp.

◆ operator/() [5/8]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector3F< T > jau::math::operator/ ( const Vector3F< T > & lhs,
const T s )
constexprnoexcept

Definition at line 394 of file vec3f.hpp.

◆ operator/() [6/8]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector3F< T > jau::math::operator/ ( const T s,
const Vector3F< T > & rhs )
constexprnoexcept

Definition at line 400 of file vec3f.hpp.

◆ min() [3/4]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector3F< T > jau::math::min ( const Vector3F< T > & lhs,
const Vector3F< T > & rhs )
constexprnoexcept

Definition at line 408 of file vec3f.hpp.

◆ max() [3/4]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector3F< T > jau::math::max ( const Vector3F< T > & lhs,
const Vector3F< T > & rhs )
constexprnoexcept

Definition at line 414 of file vec3f.hpp.

◆ abs() [3/4]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector3F< T > jau::math::abs ( const Vector3F< T > & lhs)
constexprnoexcept

Definition at line 420 of file vec3f.hpp.

◆ operator<<() [8/10]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< ( std::ostream & out,
const Vector3F< T > & v )
noexcept

Definition at line 426 of file vec3f.hpp.

◆ operator<<() [9/10]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< ( std::ostream & out,
const Ray3F< T > & v )
noexcept

Definition at line 498 of file vec3f.hpp.

◆ operator+() [5/5]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector4F< T > jau::math::operator+ ( const Vector4F< T > & lhs,
const Vector4F< T > & rhs )
constexprnoexcept

Definition at line 288 of file vec4f.hpp.

◆ operator-() [8/9]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector4F< T > jau::math::operator- ( const Vector4F< T > & lhs,
const Vector4F< T > & rhs )
constexprnoexcept

Definition at line 300 of file vec4f.hpp.

◆ operator-() [9/9]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector4F< T > jau::math::operator- ( const Vector4F< T > & lhs)
constexprnoexcept

Definition at line 306 of file vec4f.hpp.

◆ operator*() [13/14]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector4F< T > jau::math::operator* ( const Vector4F< T > & lhs,
const T s )
constexprnoexcept

Definition at line 314 of file vec4f.hpp.

◆ operator*() [14/14]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector4F< T > jau::math::operator* ( const T s,
const Vector4F< T > & rhs )
constexprnoexcept

Definition at line 320 of file vec4f.hpp.

◆ operator/() [7/8]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector4F< T > jau::math::operator/ ( const Vector4F< T > & lhs,
const T s )
constexprnoexcept

Definition at line 326 of file vec4f.hpp.

◆ operator/() [8/8]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector4F< T > jau::math::operator/ ( const T s,
const Vector4F< T > & rhs )
constexprnoexcept

Definition at line 332 of file vec4f.hpp.

◆ min() [4/4]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector4F< T > jau::math::min ( const Vector4F< T > & lhs,
const Vector4F< T > & rhs )
constexprnoexcept

Definition at line 340 of file vec4f.hpp.

◆ max() [4/4]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector4F< T > jau::math::max ( const Vector4F< T > & lhs,
const Vector4F< T > & rhs )
constexprnoexcept

Definition at line 346 of file vec4f.hpp.

◆ abs() [4/4]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector4F< T > jau::math::abs ( const Vector4F< T > & lhs)
constexprnoexcept

Definition at line 352 of file vec4f.hpp.

◆ to_vec3()

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
Vector3F< T > jau::math::to_vec3 ( const Vector4F< T > & v)
constexprnoexcept

out = { this.x, this.y, this.z } dropping w, returns out.

Definition at line 359 of file vec4f.hpp.

Here is the caller graph for this function:

◆ operator<<() [10/10]

template<typename T, std::enable_if_t< std::is_floating_point_v< T >, bool > = true>
std::ostream & jau::math::operator<< ( std::ostream & out,
const Vector4F< T > & v )
noexcept

Definition at line 365 of file vec4f.hpp.

◆ setToRotation()

template<typename Value_type, std::enable_if_t< std::is_floating_point_v< Value_type >, bool > = true>
Matrix4< Value_type, sf_type > & jau::math::Matrix4< Value_type, sf_type >::setToRotation ( const Quat & q)

Set this matrix to rotation using the given Quaternion.

Implementation Details:

Parameters
qthe Quaternion representing the rotation
Returns
this matrix for chaining
See also
Matrix-FAQ Q54
Quaternion#toMatrix(float[])
getRotation()

Definition at line 1193 of file quaternion.hpp.

Here is the caller graph for this function:

◆ getRotation()

template<typename Value_type, std::enable_if_t< std::is_floating_point_v< Value_type >, bool > = true>
Matrix4< Value_type, sf_type >::Quat & jau::math::Matrix4< Value_type, sf_type >::getRotation ( Quat & res) const
noexcept

Returns the rotation [m00 .

. m22] fields converted to a Quaternion.

Parameters
resresulting Quaternion
Returns
the resulting Quaternion for chaining.
See also
Quaternion#setFromMat(float, float, float, float, float, float, float, float, float)
#setToRotation(Quaternion)

Definition at line 1207 of file quaternion.hpp.

Here is the caller graph for this function: