|
Photon Engine 2.0.0-beta
A physically based renderer.
|
#include "SDL/sdl_helpers.h"#include "Math/TVector2.h"#include "Math/TVector3.h"#include "Math/TVector4.h"#include "Math/TQuaternion.h"#include "SDL/Tokenizer.h"#include "SDL/sdl_traits.h"#include "SDL/sdl_exceptions.h"#include "SDL/ISdlResource.h"#include <Common/assertion.h>#include <Common/Utility/string_utils.h>#include <type_traits>#include <algorithm>#include <exception>Go to the source code of this file.
Namespaces | |
| namespace | ph |
| The root for all renderer implementations. | |
| namespace | ph::sdl |
Functions | |
| template<typename FloatType > | |
| FloatType | ph::sdl::load_float (std::string_view sdlFloatStr) |
Returns a floating-point number by processing its SDL representation. Supports ph::real, float, double, and long double. | |
| template<typename IntType > | |
| IntType | ph::sdl::load_int (std::string_view sdlIntStr) |
Returns a integer number by processing its SDL representation. Supports ph::integer and all signed and unsigned standard integer types. | |
| template<typename NumberType > | |
| NumberType | ph::sdl::load_number (std::string_view sdlNumberStr) |
| Returns a number by processing its SDL representation. Accepts all types supported by load_float() and load_int(). | |
| template<typename NumberType , std::size_t EXTENT = std::dynamic_extent> | |
| void | ph::sdl::load_numbers (std::string_view sdlNumbersStr, TSpan< NumberType, EXTENT > out_numbers) |
| real | ph::sdl::load_real (std::string_view sdlRealStr) |
| integer | ph::sdl::load_integer (std::string_view sdlIntegerStr) |
| template<typename Element > | |
| math::TVector2< Element > | ph::sdl::load_vector2 (std::string_view sdlVec2Str) |
| template<typename Element > | |
| math::TVector3< Element > | ph::sdl::load_vector3 (std::string_view sdlVec3Str) |
| template<typename Element > | |
| math::TVector4< Element > | ph::sdl::load_vector4 (std::string_view sdlVec4Str) |
| template<typename Element > | |
| math::TQuaternion< Element > | ph::sdl::load_quaternion (std::string_view sdlQuatStr) |
| template<typename NumberType > | |
| std::vector< NumberType > | ph::sdl::load_number_array (std::string_view sdlNumberArrayStr) |
| template<typename Element > | |
| std::vector< math::TVector3< Element > > | ph::sdl::load_vector3_array (std::string_view sdlVec3ArrayStr) |
| void | ph::sdl::save_real (real value, std::string &out_str) |
| void | ph::sdl::save_integer (integer value, std::string &out_str) |
| template<typename FloatType > | |
| void | ph::sdl::save_float (FloatType value, std::string &out_str) |
Converts a floating-point number to its SDL representation. Supports ph::real, float, double, and long double. | |
| template<typename IntType > | |
| void | ph::sdl::save_int (IntType value, std::string &out_str) |
Converts a integer number to its SDL representation. Supports ph::real, float, double, and long double. | |
| template<typename NumberType > | |
| void | ph::sdl::save_number (NumberType value, std::string &out_str) |
| Converts a number to its SDL representation. Accepts all types supported by save_float() and save_int(). | |
| template<typename NumberType , std::size_t EXTENT = std::dynamic_extent> | |
| void | ph::sdl::save_numbers (TSpanView< NumberType, EXTENT > numbers, std::string &out_str) |
| template<typename Element > | |
| void | ph::sdl::save_vector2 (const math::TVector2< Element > &value, std::string &out_str) |
| template<typename Element > | |
| void | ph::sdl::save_vector3 (const math::TVector3< Element > &value, std::string &out_str) |
| template<typename Element > | |
| void | ph::sdl::save_vector4 (const math::TVector4< Element > &value, std::string &out_str) |
| template<typename Element > | |
| void | ph::sdl::save_quaternion (const math::TQuaternion< Element > &value, std::string &out_str) |
| template<typename NumberType > | |
| void | ph::sdl::save_number_array (TSpanView< NumberType > values, std::string &out_str) |
| template<typename Element > | |
| void | ph::sdl::save_vector3_array (TSpanView< math::TVector3< Element > > values, std::string &out_str) |
| template<typename T > | |
| constexpr ESdlTypeCategory | ph::sdl::category_of () |
Statically gets the SDL category of T. | |
| template<std::integral IntType> | |
| constexpr ESdlDataType | ph::sdl::int_type_of () |
| template<std::floating_point FloatType> | |
| constexpr ESdlDataType | ph::sdl::float_type_of () |
| template<CNumber NumberType> | |
| constexpr ESdlDataType | ph::sdl::number_type_of () |
| template<typename T > | |
| constexpr ESdlDataType | ph::sdl::resource_type_of () |
| template<typename DstType , typename SrcType > | |
| DstType * | ph::sdl::cast_to (SrcType *srcResource) |
Cast between SDL resource types. Cast the input SDL resource instance of SrcType to an instance of DstType. Each of the input types can possibly be const qualified. This is a stricter cast than standard dynamic_cast as both input and output pointer must not be null, and it will throw if the cast cannot be done. | |