Nebula
Loading...
Searching...
No Matches
im3d_math.h File Reference
#include "im3d.h"
#include <cmath>

Go to the source code of this file.

Classes

struct  Im3d::Line
 
struct  Im3d::Ray
 
struct  Im3d::LineSegment
 
struct  Im3d::Sphere
 
struct  Im3d::Plane
 
struct  Im3d::Capsule
 
struct  Im3d::internal::ScalarT
 
struct  Im3d::internal::FloatT
 
struct  Im3d::internal::IntT
 
struct  Im3d::internal::CompositeT
 
struct  Im3d::internal::VecT
 
struct  Im3d::internal::MatT
 
struct  Im3d::internal::TypeTraits< T >
 
struct  Im3d::internal::TypeTraits< int >
 
struct  Im3d::internal::TypeTraits< float >
 
struct  Im3d::internal::TypeTraits< Vec2 >
 
struct  Im3d::internal::TypeTraits< Vec3 >
 
struct  Im3d::internal::TypeTraits< Vec4 >
 
struct  Im3d::internal::TypeTraits< Mat4 >
 

Namespaces

namespace  Im3d
 
namespace  Im3d::internal
 

Functions

Vec2 Im3d::operator+ (const Vec2 &_lhs, const Vec2 &_rhs)
 
Vec2 Im3d::operator- (const Vec2 &_lhs, const Vec2 &_rhs)
 
Vec2 Im3d::operator* (const Vec2 &_lhs, const Vec2 &_rhs)
 
Vec2 Im3d::operator/ (const Vec2 &_lhs, const Vec2 &_rhs)
 
Vec2 Im3d::operator* (const Vec2 &_lhs, float _rhs)
 
Vec2 Im3d::operator/ (const Vec2 &_lhs, float _rhs)
 
Vec2 Im3d::operator- (const Vec2 &_v)
 
float Im3d::Dot (const Vec2 &_lhs, const Vec2 &_rhs)
 
float Im3d::Length (const Vec2 &_v)
 
float Im3d::Length2 (const Vec2 &_v)
 
Vec2 Im3d::Abs (const Vec2 &_v)
 
Vec2 Im3d::Normalize (const Vec2 &_v)
 
Vec3 Im3d::operator+ (const Vec3 &_lhs, const Vec3 &_rhs)
 
Vec3 Im3d::operator- (const Vec3 &_lhs, const Vec3 &_rhs)
 
Vec3 Im3d::operator* (const Vec3 &_lhs, const Vec3 &_rhs)
 
Vec3 Im3d::operator/ (const Vec3 &_lhs, const Vec3 &_rhs)
 
Vec3 Im3d::operator* (const Vec3 &_lhs, float _rhs)
 
Vec3 Im3d::operator/ (const Vec3 &_lhs, float _rhs)
 
Vec3 Im3d::operator- (const Vec3 &_v)
 
float Im3d::Dot (const Vec3 &_lhs, const Vec3 &_rhs)
 
float Im3d::Length (const Vec3 &_v)
 
float Im3d::Length2 (const Vec3 &_v)
 
Vec3 Im3d::Abs (const Vec3 &_v)
 
Vec3 Im3d::Normalize (const Vec3 &_v)
 
Vec3 Im3d::Cross (const Vec3 &_a, const Vec3 &_b)
 
Vec4 Im3d::operator+ (const Vec4 &_lhs, const Vec4 &_rhs)
 
Vec4 Im3d::operator- (const Vec4 &_lhs, const Vec4 &_rhs)
 
Vec4 Im3d::operator* (const Vec4 &_lhs, const Vec4 &_rhs)
 
Vec4 Im3d::operator/ (const Vec4 &_lhs, const Vec4 &_rhs)
 
Vec4 Im3d::operator* (const Vec4 &_lhs, float _rhs)
 
Vec4 Im3d::operator/ (const Vec4 &_lhs, float _rhs)
 
Vec4 Im3d::operator- (const Vec4 &_v)
 
float Im3d::Dot (const Vec4 &_lhs, const Vec4 &_rhs)
 
float Im3d::Length (const Vec4 &_v)
 
float Im3d::Length2 (const Vec4 &_v)
 
Vec4 Im3d::Abs (const Vec4 &_v)
 
Vec4 Im3d::Normalize (const Vec4 &_v)
 
Mat3 Im3d::operator* (const Mat3 &_lhs, const Mat3 &_rhs)
 
Vec3 Im3d::operator* (const Mat3 &_m, const Vec3 &_v)
 
Vec4 Im3d::operator* (const Mat3 &_m, const Vec4 &_v)
 
Mat3 Im3d::Transpose (const Mat3 &_m)
 
Vec3 Im3d::ToEulerXYZ (const Mat3 &_m)
 
Mat3 Im3d::FromEulerXYZ (Vec3 &_xyz)
 
Mat3 Im3d::Rotation (const Vec3 &_axis, float _rads)
 
Mat3 Im3d::Scale (const Vec3 &_s)
 
Mat4 Im3d::operator* (const Mat4 &_lhs, const Mat4 &_rhs)
 
Vec3 Im3d::operator* (const Mat4 &_m, const Vec3 &_pos)
 
Vec4 Im3d::operator* (const Mat4 &_m, const Vec4 &_v)
 
Mat4 Im3d::Inverse (const Mat4 &_m)
 
Mat4 Im3d::Transpose (const Mat4 &_m)
 
Mat4 Im3d::Translation (const Vec3 &_t)
 
Mat4 Im3d::AlignZ (const Vec3 &_axis, const Vec3 &_up=Vec3(0.0f, 1.0f, 0.0f))
 
Mat4 Im3d::LookAt (const Vec3 &_from, const Vec3 &_to, const Vec3 &_up=Vec3(0.0f, 1.0f, 0.0f))
 
bool Im3d::Intersects (const Ray &_ray, const Plane &_plane)
 
bool Im3d::Intersect (const Ray &_ray, const Plane &_plane, float &t0_)
 
bool Im3d::Intersects (const Ray &_ray, const Sphere &_sphere)
 
bool Im3d::Intersect (const Ray &_ray, const Sphere &_sphere, float &t0_, float &t1_)
 
bool Im3d::Intersects (const Ray &_ray, const Capsule &_capsule)
 
bool Im3d::Intersect (const Ray &_ray, const Capsule &_capsule, float &t0_, float &t1_)
 
void Im3d::Nearest (const Line &_line0, const Line &_line1, float &t0_, float &t1_)
 
void Im3d::Nearest (const Ray &_ray, const Line &_line, float &tr_, float &tl_)
 
Vec3 Im3d::Nearest (const Ray &_ray, const LineSegment &_segment, float &tr_)
 
float Im3d::Distance2 (const Ray &_ray, const LineSegment &_segment)
 
float Im3d::Distance (const Vec4 &_plane, const Vec3 &_point)
 
float Im3d::Radians (float _degrees)
 
float Im3d::Degrees (float _radians)
 
template<typename T >
bool Im3d::internal::_AllLess (const T &_a, const T &_b, ScalarT)
 
template<typename T >
bool Im3d::internal::_AllLess (const T &_a, const T &_b, CompositeT)
 
template<typename T >
Im3d::internal::_Max (const T &_a, const T &_b, ScalarT)
 
template<typename T >
Im3d::internal::_Max (const T &_a, const T &_b, CompositeT)
 
template<typename T >
Im3d::internal::_Min (const T &_a, const T &_b, ScalarT)
 
template<typename T >
Im3d::internal::_Min (const T &_a, const T &_b, CompositeT)
 
template<typename T >
bool Im3d::AllLess (const T &_a, const T &_b)
 
template<typename T >
Im3d::Max (T _a, T _b)
 
template<typename T >
Im3d::Min (T _a, T _b)
 
template<typename T >
Im3d::Clamp (T _a, T _min, T _max)
 
float Im3d::Remap (float _x, float _start, float _end)
 

Variables

constexpr float Im3d::Pi = 3.14159265359f
 
constexpr float Im3d::TwoPi = 2.0f * Pi
 
constexpr float Im3d::HalfPi = 0.5f * Pi