Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::math::constant Namespace Reference

Variables

template<typename T >
constexprpi
 Value of \( \pi \).
 
template<typename T >
constexprrcp_pi
 Value of \( 1/\pi \).
 
template<typename T >
constexprtwo_pi
 Value of \( 2\pi \).
 
template<typename T >
constexprrcp_two_pi
 Value of \( 1/(2\pi) \).
 
template<typename T >
constexprfour_pi
 Value of \( 4\pi \).
 
template<typename T >
constexprrcp_four_pi
 Value of \( 1/(4\pi) \).
 
template<typename T >
constexprpi2
 Value of \( \pi^2 \).
 
template<typename T >
constexprsqrt_2
 Value of \( \sqrt{2} \).
 
template<typename T >
constexprrcp_sqrt_2
 Value of \( 1/\sqrt{2} \).
 
template<typename T >
constexprh_Planck = T(6.62607015e-34)
 Planck's constant (SI units).
 
template<typename T >
constexprc_light = T(299792458)
 Light speed in vacuum (SI units).
 
template<typename T >
constexprk_Boltzmann = T(1.380649e-23)
 
constexpr std::size_t KiB = 1024
 
constexpr std::size_t MiB = KiB * 1024
 
constexpr std::size_t GiB = MiB * 1024
 
constexpr std::size_t TiB = GiB * 1024
 
constexpr std::size_t PiB = TiB * 1024
 
Axis Indices

Standard axis indices used in the renderer.

constexpr std::size_t UNKNOWN_AXIS = static_cast<std::size_t>(-1)
 
constexpr std::size_t X_AXIS = 0
 
constexpr std::size_t Y_AXIS = 1
 
constexpr std::size_t Z_AXIS = 2
 

Variable Documentation

◆ c_light

template<typename T >
T ph::math::constant::c_light = T(299792458)
inlineconstexpr

Light speed in vacuum (SI units).

◆ four_pi

template<typename T >
T ph::math::constant::four_pi
inlineconstexpr
Initial value:
= T(
12.566370614359172953850573533118011536788677597500423283899778369231265625)

Value of \( 4\pi \).

◆ GiB

std::size_t ph::math::constant::GiB = MiB * 1024
inlineconstexpr

◆ h_Planck

template<typename T >
T ph::math::constant::h_Planck = T(6.62607015e-34)
inlineconstexpr

Planck's constant (SI units).

◆ k_Boltzmann

template<typename T >
T ph::math::constant::k_Boltzmann = T(1.380649e-23)
inlineconstexpr

◆ KiB

std::size_t ph::math::constant::KiB = 1024
inlineconstexpr

◆ MiB

std::size_t ph::math::constant::MiB = KiB * 1024
inlineconstexpr

◆ pi

template<typename T >
T ph::math::constant::pi
inlineconstexpr
Initial value:
= T(
3.1415926535897932384626433832795028841971693993751058209749445923078164063)

Value of \( \pi \).

◆ pi2

template<typename T >
T ph::math::constant::pi2
inlineconstexpr
Initial value:
= T(
9.8696044010893586188344909998761511353136994072407906264133493762200448224)

Value of \( \pi^2 \).

◆ PiB

std::size_t ph::math::constant::PiB = TiB * 1024
inlineconstexpr

◆ rcp_four_pi

template<typename T >
T ph::math::constant::rcp_four_pi
inlineconstexpr
Initial value:
= T(
0.0795774715459476678844418816862571810172298228702282243738336720294483988)

Value of \( 1/(4\pi) \).

◆ rcp_pi

template<typename T >
T ph::math::constant::rcp_pi
inlineconstexpr
Initial value:
= T(
0.3183098861837906715377675267450287240689192914809128974953346881177935953)

Value of \( 1/\pi \).

◆ rcp_sqrt_2

template<typename T >
T ph::math::constant::rcp_sqrt_2
inlineconstexpr
Initial value:
= T(
0.7071067811865475244008443621048490392848359376884740365883398689953662392)

Value of \( 1/\sqrt{2} \).

◆ rcp_two_pi

template<typename T >
T ph::math::constant::rcp_two_pi
inlineconstexpr
Initial value:
= T(
0.1591549430918953357688837633725143620344596457404564487476673440588967976)

Value of \( 1/(2\pi) \).

◆ sqrt_2

template<typename T >
T ph::math::constant::sqrt_2
inlineconstexpr
Initial value:
= T(
1.4142135623730950488016887242096980785696718753769480731766797379907324785)

Value of \( \sqrt{2} \).

◆ TiB

std::size_t ph::math::constant::TiB = GiB * 1024
inlineconstexpr

◆ two_pi

template<typename T >
T ph::math::constant::two_pi
inlineconstexpr
Initial value:
= T(
6.2831853071795864769252867665590057683943387987502116419498891846156328126)

Value of \( 2\pi \).

◆ UNKNOWN_AXIS

std::size_t ph::math::constant::UNKNOWN_AXIS = static_cast<std::size_t>(-1)
inlineconstexpr

◆ X_AXIS

std::size_t ph::math::constant::X_AXIS = 0
inlineconstexpr

◆ Y_AXIS

std::size_t ph::math::constant::Y_AXIS = 1
inlineconstexpr

◆ Z_AXIS

std::size_t ph::math::constant::Z_AXIS = 2
inlineconstexpr