Photon Common Library 2.0.0-beta
A physically based renderer.
|
Go to the source code of this file.
Namespaces | |
namespace | ph |
The root for all renderer implementations. | |
namespace | ph::detail |
Implementation detail mainly for internal usages. | |
Macros | |
#define | PH_ASSERT_MSG(condition, message) PH_NO_OP() |
#define | PH_INTERNAL_RANGE_MSG(value, lowerBound, upperBound, lowerBoundSymbol, upperBoundSymbol) PH_NO_OP() |
#define | PH_ASSERT(condition) PH_ASSERT_MSG(condition, "") |
#define | PH_ASSERT_UNREACHABLE_SECTION() PH_ASSERT_MSG(false, "executing supposedly unreachable code") |
#define | PH_ASSERT_EQ(a, b) PH_ASSERT_MSG(a == b, std::string(#a) + " = " + std::to_string(a) + ", " + #b + " = " + std::to_string(b)) |
#define | PH_ASSERT_NE(a, b) PH_ASSERT_MSG(a != b, std::string(#a) + " = " + std::to_string(a) + ", " + #b + " = " + std::to_string(b)) |
#define | PH_ASSERT_GT(a, b) PH_ASSERT_MSG(a > b, std::string(#a) + " = " + std::to_string(a) + ", " + #b + " = " + std::to_string(b)) |
#define | PH_ASSERT_LT(a, b) PH_ASSERT_MSG(a < b, std::string(#a) + " = " + std::to_string(a) + ", " + #b + " = " + std::to_string(b)) |
#define | PH_ASSERT_GE(a, b) PH_ASSERT_MSG(a >= b, std::string(#a) + " = " + std::to_string(a) + ", " + #b + " = " + std::to_string(b)) |
#define | PH_ASSERT_LE(a, b) PH_ASSERT_MSG(a <= b, std::string(#a) + " = " + std::to_string(a) + ", " + #b + " = " + std::to_string(b)) |
#define | PH_ASSERT_IN_RANGE(value, begin, end) PH_ASSERT_MSG(begin <= value && value < end, PH_INTERNAL_RANGE_MSG(value, begin, end, "[", ")")) |
Assert that value is within [begin , end ). | |
#define | PH_ASSERT_IN_RANGE_INCLUSIVE(value, lowerBound, upperBound) PH_ASSERT_MSG(lowerBound <= value && value <= upperBound, PH_INTERNAL_RANGE_MSG(value, lowerBound, upperBound, "[", "]")) |
Similar to PH_ASSERT_IN_RANGE(3), except the bounds are inclusive. | |
#define | PH_ASSERT_IN_RANGE_EXCLUSIVE(value, lowerBound, upperBound) PH_ASSERT_MSG(lowerBound < value && value < upperBound, PH_INTERNAL_RANGE_MSG(value, lowerBound, upperBound, "(", ")")) |
Similar to PH_ASSERT_IN_RANGE(3), except the bounds are exclusive. | |
#define | PH_STATIC_ASSERT_DEPENDENT_FALSE(DependentType, message) static_assert(::ph::detail::DEPENDENT_FALSE<DependentType>, #message) |
Functions | |
void | ph::detail::output_assertion_message (const std::string &filename, const std::string &lineNumber, const std::string &condition, const std::string &message) |
void | ph::detail::on_assertion_failed () |
Variables | |
template<typename T > | |
constexpr bool | ph::detail::DEPENDENT_FALSE = false |
#define PH_ASSERT | ( | condition | ) | PH_ASSERT_MSG(condition, "") |
#define PH_ASSERT_EQ | ( | a, | |
b ) PH_ASSERT_MSG(a == b, std::string(#a) + " = " + std::to_string(a) + ", " + #b + " = " + std::to_string(b)) |
#define PH_ASSERT_GE | ( | a, | |
b ) PH_ASSERT_MSG(a >= b, std::string(#a) + " = " + std::to_string(a) + ", " + #b + " = " + std::to_string(b)) |
#define PH_ASSERT_GT | ( | a, | |
b ) PH_ASSERT_MSG(a > b, std::string(#a) + " = " + std::to_string(a) + ", " + #b + " = " + std::to_string(b)) |
#define PH_ASSERT_IN_RANGE | ( | value, | |
begin, | |||
end ) PH_ASSERT_MSG(begin <= value && value < end, PH_INTERNAL_RANGE_MSG(value, begin, end, "[", ")")) |
Assert that value
is within [begin
, end
).
#define PH_ASSERT_IN_RANGE_EXCLUSIVE | ( | value, | |
lowerBound, | |||
upperBound ) PH_ASSERT_MSG(lowerBound < value && value < upperBound, PH_INTERNAL_RANGE_MSG(value, lowerBound, upperBound, "(", ")")) |
Similar to PH_ASSERT_IN_RANGE(3), except the bounds are exclusive.
#define PH_ASSERT_IN_RANGE_INCLUSIVE | ( | value, | |
lowerBound, | |||
upperBound ) PH_ASSERT_MSG(lowerBound <= value && value <= upperBound, PH_INTERNAL_RANGE_MSG(value, lowerBound, upperBound, "[", "]")) |
Similar to PH_ASSERT_IN_RANGE(3), except the bounds are inclusive.
#define PH_ASSERT_LE | ( | a, | |
b ) PH_ASSERT_MSG(a <= b, std::string(#a) + " = " + std::to_string(a) + ", " + #b + " = " + std::to_string(b)) |
#define PH_ASSERT_LT | ( | a, | |
b ) PH_ASSERT_MSG(a < b, std::string(#a) + " = " + std::to_string(a) + ", " + #b + " = " + std::to_string(b)) |
#define PH_ASSERT_MSG | ( | condition, | |
message ) PH_NO_OP() |
#define PH_ASSERT_NE | ( | a, | |
b ) PH_ASSERT_MSG(a != b, std::string(#a) + " = " + std::to_string(a) + ", " + #b + " = " + std::to_string(b)) |
#define PH_ASSERT_UNREACHABLE_SECTION | ( | ) | PH_ASSERT_MSG(false, "executing supposedly unreachable code") |
#define PH_INTERNAL_RANGE_MSG | ( | value, | |
lowerBound, | |||
upperBound, | |||
lowerBoundSymbol, | |||
upperBoundSymbol ) PH_NO_OP() |
#define PH_STATIC_ASSERT_DEPENDENT_FALSE | ( | DependentType, | |
message ) static_assert(::ph::detail::DEPENDENT_FALSE<DependentType>, #message) |