Move Vectormath main
C++20 game and graphics mathematics
Loading...
Searching...
No Matches
Vec3.hpp File Reference
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <type_traits>
#include <mv/math/Vec2.hpp>
#include <mv/math/detail/VectorOps.hpp>

Go to the source code of this file.

Classes

class  mv::math::Vec3< T >
 

Namespaces

namespace  mv
 
namespace  mv::math
 

Typedefs

using mv::math::Vec3f = Vec3< float >
 
using mv::math::Vec3d = Vec3< double >
 
using mv::math::Vec3i8 = Vec3< std::int8_t >
 
using mv::math::Vec3u8 = Vec3< std::uint8_t >
 
using mv::math::Vec3i16 = Vec3< std::int16_t >
 
using mv::math::Vec3u16 = Vec3< std::uint16_t >
 
using mv::math::Vec3i32 = Vec3< std::int32_t >
 
using mv::math::Vec3u32 = Vec3< std::uint32_t >
 
using mv::math::Vec3i64 = Vec3< std::int64_t >
 
using mv::math::Vec3u64 = Vec3< std::uint64_t >
 
using mv::math::Vec3i = Vec3i32
 
using mv::math::Vec3u = Vec3u32
 

Functions

template<typename T >
requires std::is_arithmetic_v<T>
T mv::math::Dot (const Vec3< T > &left, const Vec3< T > &right) noexcept
 
template<typename T >
requires std::is_arithmetic_v<T>
Vec3< T > mv::math::Cross (const Vec3< T > &left, const Vec3< T > &right) noexcept
 
template<typename T >
requires std::is_arithmetic_v<T>
Vec3< T > mv::math::Min (const Vec3< T > &left, const Vec3< T > &right) noexcept
 
template<typename T >
requires std::is_arithmetic_v<T>
Vec3< T > mv::math::Max (const Vec3< T > &left, const Vec3< T > &right) noexcept
 
template<typename T >
T mv::math::LengthSquared (const Vec3< T > &value) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
bool mv::math::IsNearlyEqual (const Vec3< T > &left, const Vec3< T > &right, Tolerance< T > tolerance=Tolerance< T >::Default()) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
bool mv::math::IsNearlyZero (const Vec3< T > &value, T absoluteTolerance=Tolerance< T >::Default().Absolute) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
T mv::math::Length (const Vec3< T > &value) noexcept
 
template<typename T >
T mv::math::DistanceSquared (const Vec3< T > &left, const Vec3< T > &right) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
T mv::math::Distance (const Vec3< T > &left, const Vec3< T > &right) noexcept
 
template<typename T >
Vec3< T > mv::math::Clamp (const Vec3< T > &value, const Vec3< T > &minimum, const Vec3< T > &maximum) noexcept
 
template<typename T >
Vec3< T > mv::math::Clamp (const Vec3< T > &value, T minimum, T maximum) noexcept
 
template<typename T >
requires (std::is_signed_v<T> || std::is_floating_point_v<T>)
Vec3< T > mv::math::Abs (const Vec3< T > &value) noexcept
 
template<typename T >
requires (std::is_signed_v<T> || std::is_floating_point_v<T>)
Vec3< T > mv::math::Sign (const Vec3< T > &value) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
Vec3< T > mv::math::LerpUnclamped (const Vec3< T > &from, const Vec3< T > &to, T amount) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
Vec3< T > mv::math::Lerp (const Vec3< T > &from, const Vec3< T > &to, T amount) noexcept