Namespaces | |
| namespace | col |
| namespace | concepts |
| namespace | embed |
| namespace | endian |
| namespace | fresnel |
| namespace | io |
| namespace | ior |
| Namespace for 'ior' and 'reflectance' types. | |
| namespace | maskingshadowing |
| namespace | ndf |
| namespace | precomputed |
| namespace | python |
| namespace | reflection |
| namespace | spherical |
| namespace | string |
| namespace | vec |
Classes | |
| struct | add_const |
| struct | add_const< T > |
| class | aggregatebsdf |
| A BSDF that is the aggregate of different BSDFs. More... | |
| struct | aggregatemodel_base |
| The sum of different BSDF models. More... | |
| struct | alternative |
| Forward declaration of alternative. Should be specified if a model provides an alternative. More... | |
| struct | arg |
| Forward declaration of bbm::arg. More... | |
| struct | arg< Type, Name, Default > |
| struct | arg< Type, Name, void > |
| struct | arg< void, Name, void > |
| Untyped Argument (only a name) More... | |
| struct | args |
| Forward declaration. More... | |
| struct | ashikhminshirley |
| the Anisotropic Phong BSSF model by Ashikhmin and Shirley. This implements the specular component of the model. More... | |
| struct | ashikhminshirleyfull |
| the Anisotropic Phong BSSF model by Ashikhmin and Shirley. This implements the combined diffuse+specular component of the model. The combined model is implemented as a single model due to the dependence of the diffuse term on the specular fresnel reflectance. More... | |
| struct | attribute |
| Base declaration of attribute; further specialized below. More... | |
| struct | attribute< PROP > |
| Attributes for non-scalars (leverage inheritance) More... | |
| struct | batch |
| struct | bieronL2 |
| bieronL2 loss function More... | |
| struct | bieronL2_error |
| Bieron and Peers cosine weighted l2 error. More... | |
| struct | bieronLog |
| bieronLog loss function More... | |
| struct | bieronLog_error |
| Bieron and Peers cosine weighted log error. More... | |
| class | bitmap |
| class | bsdf |
| BSDF implementation of a BSDF model. More... | |
| struct | bsdf_base |
| Forward declaration. More... | |
| struct | bsdf_fresnel_properties |
| struct | bsdf_fresnel_properties< ior::bagher_reflectance< T >, Flag > |
| Define a specialized bsdf_parameter for the 2d Bagher et al.'s reflectance. More... | |
| struct | bsdf_fresnel_properties< ior::complex_ior< T >, Flag > |
| struct | bsdf_fresnel_properties< ior::ior< T >, Flag > |
| struct | bsdf_fresnel_properties< ior::reflectance< T >, Flag > |
| struct | bsdf_properties |
| bsdf_parameter property More... | |
| struct | bsdf_ptr |
| struct | bsdfsample |
| Structure to hold a sample's direction and PDF. More... | |
| class | cast_itr |
| Cast iterator; cast the result after deferencing. More... | |
| struct | cdf |
| CDF data structure. More... | |
| struct | compass |
| Compass Search. More... | |
| struct | constants |
| struct | dependent_false |
| struct | doublePacketRGB |
| struct | doubleRGB |
| struct | floatPacketRGB |
| struct | floatRGB |
| class | he_base |
| The directional specular component of the He et al. BSDF model. More... | |
| struct | is_named |
| struct | is_named< named< T, NAMES... > > |
| class | lafortune |
| The Lafortune BRDF model. This implements the model in Eq. 4 in the original paper linked above: More... | |
| struct | lambertian |
| The classic diffuse Lambertian BSDF model. More... | |
| struct | literal |
| class | loss |
| LOSS implementation of a loss function. More... | |
| struct | loss_base |
| Forward declaration. More... | |
| class | loss_ptr |
| loss_ptr: a wrapper around a shared_ptr to a loss More... | |
| struct | lowL2 |
| lowL2 loss function More... | |
| struct | lowL2_error |
| Low et al. cosine weighted l2 error. More... | |
| struct | lowLog |
| lowLog loss function More... | |
| struct | lowLog_error |
| Low et al.'s cosine weighted log error. More... | |
| class | lowmicrofacet |
| The Low et al. Microfacet BRDF model. More... | |
| class | lowsmooth |
| class | merl_data |
| MERL-MIT sampled reflectance. More... | |
| struct | merl_linearizer |
| struct | microfacet |
| General microfacet BRDF model. More... | |
| struct | microfacet_n |
| Predefined normalization factors. More... | |
| struct | named |
| named container More... | |
| struct | named_equivalence |
| struct | named_equivalence< U, V > |
| class | ndf_sampler |
| struct | nganL2 |
| nganL2 loss function More... | |
| struct | nganL2_error |
| Standard cosine weighted l2 error. More... | |
| class | nganlafortune |
| Ngan's Lafortune: standard Lafortune times an additional normalization factor: More... | |
| class | optimizer |
| OPTIMIZER implementation of a optimization algorithm. More... | |
| struct | optimizer_base |
| Abstract optimizer base class. More... | |
| class | optimizer_ptr |
| optimizer_ptr: a wrapper around a shared_ptr to an optimizer More... | |
| struct | option_parser |
| class | orennayar |
| The Oren-Nayar BSDF microfacet model for diffuse surfaces. More... | |
| struct | persistent_reference |
| Declaration of persistent_reference specialized below. More... | |
| struct | persistent_reference< T > |
| Persistent reference (no difference for non const references) More... | |
| class | phong |
| The modified Phong BSDF model. This is the classic Phong BSDF model with appropriate normalization and sampling methods. More... | |
| class | pointer |
| Pointer wrapper that takes handle both shared as well as regular (unmanaged) pointers. More... | |
| struct | reference |
| Non-persistent reference (i.e., cannot take rvalues) More... | |
| struct | remove_const |
| struct | remove_const< T > |
| struct | sampledloss_base |
| Forward declaration. More... | |
| struct | sampledlossfunction |
| sampledlossfunction More... | |
| struct | scaledmodel |
| Scaled BSDF model. More... | |
| struct | spherical_linearizer |
| struct | standardLog |
| standardLog loss function More... | |
| struct | standardLog_error |
| Cosine weighted log error weighted by sin theta of in and out. More... | |
| struct | string_converter |
| forward decalaration More... | |
| struct | string_converter< ARGS > |
| convert args<...> More... | |
| struct | string_converter< bbm::vector< T > > |
| convert a bbm vector More... | |
| struct | string_converter< bool > |
| bool conversion More... | |
| struct | string_converter< BSDF_PTR > |
| converting a bsdf_ptr to and from a string More... | |
| struct | string_converter< double > |
| struct | string_converter< float > |
| struct | string_converter< int > |
| struct | string_converter< long > |
| struct | string_converter< long double > |
| struct | string_converter< long long > |
| struct | string_converter< named< TUP, NAMES... > > |
| convert a named tuple More... | |
| struct | string_converter< std::array< T, N > > |
| convert to a fixed length array More... | |
| struct | string_converter< std::string > |
| string conversion More... | |
| struct | string_converter< std::tuple< Ts... > > |
| convert tuple More... | |
| struct | string_converter< std::vector< T > > |
| convert a std::vector (forward to bbm::vector) More... | |
| struct | string_converter< string_literal< N > > |
| string_literal conversion (read only) More... | |
| struct | string_converter< T > |
| string convert of backbone types More... | |
| struct | string_converter< unsigned int > |
| struct | string_converter< unsigned long > |
| struct | string_converter< unsigned long long > |
| struct | string_literal |
| struct | tab |
| std::array wrapper for precomputed data with optional remapping of the indices. More... | |
| struct | vec3dpair |
| Structure to hold a pair of directions. More... | |
| class | vector |
| class | vector< T > |
| vector<bbm::reference> with casting on the inspectors and iterators More... | |
| class | ward |
| The anisotropic Ward BSDF model. More... | |
| class | wardduer |
| The anisotropic Ward-Duer BSDF model. More... | |
| class | wardduergeislermoroder |
| The anisotropic Ward-Duer-Geisler-Moroder BSDF model. More... | |
Concepts | |
| concept | has_constfor_lambda |
| Concept to check if a lambda function meets the required signature. | |
| concept | has_constforeach_lambda |
| Concept to check if a lambda functions meets the required signature. | |
Typedefs | |
| template<symmetry_v V, typename Value > | |
| using | symmetry_t = std::conditional_t<(V==symmetry_v::Isotropic), Value, vec2d< Value > > |
| Determine the data type for storing isotropic or anisotropic reflectance parameters. | |
| template<typename T > | |
| using | get_config = typename std::decay_t< T >::Config |
| get_config type trait | |
| template<typename T > | |
| using | Value_t = typename get_config< T >::Value |
| template<typename T > | |
| using | Spectrum_t = typename get_config< T >::Spectrum |
| template<typename TUP > | |
| using | attribute_tuple_to_args_t = typename bbm::detail::attribute_tuple_to_args_t< std::decay_t< TUP > >::type |
| Convert an attribute_tuple_t to a bbm::args. | |
| template<typename... MODELS> | |
| using | aggregatemodel = aggregatemodel_base<"Aggregate"_sl, MODELS... > |
| The sum of different BSDF models. | |
| template<typename CONF , string_literal NAME = "Bagher"> | |
| using | bagher = scaledmodel< microfacet< ndf::sgd< CONF >, maskingshadowing::uncorrelated< CONF >, fresnel::bagher< CONF >, microfacet_n::Cook, NAME >, bsdf_attr::SpecularScale > |
| Bagher et al.'s Microfacet BSDF with Shifted Gamma Distribution. | |
| template<typename CONF , string_literal NAME = "CookTorrance"> | |
| using | cooktorrance = scaledmodel< microfacet< ndf::beckmann< CONF, symmetry_v::Isotropic, false >, maskingshadowing::vgroove< CONF >, fresnel::cook< CONF >, microfacet_n::Cook, NAME >, bsdf_attr::SpecularScale > |
| Cook-Torrance microfacet BSDF model. | |
| template<typename CONF , string_literal NAME = "CookTorranceHeitz"> | |
| using | cooktorranceheitz = scaledmodel< microfacet< ndf::beckmann< CONF, symmetry_v::Anisotropic >, maskingshadowing::heightcorrelated< CONF >, fresnel::cook< CONF >, microfacet_n::Walter, NAME >, bsdf_attr::SpecularScale > |
| Microfacet BSDF with Anisotropic Beckmann-based NDF. | |
| template<typename CONF , string_literal NAME = "CookTorranceWalter"> | |
| using | cooktorrancewalter = scaledmodel< microfacet< ndf::beckmann< CONF, symmetry_v::Isotropic >, maskingshadowing::uncorrelated< CONF >, fresnel::cook< CONF >, microfacet_n::Walter, NAME >, bsdf_attr::SpecularScale > |
| Microfacet BSDF with Beckmann-based NDF. | |
| template<typename CONF , string_literal NAME = "GGX"> | |
| using | ggx = scaledmodel< microfacet< ndf::ggx< CONF, symmetry_v::Isotropic >, maskingshadowing::uncorrelated< CONF >, fresnel::cook< CONF >, microfacet_n::Walter, NAME >, bsdf_attr::SpecularScale > |
| Microfacet BSDF with GGX-based NDF. | |
| template<typename CONF , string_literal NAME = "GGXHeitz"> | |
| using | ggxheitz = scaledmodel< microfacet< ndf::ggx< CONF, symmetry_v::Anisotropic >, maskingshadowing::heightcorrelated< CONF >, fresnel::cook< CONF >, microfacet_n::Walter, NAME >, bsdf_attr::SpecularScale > |
| Microfacet BSDF with anisotropic GGX-based NDF with heigh correlated shadowing and masking. | |
| template<typename CONF , ndf::epd_normalization NORMALIZATION = ndf::epd_normalization::Compute, string_literal NAME = "EPD"> | |
| using | epd = microfacet< ndf::epd< CONF >, maskingshadowing::vanginneken< CONF >, fresnel::complex< CONF >, microfacet_n::Walter, NAME > |
| Exponential Power Distribution microfacet model. | |
| template<typename CONF , string_literal NAME = "LowAshikhminShirley"> | |
| using | lowashikhminshirley = scaledmodel< ashikhminshirley< CONF, fresnel::cook< CONF, ior::ior< Value_t< CONF > > >, symmetry_v::Isotropic, NAME >, bsdf_attr::SpecularScale > |
| Low et al.'s version of the specular component of the Ashikhmin-Shirley BSDF: uses the Cook-Torrance Fresnel component with index of refraction. | |
| template<typename CONF , string_literal NAME = "LowCookTorrance"> | |
| using | lowcooktorrance = cooktorrance< CONF, "LowCookTorrance"> |
| Low et al.'s version of the specular component of the Cook-Torrance BSDF; this directly mirrors the original Cook-Torrance implementation. | |
| template<typename CONF , string_literal NAME = "LowMicrofacetFit"> | |
| using | lowmicrofacetfit = lowmicrofacet< CONF, microfacet_n::Cook, NAME > |
| Shorthand for the Low BSDF model compatible with the fits listed in their supplemental material which differs from the model in the paper by using a different normalization factor. | |
| template<typename CONF , string_literal NAME = "NganWard"> | |
| using | nganward = ward< CONF, symmetry_v::Isotropic, NAME > |
| Ngan's Ward: standard Ward with isotropic roughness. This can be achieved with a simple alias. | |
| template<typename CONF , string_literal NAME = "NganWardDuer"> | |
| using | nganwardduer = wardduer< CONF, symmetry_v::Isotropic, NAME > |
| Ngan's Ward-Duer: stanard Ward-Duer with isotropic roughness. This can be achieved with a simple alias. | |
| template<typename CONF , string_literal NAME = "NganBlinnPhong"> | |
| using | nganblinnphong = phong< CONF, NAME > |
| Ngan's Blinn-Phong: same as modifed phong; a simple alias suffices. | |
| template<typename CONF , string_literal NAME = "NganCookTorrance"> | |
| using | ngancooktorrance = scaledmodel< microfacet< ndf::beckmann< CONF, symmetry_v::Isotropic >, maskingshadowing::vgroove< CONF >, fresnel::schlick< CONF >, microfacet_n::Cook, NAME >, bsdf_attr::SpecularScale > |
| Ngan's Cook-Torrance is normalized by pi, is isotropic, and has vgroove masking and shadowing, schlick fresnel, F0 reflectance, and backman distribution. | |
| template<typename CONF , string_literal NAME = "NganAshikhminShirley"> | |
| using | nganashikhminshirley = scaledmodel< ashikhminshirley< CONF, fresnel::schlick< CONF, ior::reflectance< Value_t< CONF > > >, symmetry_v::Isotropic, NAME >, bsdf_attr::SpecularScale > |
| Ngan's Ashkihmin-Shirley model; does not include Ashikhmin-Shirley's diffuse component, and it is isotropic. THis can be achieved with a simple alias. | |
| template<typename CONF > | |
| using | nganhe = scaledmodel< ndf_sampler< he_base< CONF, fresnel::cook< CONF >, he_eq25::Errata, he_eq78::Westin, 4, 64, true, 18 >, 90, 1, "NganHe">, bsdf_attr::SpecularScale > |
| Ngan's He et al.'s BSDF likely uses the Westin et al. formulation but with non-complex eta. | |
| template<typename CONF , string_literal NAME = "PhongWalter"> | |
| using | phongwalter = scaledmodel< microfacet< ndf::phong< CONF >, maskingshadowing::uncorrelated< CONF >, fresnel::cook< CONF >, microfacet_n::Walter, NAME >, bsdf_attr::SpecularScale > |
| Microfacet BSDF with Phong-based NDF. | |
| template<typename CONF , string_literal NAME = "Ribardiere"> | |
| using | ribardiere = scaledmodel< microfacet< ndf::studentt< CONF, symmetry_v::Isotropic >, maskingshadowing::uncorrelated< CONF >, fresnel::cook< CONF >, microfacet_n::Walter, NAME >, bsdf_attr::SpecularScale > |
| Microfacet BSDF with Student-T based NDF. | |
| template<typename CONF , string_literal NAME = "RibardiereAnisotropic"> | |
| using | ribardiereanisotropic = scaledmodel< microfacet< ndf::studentt< CONF, symmetry_v::Anisotropic >, maskingshadowing::uncorrelated< CONF >, fresnel::cook< CONF >, microfacet_n::Walter, NAME >, bsdf_attr::SpecularScale > |
| Microfacet BSDF with the Anisotropic Student-T based NDF. | |
| template<typename T > | |
| using | mat2d = bbm::detail::mat< vec2d< T >, 2 > |
| 2D matrix | |
| template<typename T > | |
| using | mat3d = bbm::detail::mat< vec3d< T >, 3 > |
| 3D matrix | |
| using | dl_handle_t = void * |
| template<typename Config > | |
| using | merl = ndf_sampler< merl_data< Config, "Merl">, 90, 1 > |
| Data-driven MERL BSDF model with data-driven backscatter based importance sampling. | |
| template<typename T > | |
| using | attribute_value_t = bbm::detail::attribute_value< std::decay_t< T > >::type |
| return the type of value(t) | |
| template<typename T > | |
| using | value_copy_named_t = decltype(value_copy_named(std::declval< T >())) |
| type of value copying a named typle | |
| template<typename... T> | |
| using | named_cat_t = decltype(named_cat(std::declval< T >()...)) |
| type of concatting multiple named tuples. | |
| template<size_t START, size_t COUNT, typename NAMED > | |
| using | subnamed_t = decltype(subnamed< START, COUNT, NAMED >(std::declval< NAMED >())) |
| type of subnamed | |
| template<string_literal PREFIX, typename T > | |
| using | prefix_names_t = decltype(prefix_names< PREFIX >(std::declval< T >())) |
| type of named tuple with pre-fixed name. | |
| template<string_literal POSTFIX, typename T > | |
| using | postfix_names_t = decltype(post_names< POSTFIX >(std::declval< T >())) |
| type of named tuple with post-fixed name. | |
| template<typename T > | |
| using | const_reference = reference< bbm::add_const_t< T > > |
| const non-persistent reference | |
| template<typename T > | |
| using | const_persistent_reference = persistent_reference< bbm::add_const_t< T > > |
| const_persistent_reference | |
| template<typename T > | |
| using | to_tuple_t = decltype(to_tuple(std::declval< T >())) |
| type of converting a type that supports std::get to a tuple | |
| template<typename T > | |
| using | value_copy_tuple_t = decltype(value_copy_tuple(std::declval< std::decay_t< T > >())) |
| value-copy type of a tuple. | |
| template<typename... Ts> | |
| using | tuple_cat_t = decltype(std::tuple_cat(std::declval< Ts >()...)) |
| tuple_cat_t | |
| template<size_t START, size_t COUNT, typename TUP > | |
| using | subtuple_t = decltype(subtuple< START, COUNT >(std::declval< TUP >())) |
| subtuple type | |
| template<typename T > | |
| using | tuple_flatten_t = decltype(tuple_flatten(std::declval< std::decay_t< T > >())) |
| flattened tuple type | |
| template<typename T > | |
| using | tuple_add_const_t = decltype(tuple_add_const(std::declval< std::decay_t< T > >())) |
| tuple_add_const type | |
| template<typename T > | |
| using | tuple_remove_const_t = decltype(tuple_remove_const(std::declval< std::decay_t< T > >())) |
| tuple_remove_const type | |
| template<template< typename > typename TRAIT, typename... Ts> | |
| using | find_first = typename bbm::detail::find_first_impl< TRAIT, void, Ts... >::type |
| Find first type that matches a type_trait. | |
Predefined Default BSDF attributes <br> | |
| template<typename T , bsdf_attr Flag, literal Default = 1.0, literal UpperBound = std::numeric_limits<scalar_t<T>>::max(), literal LowerBound = 0.0> | |
| using | bsdf_parameter = attribute< bsdf_properties< T, Flag, Default, UpperBound, LowerBound > > |
| template<typename T , bsdf_attr Flag> | |
| using | bsdf_scale = attribute< bsdf_properties< T, Flag, 0.5, 1.0 > > |
| template<typename T > | |
| using | diffuse_scale = bsdf_scale< T, bsdf_attr::DiffuseScale > |
| template<typename T > | |
| using | specular_scale = bsdf_scale< T, bsdf_attr::SpecularScale > |
| template<typename T , bsdf_attr Flag> | |
| using | bsdf_roughness = attribute< bsdf_properties< T, Flag, 0.1, 1.0, constants< scalar_t< T > >::Epsilon()> > |
| template<typename T > | |
| using | diffuse_roughness = bsdf_roughness< T, bsdf_attr::DiffuseParameter > |
| template<typename T > | |
| using | specular_roughness = bsdf_roughness< T, bsdf_attr::SpecularParameter > |
| template<typename T , bsdf_attr Flag> | |
| using | bsdf_sharpness = attribute< bsdf_properties< T, Flag, 32.0 > > |
| template<typename T > | |
| using | diffuse_sharpness = bsdf_sharpness< T, bsdf_attr::DiffuseParameter > |
| template<typename T > | |
| using | specular_sharpness = bsdf_sharpness< T, bsdf_attr::SpecularParameter > |
| template<typename T , bsdf_attr Flag = bsdf_attr::SpecularParameter> | |
| using | fresnel_parameter = attribute< bsdf_fresnel_properties< T, Flag > > |
He BSDF Variants with data-driven importance sampling | |
| template<typename CONF , string_literal NAME = "He"> | |
| using | he = ndf_sampler< he_base< CONF, fresnel::complex< CONF, Spectrum_t< CONF > >, he_eq25::WithoutExp, he_eq78::Regular, 4, 64, true, 18 >, 90, 1, NAME > |
| template<typename CONF , string_literal NAME = "HeWestin"> | |
| using | hewestin = ndf_sampler< he_base< CONF, fresnel::complex< CONF, Spectrum_t< CONF > >, he_eq25::Errata, he_eq78::Westin, 4, 64, true, 18 >, 90, 1, NAME > |
| template<typename CONF , string_literal NAME = "HeHolzschuch"> | |
| using | heholzschuch = ndf_sampler< he_base< CONF, fresnel::complex< CONF, Spectrum_t< CONF > >, he_eq25::Errata, he_eq78::Regular, 4, 10, false >, 90, 1, NAME > |
Create a bbm::args type from either a list of bbm::arg or an bbm::args. | |
| template<typename... Ts> | |
| using | add_args = detail::add_args_impl< Ts... > |
| template<typename... Ts> | |
| using | add_args_t = typename add_args< Ts... >::type |
Iterable container type traits | |
| template<typename T > | |
| using | iterable_value_t = std::decay_t< decltype(*bbm::begin(std::declval< T >()))> |
add_const (reference and pointer robust) | |
| template<typename T > | |
| using | add_const_t = typename add_const< T >::type |
remove_const (reference and pointer robust) | |
@{ | |
| template<typename T > | |
| using | remove_const_t = typename remove_const< T >::type |
Enumerations | |
| enum struct | bsdf_attr { None = 0x0000 , DiffuseScale = 0x0001 , DiffuseParameter = 0x0002 , SpecularScale = 0x0004 , SpecularParameter = 0x0008 , Dependent = 0x0010 , Diffuse = DiffuseScale | DiffuseParameter , Specular = SpecularScale | SpecularParameter , Scale = DiffuseScale | SpecularScale , Parameter = DiffuseParameter | SpecularParameter , All = Specular | Diffuse } |
| Attribute Property Flags. More... | |
| enum struct | bsdf_flag { None = 0x0000 , Diffuse = 0x0001 , Specular = 0x0002 , All = Diffuse | Specular } |
| Reflectance Component Evaluation Flags. More... | |
| enum struct | bsdf_prop { None = 0x0 , Static = 0x1000000 , Diffuse = 0x00000001 , Specular = 0x00000002 , Combined = Diffuse | Specular , Depricated = 0x00000004 , Alternative = 0x00000008 | Depricated , Convertible = 0x00000010 | Alternative , Unnormalized = 0x0000100 , NonReciprocal = 0x0000200 , GrazingAngle = 0x0000400 , NonEnergyConservative = 0x0000800 | GrazingAngle , ApproximateReflectance = 000001000 } |
| BSDF property flags. More... | |
| enum struct | symmetry_v { Isotropic = 0x0001 , Anisotropic = 0x0002 } |
| symmetry variants. More... | |
| enum struct | unit_t { Radiance = 0x0000 , Importance = 0x0001 } |
| Light Unit. More... | |
| enum struct | he_eq25 { WithoutExp , Errata } |
| Masking term scale in Eq 25. More... | |
| enum struct | he_eq78 { Regular , Westin } |
| Eq. 78 variants: More... | |
Functions | |
| BBM_CHECK_CONCEPT (concepts::sampledlossfunction, batch< concepts::archetype::sampledlossfunction<> >) | |
| BBM_CHECK_CONCEPT (concepts::bsdf, bsdf< bsdfmodel<> >) | |
| BBM_ENUM (bsdf_attr, None, DiffuseScale, DiffuseParameter, SpecularScale, SpecularParameter, Dependent, Diffuse, Specular, Scale, Parameter, All) | |
| template<typename BSDF > requires bbm::concepts::bsdf<BSDF> | |
| std::ostream & | operator<< (std::ostream &s, const BSDF &bsdf) |
| template<typename MODEL , typename CALLBACK > requires concepts::bsdfmodel<MODEL> | |
| void | enumerate_parameters (bsdf_attr flag, MODEL &&model, CALLBACK &&callback) |
| Enumerate the values of the attributes from a bsdf model. | |
| template<typename MODEL , typename CALLBACK > requires concepts::bsdfmodel<MODEL> | |
| void | enumerate_default_parameters (bsdf_attr flag, MODEL &&model, CALLBACK &&callback) |
| Enumerate the default values of the attributes from a bsdf model. | |
| template<typename MODEL , typename CALLBACK > requires concepts::bsdfmodel<MODEL> | |
| void | enumerate_lower_bound (bsdf_attr flag, MODEL &&model, CALLBACK &&callback) |
| Enumerate the lower bounds of the attributes from a bsdf model. | |
| template<typename MODEL , typename CALLBACK > requires concepts::bsdfmodel<MODEL> | |
| void | enumerate_upper_bound (bsdf_attr flag, MODEL &&model, CALLBACK &&callback) |
| Enumerate the upper bounds of the attributes from a bsdf model. | |
| template<typename MODEL > requires (concepts::bsdfmodel<MODEL> && !concepts::bsdf<MODEL>) | |
| auto | parameter_values (MODEL &&model, bsdf_attr flag=bsdf_attr::All) |
| Enumerate the parameters of a BSDF model in a vector. | |
| template<typename BSDF > requires concepts::bsdf<BSDF> | |
| auto | parameter_values (BSDF &bsdf, bsdf_attr flag=bsdf_attr::All) |
| Enumerate the parameters of a BSDF in a vector. | |
| template<typename MODEL > requires (concepts::bsdfmodel<MODEL> && !concepts::bsdf<MODEL>) | |
| auto | parameter_default_values (MODEL &&model, bsdf_attr flag=bsdf_attr::All) |
| Enumerate the default parameters of a BSDF model in a vector. | |
| template<typename BSDF > requires concepts::bsdf<BSDF> | |
| auto | parameter_default_values (const BSDF &bsdf, bsdf_attr flag=bsdf_attr::All) |
| Enumerate the default parameters of a BSDF in a vector. | |
| template<typename MODEL > requires (concepts::bsdfmodel<MODEL> && !concepts::bsdf<MODEL>) | |
| auto | parameter_lower_bound (MODEL &&model, bsdf_attr flag=bsdf_attr::All) |
| Enumerate the lower bound of the parameters of a BSDF model in a vector. | |
| template<typename BSDF > requires concepts::bsdf<BSDF> | |
| auto | parameter_lower_bound (const BSDF &bsdf, bsdf_attr flag=bsdf_attr::All) |
| Enumerate the lower bound of the parameters of a BSDF in a vector. | |
| template<typename MODEL > requires (concepts::bsdfmodel<MODEL> && !concepts::bsdf<MODEL>) | |
| auto | parameter_upper_bound (MODEL &&model, bsdf_attr flag=bsdf_attr::All) |
| Enumerate the upper bound of the parameters of a BSDF model in a vector. | |
| template<typename BSDF > requires concepts::bsdf<BSDF> | |
| auto | parameter_upper_bound (const BSDF &bsdf, bsdf_attr flag=bsdf_attr::All) |
| Enumerate the upper bound of the parameters of a BSDF in a vector. | |
| BBM_ENUM (bsdf_flag, None, Diffuse, Specular, All) | |
| template<typename BSDFMODEL > | |
| alternative< BSDFMODEL >::type | make_alternative (const BSDFMODEL &src) |
| COnstruct an equivalent alternative BSDF. Should be specialized for each model that provides this option. | |
| std::ostream & | operator<< (std::ostream &s, const bbm::bsdf_prop &prop) |
| BBM_CHECK_CONCEPT (concepts::bsdf_ptr, bsdf_ptr< config >) | |
| template<typename BSDFTYPE , typename... ARGS> requires concepts::bsdf<BSDFTYPE> | |
| bsdf_ptr< get_config< BSDFTYPE > > | make_bsdf_ptr (ARGS... args) |
| Helper method for making a bsdf_ptr from a BSDF (new construction) | |
| template<typename BSDFMODEL , typename... ARGS> requires (concepts::bsdfmodel<BSDFMODEL> && !concepts::bsdf<BSDFMODEL>) | |
| bsdf_ptr< get_config< BSDFMODEL > > | make_bsdf_ptr (ARGS... args) |
| Helper method for making a bsdf_ptr from a BSDF MODEL (new construction) | |
| template<typename BSDFTYPE > requires (concepts::bsdf<BSDFTYPE> && !concepts::bsdf_ptr<BSDFTYPE>) | |
| bsdf_ptr< get_config< BSDFTYPE > > | make_bsdf_ptr (const BSDFTYPE &arg) |
| Helper method for making a bsdf_ptr from a BSDF (copy construction) | |
| template<typename BSDFMODEL > requires (concepts::bsdfmodel<BSDFMODEL> && !concepts::bsdf<BSDFMODEL>) | |
| bsdf_ptr< get_config< BSDFMODEL > > | make_bsdf_ptr (const BSDFMODEL &arg) |
| Helper method for making a bsdf_ptr from a BSDF MODEL (copy construction) | |
| template<typename CONF > requires concepts::config<CONF> | |
| bsdf_ptr< CONF > | make_bsdf_ptr (const bsdf_ptr< CONF > &arg) |
| Helper method for making a bsdf_ptr (avoid bsdf_ptr of bsdf_ptr) | |
| template<typename BSDFMODEL > requires bbm::concepts::bsdfmodel<BSDFMODEL> | |
| std::ostream & | operator<< (std::ostream &s, const BSDFMODEL &model) |
| ostream output uses toString conversion | |
| template<typename CONF > | |
| std::ostream & | operator<< (std::ostream &s, const bbm::bsdfsample< CONF > &ss) |
| BBM_DECLARE_FORWARD_IMPORT (bsdfsample) | |
| BBM_DECLARE_FORWARD_IMPORT (vec3dpair) | |
| BBM_DECLARE_CORE_TYPE (Scalar, T, bbm::scalar_t< Value_t< T > >) | |
| BBM_DECLARE_CORE_TYPE (Mask, T, bbm::mask_t< Value_t< T > >) | |
| BBM_DECLARE_CORE_TYPE (Size, T, bbm::index_t< Value_t< T > >) | |
| BBM_DECLARE_CORE_TYPE (BsdfFlag, T, bbm::replace_scalar_t< bbm::remove_diff_t< Value_t< T > >, bbm::bsdf_flag >) | |
| BBM_DECLARE_CORE_TYPE (Constants, T, bbm::constants< Scalar_t< T > >) | |
| BBM_DECLARE_CORE_TYPE (Vec2d, T, bbm::vec2d< Value_t< T > >) | |
| BBM_DECLARE_CORE_TYPE (Mat2d, T, bbm::mat2d< Value_t< T > >) | |
| BBM_DECLARE_CORE_TYPE (Vec3d, T, bbm::vec3d< Value_t< T > >) | |
| BBM_DECLARE_CORE_TYPE (Mat3d, T, bbm::mat3d< Value_t< T > >) | |
| BBM_DECLARE_CORE_TYPE (Complex, T, bbm::complex< Value_t< T > >) | |
| BBM_DECLARE_SHORTHAND (BsdfSample_t, bsdfsample) | |
| BBM_DECLARE_SHORTHAND (Vec3dPair_t, vec3dpair) | |
| template<typename PARAM > requires concepts::diff_parameter<PARAM> | |
| void | track_gradients (PARAM &¶m, bool toggle=true) |
| Enable gradients for a parameter set. | |
| template<typename PARAM > requires concepts::diff_parameter<PARAM> | |
| auto | get_gradients (PARAM &¶m) |
| Get the gradient from a parameter set. | |
| template<typename PARAM > requires concepts::diff_parameter<PARAM> | |
| auto | detach_gradients (PARAM &¶m) |
| Get the detached values from a parameter set. | |
| template<typename PARAM > requires concepts::diff_parameter<PARAM> | |
| void | forward_gradients (PARAM &¶m) |
| Forward computation of gradients on a parameter set. | |
| template<typename T > | |
| void | backward_gradients (T &&t) |
| backward computations => passthrough to backbone | |
| BBM_CHECK_CONCEPT (concepts::loss, loss< lossfunction< config > >) | |
| BBM_CHECK_CONCEPT (concepts::loss_ptr, loss_ptr< config >) | |
| template<typename LOSSTYPE , typename... ARGS> requires concepts::loss<LOSSTYPE> | |
| loss_ptr< get_config< LOSSTYPE > > | make_loss_ptr (ARGS &&... args) |
| Helper method for making loss_ptr from a LOSS (new construction) | |
| template<typename LOSSFUNC , typename... ARGS> requires (concepts::lossfunction<LOSSFUNC> && !concepts::loss<LOSSFUNC>) | |
| loss_ptr< get_config< LOSSFUNC > > | make_loss_ptr (ARGS &&... args) |
| Helper method for making a loss_ptr from a LOSS FUNCTION (new construction) | |
| template<typename LOSSTYPE > requires (concepts::loss<LOSSTYPE> && !concepts::loss_ptr<LOSSTYPE>) | |
| loss_ptr< get_config< LOSSTYPE > > | make_loss_ptr (const LOSSTYPE &arg) |
| Helper method for making a loss_ptr from a LOSS (copy construction) | |
| template<typename LOSSFUNC > requires (concepts::lossfunction<LOSSFUNC> && !concepts::loss<LOSSFUNC>) | |
| loss_ptr< get_config< LOSSFUNC > > | make_loss_ptr (const LOSSFUNC &arg) |
| Helper method for making a loss_ptr from a LOSS FUNCTION (copy constructor) | |
| template<typename CONF > requires concepts::config<CONF> | |
| loss_ptr< CONF > | make_loss_ptr (const loss_ptr< CONF > &arg) |
| Helper method for making loss_ptr (avoid loss_ptr of loss_ptr) | |
| template<typename NDF > requires bbm::concepts::ndf<NDF> | |
| std::ostream & | operator<< (std::ostream &s, const NDF &ndf) |
| BBM_CHECK_CONCEPT (concepts::optimizer_ptr, optimizer_ptr< config >) | |
| template<typename OPTIMIZER , typename... ARGS> requires concepts::optimizer<OPTIMIZER> | |
| optimizer_ptr< get_config< OPTIMIZER > > | make_optimizer_ptr (ARGS &&... args) |
| Helper method for making an optimizer_ptr from an optimizer (new construction) | |
| template<typename OPTIMIZATION_ALGORITHM , typename... ARGS> requires (concepts::optimization_algorithm<OPTIMIZATION_ALGORITHM> && !concepts::optimizer<OPTIMIZATION_ALGORITHM>) | |
| optimizer_ptr< get_config< OPTIMIZATION_ALGORITHM > > | make_optimizer_ptr (ARGS &&... args) |
| Helper method for making an optimizer_ptr from a OPTIMIZATION_ALGORITHM. | |
| template<typename OPTIMIZER > requires concepts::optimizer<OPTIMIZER> | |
| optimizer_ptr< get_config< OPTIMIZER > > | make_optimizer_ptr (const OPTIMIZER &arg) |
| Helper method for making an optimizer_ptr from a OPTIMZER (copy construction) | |
| template<typename OPTIMIZATION_ALGORITHM > requires (concepts::optimization_algorithm<OPTIMIZATION_ALGORITHM> && !concepts::optimizer<OPTIMIZATION_ALGORITHM>) | |
| optimizer_ptr< get_config< OPTIMIZATION_ALGORITHM > > | make_optimizer_ptr (const OPTIMIZATION_ALGORITHM &arg) |
| Helper method for making an optimizer_ptr from a OPTIMIZATION_ALGORITHM (copy construction) | |
| template<typename CONF > requires concepts::config<CONF> | |
| optimizer_ptr< CONF > | make_optimizer_ptr (const optimizer_ptr< CONF > &arg) |
| Helper method for making an optimizer_ptr (avoid optimizer_ptr of optimizer_ptr>) | |
| BBM_CHECK_CONCEPT (concepts::sampledlossfunction, bbm::sampledlossfunction< bsdfmodel<>, bsdfmodel<>, samplelossfunction<>, inout_linearizer<> >) | |
| BBM_ENUM (unit_t, Radiance, Importance) | |
| template<typename CONF > | |
| std::ostream & | operator<< (std::ostream &s, const bbm::vec3dpair< CONF > &rs) |
| template<typename... MODELS> requires (concepts::bsdfmodel<MODELS> && ...) | |
| aggregatemodel< MODELS... > | aggregate (const MODELS &... models) |
| Method for simplifying the creation of an aggregate model. | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, ashikhminshirley< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, ashikhminshirleyfull< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, bagher< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, he_base< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, lafortune< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, lambertian< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, lowmicrofacetfit< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, lowsmooth< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, microfacet< ndf<>, maskingshadowing<>, concepts::archetype::fresnel<> >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, nganlafortune< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, orennayar< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, phong< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, ward< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, wardduer< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, wardduergeislermoroder< config >) | |
| template<typename T , bbm::string_literal N, typename D > | |
| std::ostream & | operator<< (std::ostream &s, const bbm::arg< T, N, D > &arg) |
| Print bbm::arg. | |
| template<string_literal NAME> | |
| arg< void, NAME > | operator""_arg (void) |
| arg literal | |
| template<typename... ARGS> requires (bbm::is_arg_v<ARGS> && ...) | |
| std::ostream & | operator<< (std::ostream &s, const bbm::args< ARGS... > &args) |
| Print bbm::args. | |
| template<typename RET , typename C , typename Index > requires std::ranges::range<C> && ((std::constructible_from<RET> && // (trivially constructible AND ((is_tuple_v<RET> && is_tuple_v<std::ranges::range_value_t<C>>) || // (tuple OR (named_equivalence_v<RET, std::ranges::range_value_t<C>>) || // named OR (concepts::reflection::supported<RET> && concepts::reflection::supported<std::ranges::range_value_t<C>>))) || // unnamed)) OR requires(C&& c, Index i, index_mask_t<Index> m) {{backbone::lookup<RET>(c,i,m)};}) | |
| RET | lookup (C &&container, const Index &idx, const index_mask_t< Index > &mask=true) |
| Generalize backbone::lookup to include containers of tuples/named tuples/reflection-supported types. | |
| template<typename Value , typename C , typename Index > | |
| void | set (C &&container, const Index &idx, Value &&value, const index_mask_t< Index > &mask=true) |
| Generalization of backbone::set to include tuples/named/reflection-supported objects. | |
| template<typename VALUE , typename T , typename CALLBACK > requires (std::convertible_to<T&, VALUE> && std::invocable<CALLBACK, VALUE>) | |
| void | enumerate (T &&value, CALLBACK &&callback) |
| Convertible to VALUE => callback. | |
| template<typename VALUE , typename T , typename CALLBACK > requires (std::ranges::range<T> && !std::convertible_to<T&, VALUE> && std::invocable<CALLBACK, VALUE>) | |
| void | enumerate (T &&obj, CALLBACK &&callback) |
| iterable object => enumerate(begin(), ..., end()) | |
| template<typename M > | |
| constexpr M | identity (void) |
| create an identity matrix | |
| template<typename M > | |
| constexpr M | transpose (const M &m) |
| Bring 'transpose' in the bbm namespace. | |
| template<typename T > | |
| mat3d< std::decay_t< T > > | toGlobalShadingFrame (const vec3d< T > &normal) |
| Construct a local shading frame to global frame transformation given a normal direction. | |
| template<typename T > | |
| auto | toLocalShadingFrame (const vec3d< T > &normal) |
| Construct a global to local shading frame transformation. | |
| template<typename T > | |
| mat3d< std::decay_t< T > > | rotationX (const vec2d< T > &cossin) |
| Rotation around the X-axis. | |
| template<typename T > | |
| mat3d< std::decay_t< T > > | rotationX (T angle) |
| Rotation around the X-axis. | |
| template<typename T > | |
| mat3d< std::decay_t< T > > | rotationY (const vec2d< T > &cossin) |
| Rotation around the Y-axis. | |
| template<typename T > | |
| mat3d< std::decay_t< T > > | rotationY (T angle) |
| Rotation around the Y-axis. | |
| template<typename T > | |
| mat3d< std::decay_t< T > > | rotationZ (const vec2d< T > &cossin) |
| Rotation around the Z-axis. | |
| template<typename T > | |
| mat3d< std::decay_t< T > > | rotationZ (T angle) |
| Rotation around the Z-axis. | |
| template<typename T > | |
| mat2d< std::decay_t< T > > | rotation2d (const vec2d< T > &cossin) |
| 2D rotation matrix | |
| template<typename T > | |
| mat2d< std::decay_t< T > > | rotation2d (T angle) |
| 2D rotation matrix | |
| template<typename T > | |
| vec2d< T > | perp (const vec2d< T > &v) |
| Returns the lefthand (clockwise) perpendicular vector of a 2D vector. | |
| template<typename T > | |
| vec2d< T > | cperp (const vec2d< T > &v) |
| Returns the righthand (counterclockwise) perpendicular vector of a 2D vector. | |
| template<typename T > | |
| vec3d< T > | reflect (const vec3d< T > &v, const vec3d< T > &normal) |
| Reflects a 3D vector. | |
| template<typename T > | |
| vec3d< T > | reflect (const vec3d< T > &v) |
| Reflects a 3D vector around Z=1. | |
| template<typename T > | |
| constexpr vec3d< T > | cross (const vec3d< T > &a, const vec3d< T > &b) |
| Cross product of two 3D vectors. | |
| template<typename T > | |
| vec3d< T > | halfway (const vec3d< T > &a, const vec3d< T > &b) |
| Halfway vector (3D) | |
| template<typename T > | |
| std::pair< vec3d< T >, vec3d< T > > | convertToHalfwayDifference (const vec3d< T > &a, const vec3d< T > &b) |
| Convert fro Canonical to the Halfway-Difference parameterization. | |
| template<typename T > | |
| vec3d< T > | difference (const vec3d< T > &a, const vec3d< T > &b) |
| Difference vector. | |
| template<typename T > | |
| std::pair< vec3d< T >, vec3d< T > > | convertFromHalfwayDifference (const vec3d< T > &half, const vec3d< T > &diff) |
| Convert from Halfway-Difference to Canonical parameterization. | |
| dl_handle_t | loadDynamicLibrary (const std::string &name) |
| void | closeDynamicLibrary (dl_handle_t handle) |
| BBM_CHECK_CONCEPT (concepts::inout_linearizer, merl_linearizer< config >) | |
| BBM_CHECK_CONCEPT (concepts::samplelossfunction, nganL2_error< config >) | |
| BBM_CHECK_CONCEPT (concepts::samplelossfunction, lowL2_error< config >) | |
| BBM_CHECK_CONCEPT (concepts::samplelossfunction, bieronL2_error< config >) | |
| BBM_CHECK_CONCEPT (concepts::samplelossfunction, lowLog_error< config >) | |
| BBM_CHECK_CONCEPT (concepts::samplelossfunction, bieronLog_error< config >) | |
| BBM_CHECK_CONCEPT (concepts::samplelossfunction, standardLog_error< config >) | |
| BBM_CHECK_CONCEPT (concepts::optimization_algorithm, compass< lossfunction<>, parameter<> >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, merl_data< config >) | |
| BBM_CHECK_CONCEPT (concepts::bsdfmodel, merl< config >) | |
| template<typename FUNC , typename... T> requires ( !std::is_void_v< find_first<bbm::detail::has_reflection, T...> > || // is reflection type OR !std::is_void_v< find_first<bbm::detail::is_gettable, T...> > || // is gettable type OR requires(const FUNC& func, const T&... t) {{func(value(t)...)};} // supports direct call ) | |
| auto | apply_all (const FUNC &func, const T &... t) |
| Apply a function. | |
| template<typename T > | |
| decltype(auto) | value (T &&t) |
| return the value of an attribute, or if not an attribute the object | |
| template<typename F , size_t... IDX> requires (sizeof...(IDX) == 0 || has_constfor_lambda<F>) | |
| constexpr void | constfor (F &&f, std::index_sequence< IDX... >) |
| constfor given an index sequence of indexes. | |
| template<size_t NumItr, typename F > requires (NumItr == 0 || has_constfor_lambda<F>) | |
| constexpr void | constfor (F &&f) |
| constfor given the number of iterations | |
| template<typename... T, typename F > requires has_constforeach_lambda<F, T...> | |
| constexpr void | constforeach (F &&f) |
| constforeach over all typenames in T. | |
| template<typename T = unsigned long long int> requires std::integral<T> || std::floating_point<T> | |
| consteval size_t | max_factorial (void) |
| Returns the largest possible factorial index for a given type that does not result in an overflow. | |
| template<typename T = unsigned long long int> | |
| constexpr T | factorial (size_t n) |
| Compute n! | |
| template<typename ENUM > requires concepts::reflection::enumerate<ENUM> | |
| std::ostream & | operator<< (std::ostream &s, ENUM e) |
| ostream output uses toString conversion | |
| template<typename TA , typename TX , size_t MaxTerm = 100> | |
| auto | tgamma_lower (const TA &a, const TX &x) |
| Unnormalized incomplete lower gamma function. | |
| template<typename TA , typename TX , size_t MaxTerm = 100> | |
| auto | gamma_p (const TA &a, const TX &x) |
| Normalized incomplete lower gamma function. | |
| template<typename TA , typename TX , size_t MaxTerm = 100> | |
| auto | tgamma (const TA &a, const TX &x) |
| Unnormalized incomplete upper gamma function. | |
| template<typename TA , typename TX , size_t MaxTerm = 100> | |
| auto | gamma_q (const TA &a, const TX &x) |
| Normalized incomplete upper gamma function. | |
| template<typename TA , typename TX , size_t MaxTerm = 100> | |
| auto | gamma_pq (const TA &a, const TX &x) |
| Normalized incomplete upper and lower gamma function. | |
| template<typename TA , typename TP > | |
| auto | gamma_p_inv (const TA &a, const TP &p) |
| the inverse of the normalized upper incomplete gamma function | |
| template<typename TA , typename TQ > | |
| auto | gamma_q_inv (const TA &a, const TQ &q) |
| the inverse of the normalized lower incomplete gamma function | |
| template<typename T , literal... V> requires std::constructible_from<T, decltype(V.value)...> && (!(is_array_v<decltype(V.value)> && ...)) | |
| constexpr T | make_from () |
| Make an object T from a series of non-array template literals. | |
| template<typename T , literal A> requires bbm::is_array_v<decltype(A.value)> | |
| constexpr T | make_from () |
| Make an object T from the values passed in a array literal. | |
| template<typename T , typename... Args> | |
| constexpr T | make_from (Args &&... args) |
| Make an object T from a pack of arguments. | |
| template<typename FUNC , typename... Ts> | |
| void | multirange_for (FUNC &&func, Ts &&... containers) |
| ranged for loop over multiple containers at once | |
| template<string_literal... NAMES, typename T > requires (sizeof...(NAMES) == 0) || (concepts::gettable<T> && (sizeof...(NAMES) == std::tuple_size_v<std::decay_t<T>>)) | |
| constexpr named< anonymize_t< T >, NAMES... > | make_named (T &&t) |
| Make a named of a gettable type (with size == #NAMES); renames if the type is a named container. | |
| template<string_literal... NAMES, typename... Ts> requires (sizeof...(NAMES) == sizeof...(Ts)) | |
| constexpr auto | make_named (Ts &&... ts) |
| Make a named tuple from a list of arguments (number of arguments == #NAMES) | |
| template<string_literal... NAMES, typename T > requires is_named_v<T> | |
| constexpr auto | pick (T &&t) |
| Pick a subset/reshuffle a named container T and return as a named tuple. | |
| template<string_literal... NAMES, typename... Ts> requires (sizeof...(NAMES) == sizeof...(Ts)) | |
| named< std::tuple< Ts &... >, NAMES... > | tie (Ts &&... src) |
| Tie by name. | |
| template<typename TUP , string_literal... NAMES> requires bbm::is_tuple_v<TUP> | |
| constexpr auto | value_copy_named (const named< TUP, NAMES... > &src) |
| value copy a named tuple | |
| template<typename... T> requires (is_named_v<T> && ...) | |
| constexpr auto | named_cat (T &&... t) |
| cat named types | |
| template<size_t START, size_t COUNT, typename NAMED > requires is_named_v<NAMED> && ((START+COUNT) <= std::decay_t<NAMED>::size) | |
| constexpr auto | subnamed (NAMED &&named) |
| get a subset of a named tuple | |
| template<string_literal PREFIX, typename T , string_literal... NAMES> | |
| constexpr auto | prefix_names (named< T, NAMES... > t) |
| prefix names in type | |
| template<string_literal POSTFIX, typename T , string_literal... NAMES> | |
| constexpr auto | postfix_names (named< T, NAMES... > t) |
| postfix names in type | |
| template<typename T > requires is_named_v<T> | |
| constexpr auto | named_flatten (T &&t) |
| flatten a named type without merging names | |
| template<string_literal SEP = ".", typename T > requires is_named_v<T> | |
| constexpr auto | merge_named_flatten (T &&t) |
| flatten a named type with merging names | |
| template<typename NAMED , size_t IDX = 0, typename PARTIAL = named<std::tuple<>>> | |
| constexpr auto | sort_named (NAMED &&named, PARTIAL &&partial=PARTIAL{}) |
| sort a named tuple by name using insert-sort. | |
| template<typename NAMED , typename PROCESS , typename... Ts> requires is_named_v<NAMED> && is_named_sorted_v<NAMED> && requires(PROCESS&& p) { p.template operator()<size_t(0)>(std::declval<std::string>(), std::declval<NAMED>(), std::declval<Ts>()...); } | |
| auto | binary_search_named (const std::string &str, NAMED &&named, PROCESS &&process, Ts &&... context) |
| Run-time binary search for a matching name in a named tuple based on a string. The (index of the) found element is forwarded to a processing lambda. | |
| template<typename NAMED , typename PROCESS , typename... Ts> requires is_named_v<NAMED> && requires(PROCESS&& p) { p.template operator()<size_t(0)>(std::declval<std::string>(), std::declval<NAMED>(), std::declval<Ts>()...); } | |
| auto | linear_search_named (const std::string &str, NAMED &&named, PROCESS &&process, Ts &&... context) |
| linear search for unsorted named tuples | |
| template<typename T , typename T0 , typename... Ts> | |
| constexpr auto | poly (T &&x, T0 &&c0, Ts &&... c) |
| Compute a polynomial \( p(x) = \sum_{i=0} x^i * c_i \). | |
| template<size_t N, typename T , typename T0 , typename... Ts> | |
| constexpr auto | poly (T &&x, T0 &&c0, Ts &&... c) |
| Compute a polynomial \( p(x) = \sum_{i=0}^N x^i * c_i \). | |
| template<string_literal LIT> | |
| constexpr decltype(LIT) | operator""_sl (void) |
| custom literal operator for string_literals | |
| template<auto N, int base = 10> requires std::integral<decltype(N)> && (base <= 16) | |
| constexpr auto | to_string_literal (void) |
| convert integrals to string_literal | |
| template<typename T > requires concepts::gettable<T> | |
| auto | to_tuple (T &&t) |
| Create a tuple from any other type that supports std::get. | |
| template<typename... ARGS> | |
| constexpr auto | make_ref_tuple (ARGS &&... args) |
| Make a tuple of references. | |
| template<typename... ARGS> | |
| constexpr auto | value_copy_tuple (const std::tuple< ARGS... > &tup) |
| Value-copy a tuple. | |
| template<size_t START, size_t COUNT, typename TUP > requires is_tuple_v<TUP> && ((START+COUNT) <= std::tuple_size_v<std::decay_t<TUP>>) | |
| constexpr auto | subtuple (TUP &&tup) |
| subtuple | |
| template<typename T > | |
| constexpr auto | tuple_flatten (T &&t) |
| Recursively flatten a tuple. | |
| template<typename T > | |
| constexpr auto | tuple_add_const (T &&t) |
| tuple_add_const to each element | |
| template<typename T > | |
| constexpr auto | tuple_remove_const (T &&t) |
| tuple_remove_const from each element | |
| template<typename T > | |
| std::ostream & | operator<< (std::ostream &s, const std::vector< T > &vec) |
| template<typename... BSDFMODELs> requires (concepts::bsdfmodel<BSDFMODELs> && ...) | |
| auto | aggregate (const bsdf< BSDFMODELs > &... src) |
| Helper methods for simplifying the creation of a aggregate bsdf. | |
| template<typename... CONFs> requires (concepts::config<CONFs> && ...) | |
| auto | aggregate (const bsdf_ptr< CONFs > &... src) |
| template<typename ITR > requires (std::input_or_output_iterator<ITR> && concepts::bsdf_ptr<std::iter_reference_t<ITR>>) | |
| auto | aggregate (const ITR &begin, const ITR &end) |
Helper Methods for extracting default value / bounds | |
| template<typename T > requires concepts::bsdf_attribute<T> | |
| constexpr auto | default_value (T) |
| template<typename T > requires concepts::bsdf_attribute<T> | |
| constexpr auto | lower_bound (T) |
| template<typename T > requires concepts::bsdf_attribute<T> | |
| constexpr auto | upper_bound (T) |
| template<typename T > requires concepts::bsdf_attribute<T> | |
| constexpr auto | bsdf_attr_flag (T) |
| template<typename PARAM > requires concepts::diff_parameter<PARAM> | |
| bool | all_gradients_tracked (PARAM &¶m) |
| Check if gradients are tracked. | |
| template<typename PARAM > requires concepts::diff_parameter<PARAM> | |
| bool | any_gradients_tracked (PARAM &¶m) |
forward declarations of toString and fromString | |
| template<typename T > requires concepts::from_stringconvert<T> | |
| T | fromString (const std::string &str) |
| fromString alias | |
| template<typename T > requires concepts::to_stringconvert<T> | |
| std::string | toString (const T &obj) |
| toString alias | |
math functions | |
| BBM_CALL_BACKBONE_OP (cossin) | |
| BBM_CALL_BACKBONE_OP (eq) | |
| BBM_CALL_BACKBONE_OP (neq) | |
| BBM_CALL_BACKBONE_OP (isnan) | |
| BBM_CALL_BACKBONE_OP (isinf) | |
| BBM_CALL_BACKBONE_OP (isfinite) | |
complex functions | |
| BBM_CALL_BACKBONE_OP (real) | |
| BBM_CALL_BACKBONE_OP (imag) | |
| BBM_CALL_BACKBONE_OP (conj) | |
horizontal methods | |
| BBM_CALL_BACKBONE_OP (hsum) | |
| BBM_CALL_BACKBONE_OP (hprod) | |
| BBM_CALL_BACKBONE_OP (hmax) | |
| BBM_CALL_BACKBONE_OP (hmin) | |
| BBM_CALL_BACKBONE_OP (dot) | |
| BBM_CALL_BACKBONE_OP (norm) | |
| BBM_CALL_BACKBONE_OP (squared_norm) | |
| BBM_CALL_BACKBONE_OP (normalize) | |
| BBM_CALL_BACKBONE_OP (all) | |
| BBM_CALL_BACKBONE_OP (any) | |
| BBM_CALL_BACKBONE_OP (none) | |
| BBM_CALL_BACKBONE_OP (count) | |
select generalization to (named) tuples and types with reflection support | |
| template<typename MASK , typename A > requires (concepts::reflection::supported<A> || is_tuple_v<anonymize_t<A>>) | |
| constexpr auto | select (MASK &&mask, const A &a, const A &b) |
| template<typename MASK , typename A , typename B > requires requires(MASK m, A a, B b) {{bbm::detail::select(m,a,b)};} | |
| constexpr auto | select (MASK &&mask, A &&a, B &&b) |
Gradient methods | |
| template<typename T > | |
| auto | detach_gradient (T &t) |
| Detach the value from the gradient computations. | |
| template<typename T > | |
| auto | gradient (T &t) |
| Return the gradient. | |
| template<typename T > | |
| bool | is_gradient_tracked (const T &t) |
| Checks if gradients are enabled for a variable. | |
| template<typename T > | |
| void | track_gradient (T &t, bool toggle=true) |
| Enable/disable tracking of gradients for a variable. | |
| template<typename T > | |
| void | forward_gradient (T &t) |
| Enable forward gradient tracking. | |
| template<typename T > | |
| void | backward_gradient (T &t) |
| Enable backward/reverse gradient tracking. | |
Core Enum Operations | |
| template<typename FLAGNAME > requires std::is_enum_v<FLAGNAME> | |
| constexpr FLAGNAME | operator| (FLAGNAME a, FLAGNAME b) |
| Concat two flags. | |
| template<typename FLAGNAME > requires std::is_enum_v<FLAGNAME> | |
| constexpr FLAGNAME | operator+ (FLAGNAME a, FLAGNAME b) |
| Conact two flags. | |
| template<typename FLAGNAME > requires std::is_enum_v<FLAGNAME> | |
| constexpr FLAGNAME | operator& (FLAGNAME a, FLAGNAME b) |
| Get the shared flags. | |
| template<typename FLAGNAME > requires std::is_enum_v<FLAGNAME> | |
| constexpr FLAGNAME | operator^ (FLAGNAME a, FLAGNAME b) |
| Get the flags from 'a' that are not in 'b'. | |
| template<typename FLAGNAME > requires std::is_enum_v<FLAGNAME> | |
| constexpr FLAGNAME | operator~ (FLAGNAME a) |
| Set/unset flag that are unset/set respectively. | |
| template<typename FLAGNAME > requires std::is_enum_v<FLAGNAME> | |
| constexpr FLAGNAME & | operator&= (FLAGNAME &a, FLAGNAME b) |
| Update 'a' with a & b. | |
| template<typename FLAGNAME > requires std::is_enum_v<FLAGNAME> | |
| constexpr FLAGNAME & | operator|= (FLAGNAME &a, FLAGNAME b) |
| Update 'a' with a | b. | |
| template<typename FLAGNAME > requires std::is_enum_v<FLAGNAME> | |
| constexpr FLAGNAME & | operator+= (FLAGNAME &a, FLAGNAME b) |
| Update 'a' with a+b. | |
| template<typename FLAGNAME > requires std::is_enum_v<FLAGNAME> | |
| constexpr FLAGNAME & | operator^= (FLAGNAME &a, FLAGNAME b) |
| Update 'a' with a^b,. | |
| template<typename FLAGNAME , typename FLAG > requires std::is_enum_v<FLAG> && std::is_same_v<scalar_t<FLAGNAME>, FLAG> | |
| constexpr auto | is_set (const FLAGNAME &a, const FLAG &flag) |
| Check if all in 'flag' are also set in 'a'; compatible with packet types. | |
Extensions of size, begin, and end to non-iterable types | |
| template<typename T > | |
| size_t | size (T &&t) |
| template<typename T > | |
| auto | begin (T &&t) |
| template<typename T > | |
| auto | cbegin (T &&t) |
| template<typename T > | |
| auto | end (T &&t) |
| template<typename T > | |
| auto | cend (T &&t) |
Get by name | |
| template<string_literal NAME, string_literal... SUBNAME, typename T > requires is_named_v<T> | |
| constexpr decltype(auto) | get (T &&src) |
| template<string_literal NAME, string_literal... SUBNAME, typename T > requires is_named_v<T> | |
| constexpr decltype(auto) | get (const T &src) |
Math operators | |
@{ | |
| template<typename T , typename U > | |
| auto & | operator+= (vector< T > &v, const U &u) |
| template<typename T , typename U > | |
| auto | operator+ (const vector< T > &v, const U &u) |
| template<typename T , typename U > requires (!is_vector_v<T> && !is_bbm_vector_v<T>) | |
| auto | operator+ (const T &v, const vector< U > &u) |
| template<typename T , typename U > | |
| auto & | operator-= (vector< T > &v, const U &u) |
| template<typename T , typename U > | |
| auto | operator- (const vector< T > &v, const U &u) |
| template<typename T , typename U > | |
| auto & | operator*= (vector< T > &v, const U &u) |
| template<typename T , typename U > | |
| auto | operator* (const vector< T > &v, const U &u) |
| template<typename T , typename U > requires (!is_vector_v<T> && !is_bbm_vector_v<T>) | |
| auto | operator* (const T &v, const vector< U > &u) |
| template<typename T , typename U > | |
| auto & | operator/= (vector< T > &v, const U &u) |
| template<typename T , typename U > | |
| auto | operator/ (const vector< T > &v, const U &u) |
| template<typename T , typename U > | |
| auto & | operator%= (vector< T > &v, const U &u) |
| template<typename T , typename U > | |
| auto | operator% (const vector< T > &v, const U &u) |
Variables | |
| template<typename... T> | |
| static constexpr bool | dependent_false_v = dependent_false<T...>::value |
| template<typename... T> | |
| static constexpr bool | dependent_true_v = !dependent_false<T...>::value |
| template<typename NAMED > | |
| static constexpr bool | is_named_sorted_v = detail::is_named_sorted<NAMED>() |
| true if named tuple is sorted by name | |
| template<string_literal NAME, typename NAMED > | |
| static constexpr size_t | binary_search_named_v = detail::binary_search_named<NAME, std::decay_t<NAMED>>() |
| binary search a sorted named tuple | |
| template<typename T > | |
| static constexpr std::string_view | typestring = bbm::detail::typestring_impl<T>() |
named_equivalence trait: do two types have the same set of names? | |
| template<typename U , typename V > | |
| static constexpr bool | named_equivalence_v = named_equivalence<U,V>::value |
type traits | |
@{ | |
| template<typename T > | |
| using | is_arg = bbm::detail::is_arg_impl< std::decay_t< T > > |
| template<typename T > | |
| using | is_args = detail::is_args_impl< std::decay_t< T > > |
| template<typename T > | |
| using | is_bbm_reference = bbm::detail::is_bbm_reference_impl< std::decay_t< T > > |
| template<typename T > | |
| constexpr bool | is_arg_v = is_arg<T>::value |
| template<typename T > | |
| constexpr bool | is_args_v = is_args<T>::value |
| template<typename T > | |
| constexpr bool | is_named_v = is_named<std::decay_t<T>>::value |
| template<typename T > | |
| constexpr bool | is_bbm_reference_v = is_bbm_reference<T>::value |
is_enumerable | |
| template<typename VALUE , typename T > | |
| using | is_enumerable = bbm::detail::is_enumerable_impl< VALUE, T > |
| template<typename VALUE , typename T > | |
| constexpr bool | is_enumerable_v = is_enumerable<VALUE,T>::value |
| template<typename T > | |
| using | is_cast_itr = bbm::detail::is_cast_itr_impl< std::decay_t< T > > |
| template<typename T > | |
| using | underlying_itr_t = typename bbm::detail::underlying_itr_impl< std::decay_t< T > >::type |
| template<typename T > | |
| constexpr bool | is_cast_itr_v = is_cast_itr<T>::value |
anonymize trait: remove the names | |
| template<typename T > | |
| using | anonymize_t = std::decay_t< decltype(anonymize_v(std::declval< T >()))> |
| template<typename T > | |
| constexpr decltype(auto) | anonymize_v (T &&t) |
is_string_literal type trait | |
| template<typename T > | |
| using | is_string_literal = bbm::detail::is_string_literal_impl< std::decay_t< T > > |
| template<typename T > | |
| constexpr bool | is_string_literal_v = is_string_literal<T>::value |
is_const (reference robust) | |
| template<typename T > | |
| using | is_const = std::is_const< std::remove_reference_t< std::remove_pointer_t< T > > > |
| template<typename T > | |
| constexpr bool | is_const_v = is_const<T>::value |
type-trait for detecting string_types: char*, char[], string | |
| template<typename T > | |
| using | is_string_type = bbm::detail::is_string_type_impl< std::remove_const_t< std::decay_t< T > > > |
| template<typename T > | |
| constexpr bool | is_string_type_v = is_string_type<T>::value |
type-trait for detecting vectors | |
| template<typename T > | |
| using | is_vector = bbm::detail::is_vector_impl< std::decay_t< T > > |
| template<typename T > | |
| constexpr bool | is_vector_v = is_vector<T>::value |
type-trait for detecting tuples | |
| template<typename T > | |
| using | is_tuple = bbm::detail::is_tuple_impl< std::decay_t< T > > |
| template<typename T > | |
| constexpr bool | is_tuple_v = is_tuple<T>::value |
type-trait for detecting arrays | |
| template<typename T > | |
| using | is_array = bbm::detail::is_array_impl< std::decay_t< T > > |
| template<typename T > | |
| constexpr bool | is_array_v = is_array<T>::value |
type traits for bbm::vector | |
| template<typename T > | |
| using | is_bbm_vector = bbm::detail::is_bbm_vector_impl< std::decay_t< T > > |
| template<typename T > | |
| constexpr bool | is_bbm_vector_v = is_bbm_vector<T>::value |
| struct bbm::add_const |
| Class Members | ||
|---|---|---|
| typedef add_const_t< T > | type | |
| struct bbm::add_const< T > |
| Class Members | ||
|---|---|---|
| typedef add_lvalue_reference_t< typename add_const< remove_reference_t< T > >::type > | type | |
| typedef add_rvalue_reference_t< typename add_const< remove_reference_t< T > >::type > | type | |
| typedef add_pointer_t< typename add_const< remove_pointer_t< T > >::type > | type | |
| struct bbm::alternative |
| struct bbm::arg |
Forward declaration of bbm::arg.
| Type | = type of the argument |
| Name | = argument name |
| Default | = invocable type that returns the default value |
| struct bbm::attribute |
Base declaration of attribute; further specialized below.
| struct bbm::bsdf_fresnel_properties |
| struct bbm::persistent_reference |
Declaration of persistent_reference specialized below.
| struct bbm::remove_const |
| Class Members | ||
|---|---|---|
| typedef remove_const_t< T > | type | |
| struct bbm::remove_const< T > |
| Class Members | ||
|---|---|---|
| typedef add_lvalue_reference_t< typename remove_const< remove_reference_t< T > >::type > | type | |
| typedef add_rvalue_reference_t< typename remove_const< remove_reference_t< T > >::type > | type | |
| typedef add_pointer_t< typename remove_const< remove_pointer_t< T > >::type > | type | |
| struct bbm::sampledloss_base |
Forward declaration.
| using add_args = detail::add_args_impl<Ts...> |
| using add_args_t = typename add_args<Ts...>::type |
| using add_const_t = typename add_const<T>::type |
| using aggregatemodel = aggregatemodel_base<"Aggregate"_sl, MODELS...> |
The sum of different BSDF models.
| MODELS | = list of BSDF models over which this model aggregates |
| using anonymize_t = std::decay_t<decltype(anonymize_v(std::declval<T>()))> |
| using attribute_tuple_to_args_t = typename bbm::detail::attribute_tuple_to_args_t<std::decay_t<TUP> >::type |
Convert an attribute_tuple_t to a bbm::args.
| TUP | = attribute_tuple_t (named tuple) |
Each attribute type and name in the named tuple is converted to an bbm::arg and wrapped in a bbm::args. Each type,name combination is converted according to the following policies:
| using attribute_value_t = bbm::detail::attribute_value<std::decay_t<T> >::type |
return the type of value(t)
| using bagher = scaledmodel<microfacet<ndf::sgd<CONF>, maskingshadowing::uncorrelated<CONF>, fresnel::bagher<CONF>, microfacet_n::Cook, NAME>, bsdf_attr::SpecularScale> |
Bagher et al.'s Microfacet BSDF with Shifted Gamma Distribution.
| CONF | = bbm configuration |
| NAME | = model name (default = Bagher) |
| using bsdf_parameter = attribute<bsdf_properties<T, Flag, Default, UpperBound, LowerBound> > |
| using bsdf_roughness = attribute<bsdf_properties<T, Flag, 0.1, 1.0, constants<scalar_t<T> >::Epsilon()> > |
| using bsdf_scale = attribute<bsdf_properties<T, Flag, 0.5, 1.0> > |
| using bsdf_sharpness = attribute<bsdf_properties<T, Flag, 32.0> > |
const_persistent_reference
| using const_reference = reference<bbm::add_const_t<T> > |
const non-persistent reference
| using cooktorrance = scaledmodel<microfacet<ndf::beckmann<CONF, symmetry_v::Isotropic, false>, maskingshadowing::vgroove<CONF>, fresnel::cook<CONF>, microfacet_n::Cook, NAME>, bsdf_attr::SpecularScale> |
Cook-Torrance microfacet BSDF model.
| CONF | = type configuration to use |
| NAME | = model name (default = CookTorrance) |
This is a microfacet model set to mimic the original BSDF model as proposed by Cook and Torrance.
Implements: concepts::bsdfmodel
| using cooktorranceheitz = scaledmodel<microfacet<ndf::beckmann<CONF, symmetry_v::Anisotropic>, maskingshadowing::heightcorrelated<CONF>, fresnel::cook<CONF>, microfacet_n::Walter, NAME>, bsdf_attr::SpecularScale> |
Microfacet BSDF with Anisotropic Beckmann-based NDF.
| CONF | = bbm configuration |
| NAME | = model name (default = CookTorranceHeitz) |
Note: the differences with the regular Cook-Torrance BSSF model are:
Implements: concepts::bsdfmodel
| using cooktorrancewalter = scaledmodel<microfacet<ndf::beckmann<CONF, symmetry_v::Isotropic>, maskingshadowing::uncorrelated<CONF>, fresnel::cook<CONF>, microfacet_n::Walter, NAME>, bsdf_attr::SpecularScale> |
Microfacet BSDF with Beckmann-based NDF.
| CONF | = bbm configuration |
| NAME | = model name (default = CookTorranceWalter) |
Note: the differences with the regular Cook-Torrance BSSF model are:
Implements: concepts::bsdfmodel
| using diffuse_scale = bsdf_scale<T, bsdf_attr::DiffuseScale> |
| using dl_handle_t = void* |
| using epd = microfacet<ndf::epd<CONF>, maskingshadowing::vanginneken<CONF>, fresnel::complex<CONF>, microfacet_n::Walter, NAME> |
Exponential Power Distribution microfacet model.
This microfacet EPD BSDF does not include the specular albedo term (Eq 25).
| using find_first = typename bbm::detail::find_first_impl<TRAIT, void, Ts...>::type |
Find first type that matches a type_trait.
| using fresnel_parameter = attribute<bsdf_fresnel_properties<T,Flag> > |
| using get_config = typename std::decay_t<T>::Config |
get_config type trait
Get the config struct type
| using ggx = scaledmodel<microfacet<ndf::ggx<CONF, symmetry_v::Isotropic>, maskingshadowing::uncorrelated<CONF>, fresnel::cook<CONF>, microfacet_n::Walter, NAME>, bsdf_attr::SpecularScale> |
Microfacet BSDF with GGX-based NDF.
| CONF | = bbm configuration |
| NAME | = model name (default = GGX) |
Implements: concepts::bsdfmodel
| using ggxheitz = scaledmodel<microfacet<ndf::ggx<CONF, symmetry_v::Anisotropic>, maskingshadowing::heightcorrelated<CONF>, fresnel::cook<CONF>, microfacet_n::Walter, NAME>, bsdf_attr::SpecularScale> |
Microfacet BSDF with anisotropic GGX-based NDF with heigh correlated shadowing and masking.
| CONF | = bbm configuration |
| NAME | = model name (default = GGXHeitz) |
Implements: concepts::bsdfmodel
| using he = ndf_sampler<he_base<CONF, fresnel::complex<CONF, Spectrum_t<CONF> >, he_eq25::WithoutExp, he_eq78::Regular, 4, 64, true, 18>, 90, 1, NAME> |
| using heholzschuch = ndf_sampler<he_base<CONF, fresnel::complex<CONF, Spectrum_t<CONF> >, he_eq25::Errata, he_eq78::Regular, 4, 10, false>, 90, 1, NAME> |
| using hewestin = ndf_sampler<he_base<CONF, fresnel::complex<CONF, Spectrum_t<CONF> >, he_eq25::Errata, he_eq78::Westin, 4, 64, true, 18>, 90, 1, NAME> |
| using is_arg = bbm::detail::is_arg_impl<std::decay_t<T> > |
| using is_args = detail::is_args_impl<std::decay_t<T> > |
| using is_array = bbm::detail::is_array_impl<std::decay_t<T> > |
| using is_bbm_reference = bbm::detail::is_bbm_reference_impl<std::decay_t<T> > |
| using is_bbm_vector = bbm::detail::is_bbm_vector_impl<std::decay_t<T> > |
| using is_cast_itr = bbm::detail::is_cast_itr_impl<std::decay_t<T> > |
Type traits
| using is_const = std::is_const<std::remove_reference_t<std::remove_pointer_t<T> >> |
| using is_enumerable = bbm::detail::is_enumerable_impl<VALUE, T> |
| using is_string_literal = bbm::detail::is_string_literal_impl<std::decay_t<T> > |
| using is_string_type = bbm::detail::is_string_type_impl<std::remove_const_t<std::decay_t<T> >> |
| using is_tuple = bbm::detail::is_tuple_impl<std::decay_t<T> > |
| using is_vector = bbm::detail::is_vector_impl<std::decay_t<T> > |
| using iterable_value_t = std::decay_t<decltype( *bbm::begin(std::declval<T>()) )> |
| using lowashikhminshirley = scaledmodel<ashikhminshirley<CONF, fresnel::cook<CONF, ior::ior<Value_t<CONF> >>, symmetry_v::Isotropic, NAME>, bsdf_attr::SpecularScale> |
Low et al.'s version of the specular component of the Ashikhmin-Shirley BSDF: uses the Cook-Torrance Fresnel component with index of refraction.
| using lowcooktorrance = cooktorrance<CONF, "LowCookTorrance"> |
Low et al.'s version of the specular component of the Cook-Torrance BSDF; this directly mirrors the original Cook-Torrance implementation.
| using lowmicrofacetfit = lowmicrofacet<CONF, microfacet_n::Cook, NAME> |
Shorthand for the Low BSDF model compatible with the fits listed in their supplemental material which differs from the model in the paper by using a different normalization factor.
| using mat2d = bbm::detail::mat<vec2d<T>, 2> |
2D matrix
| using mat3d = bbm::detail::mat<vec3d<T>, 3> |
3D matrix
| using merl = ndf_sampler<merl_data<Config, "Merl">, 90, 1> |
Data-driven MERL BSDF model with data-driven backscatter based importance sampling.
| using named_cat_t = decltype( named_cat(std::declval<T>()...) ) |
type of concatting multiple named tuples.
| using nganashikhminshirley = scaledmodel<ashikhminshirley<CONF, fresnel::schlick<CONF, ior::reflectance<Value_t<CONF> >>, symmetry_v::Isotropic, NAME>, bsdf_attr::SpecularScale> |
Ngan's Ashkihmin-Shirley model; does not include Ashikhmin-Shirley's diffuse component, and it is isotropic. THis can be achieved with a simple alias.
| using nganblinnphong = phong<CONF, NAME> |
Ngan's Blinn-Phong: same as modifed phong; a simple alias suffices.
| using ngancooktorrance = scaledmodel<microfacet<ndf::beckmann<CONF, symmetry_v::Isotropic>, maskingshadowing::vgroove<CONF>, fresnel::schlick<CONF>, microfacet_n::Cook, NAME>, bsdf_attr::SpecularScale> |
Ngan's Cook-Torrance is normalized by pi, is isotropic, and has vgroove masking and shadowing, schlick fresnel, F0 reflectance, and backman distribution.
This is achieved by a defining a custom microfacet model.
| using nganhe = scaledmodel<ndf_sampler<he_base<CONF, fresnel::cook<CONF>, he_eq25::Errata, he_eq78::Westin, 4, 64, true, 18>, 90, 1, "NganHe">, bsdf_attr::SpecularScale> |
Ngan's He et al.'s BSDF likely uses the Westin et al. formulation but with non-complex eta.
| using nganward = ward<CONF, symmetry_v::Isotropic, NAME> |
Ngan's Ward: standard Ward with isotropic roughness. This can be achieved with a simple alias.
| using nganwardduer = wardduer<CONF, symmetry_v::Isotropic, NAME> |
Ngan's Ward-Duer: stanard Ward-Duer with isotropic roughness. This can be achieved with a simple alias.
| using phongwalter = scaledmodel<microfacet<ndf::phong<CONF>, maskingshadowing::uncorrelated<CONF>, fresnel::cook<CONF>, microfacet_n::Walter, NAME>, bsdf_attr::SpecularScale> |
Microfacet BSDF with Phong-based NDF.
| CONF | = bbm configuration |
| NAME | = model name (default = PhongWalter) |
Implements: concepts::bsdfmodel
| using postfix_names_t = decltype(post_names<POSTFIX>(std::declval<T>())) |
type of named tuple with post-fixed name.
| using prefix_names_t = decltype(prefix_names<PREFIX>(std::declval<T>())) |
type of named tuple with pre-fixed name.
| using remove_const_t = typename remove_const<T>::type |
| using ribardiere = scaledmodel<microfacet<ndf::studentt<CONF, symmetry_v::Isotropic>, maskingshadowing::uncorrelated<CONF>, fresnel::cook<CONF>, microfacet_n::Walter, NAME>, bsdf_attr::SpecularScale> |
Microfacet BSDF with Student-T based NDF.
| CONF | = bbm configuration |
| NAME | = model name (default = Ribadiere) |
Implements: concepts::bsdfmodel
| using ribardiereanisotropic = scaledmodel<microfacet<ndf::studentt<CONF, symmetry_v::Anisotropic>, maskingshadowing::uncorrelated<CONF>, fresnel::cook<CONF>, microfacet_n::Walter, NAME>, bsdf_attr::SpecularScale> |
Microfacet BSDF with the Anisotropic Student-T based NDF.
| CONF | = bbm configuration |
| NAME | = model name (default = RibadiereAnisotripic) |
Implements: concepts::bsdfmodel
| using Spectrum_t = typename get_config<T>::Spectrum |
| using specular_scale = bsdf_scale<T, bsdf_attr::SpecularScale> |
| using subnamed_t = decltype( subnamed<START,COUNT,NAMED>( std::declval<NAMED>() ) ) |
type of subnamed
| using subtuple_t = decltype( subtuple<START,COUNT>(std::declval<TUP>()) ) |
subtuple type
| using symmetry_t = std::conditional_t<(V == symmetry_v::Isotropic), Value, vec2d<Value> > |
Determine the data type for storing isotropic or anisotropic reflectance parameters.
| using to_tuple_t = decltype( to_tuple(std::declval<T>()) ) |
type of converting a type that supports std::get to a tuple
| using tuple_add_const_t = decltype( tuple_add_const( std::declval<std::decay_t<T> >() ) ) |
tuple_add_const type
| using tuple_cat_t = decltype( std::tuple_cat( std::declval<Ts>()... ) ) |
tuple_cat_t
Returns the type of std::tuple_cat
| using tuple_flatten_t = decltype( tuple_flatten( std::declval<std::decay_t<T> >() ) ) |
flattened tuple type
| using tuple_remove_const_t = decltype( tuple_remove_const( std::declval<std::decay_t<T> >() ) ) |
tuple_remove_const type
| using underlying_itr_t = typename bbm::detail::underlying_itr_impl<std::decay_t<T> >::type |
| using value_copy_named_t = decltype( value_copy_named(std::declval<T>()) ) |
type of value copying a named typle
| using value_copy_tuple_t = decltype( value_copy_tuple( std::declval<std::decay_t<T> >() ) ) |
value-copy type of a tuple.
| using Value_t = typename get_config<T>::Value |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
| auto aggregate | ( | const bsdf< BSDFMODELs > &... | src | ) |
Helper methods for simplifying the creation of a aggregate bsdf.
This is a companion method to aggregate in aggregatemodel.h. Based on the available information at compile time, aggrgate chooses the most optimal aggregate bsdf defintion:
In the latter two cases, the underlying BSDFMODEL information is only known at run-time, and hence, the run-time aggregatebsdf is required. In the first case, because the user specifies models directly, the result is expected to be a model too. Finally, a bsdf<aggregatemodel> is less overhead than an aggregatebsdf, and hence, it is preferred when at compile time the BSDF models are known.
Note: ownership of the data depenends on the underlying model. In the case of aggregate bsdfs, ownership still lies with the original BSDF.
| auto aggregate | ( | const bsdf_ptr< CONFs > &... | src | ) |
| auto aggregate | ( | const ITR & | begin, |
| const ITR & | end | ||
| ) |
| aggregatemodel< MODELS... > aggregate | ( | const MODELS &... | models | ) |
Method for simplifying the creation of an aggregate model.
| models | = comma separated list of models. |
Based on the list of BSDF models, an aggregate model is created and initialized with the parameters of the models in the parameter list.
|
inline |
Check if gradients are tracked.
|
constexpr |
|
inline |
|
inline |
Apply a function.
Applies a function to a series of arguments. The following rules are used to determine the return type:
| void backward_gradient | ( | T & | t | ) |
Enable backward/reverse gradient tracking.
| t | = variable to track |
static_assert if T is not differentiable.
|
inline |
backward computations => passthrough to backbone
| BBM_CALL_BACKBONE_OP | ( | all | ) |
| BBM_CALL_BACKBONE_OP | ( | any | ) |
| BBM_CALL_BACKBONE_OP | ( | conj | ) |
| BBM_CALL_BACKBONE_OP | ( | cossin | ) |
| BBM_CALL_BACKBONE_OP | ( | count | ) |
| BBM_CALL_BACKBONE_OP | ( | dot | ) |
| BBM_CALL_BACKBONE_OP | ( | eq | ) |
| BBM_CALL_BACKBONE_OP | ( | hmax | ) |
| BBM_CALL_BACKBONE_OP | ( | hmin | ) |
| BBM_CALL_BACKBONE_OP | ( | hprod | ) |
| BBM_CALL_BACKBONE_OP | ( | hsum | ) |
| BBM_CALL_BACKBONE_OP | ( | imag | ) |
| BBM_CALL_BACKBONE_OP | ( | isfinite | ) |
| BBM_CALL_BACKBONE_OP | ( | isinf | ) |
| BBM_CALL_BACKBONE_OP | ( | isnan | ) |
| BBM_CALL_BACKBONE_OP | ( | neq | ) |
| BBM_CALL_BACKBONE_OP | ( | none | ) |
| BBM_CALL_BACKBONE_OP | ( | norm | ) |
| BBM_CALL_BACKBONE_OP | ( | normalize | ) |
| BBM_CALL_BACKBONE_OP | ( | real | ) |
| BBM_CALL_BACKBONE_OP | ( | squared_norm | ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdf | , |
| bsdf< bsdfmodel<> > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdf_ptr | , |
| bsdf_ptr< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| ashikhminshirley< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| ashikhminshirleyfull< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| bagher< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| he_base< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| lafortune< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| lambertian< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| lowmicrofacetfit< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| lowsmooth< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| merl< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| merl_data< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| microfacet< ndf<>, maskingshadowing<>, concepts::archetype::fresnel<> > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| nganlafortune< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| orennayar< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| phong< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| ward< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| wardduer< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::bsdfmodel | , |
| wardduergeislermoroder< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::inout_linearizer | , |
| merl_linearizer< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::loss | , |
| loss< lossfunction< config > > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::loss_ptr | , |
| loss_ptr< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::optimization_algorithm | , |
| compass< lossfunction<>, parameter<> > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::optimizer_ptr | , |
| optimizer_ptr< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::sampledlossfunction | , |
| batch< concepts::archetype::sampledlossfunction<> > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::sampledlossfunction | , |
| bbm::sampledlossfunction< bsdfmodel<>, bsdfmodel<>, samplelossfunction<>, inout_linearizer<> > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::samplelossfunction | , |
| bieronL2_error< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::samplelossfunction | , |
| bieronLog_error< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::samplelossfunction | , |
| lowL2_error< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::samplelossfunction | , |
| lowLog_error< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::samplelossfunction | , |
| nganL2_error< config > | |||
| ) |
| BBM_CHECK_CONCEPT | ( | concepts::samplelossfunction | , |
| standardLog_error< config > | |||
| ) |
| BBM_DECLARE_CORE_TYPE | ( | BsdfFlag | , |
| T | , | ||
| bbm::replace_scalar_t< bbm::remove_diff_t< Value_t< T > >, bbm::bsdf_flag > | |||
| ) |
| BBM_DECLARE_CORE_TYPE | ( | Complex | , |
| T | , | ||
| bbm::complex< Value_t< T > > | |||
| ) |
| BBM_DECLARE_CORE_TYPE | ( | Constants | , |
| T | , | ||
| bbm::constants< Scalar_t< T > > | |||
| ) |
| BBM_DECLARE_CORE_TYPE | ( | Mask | , |
| T | , | ||
| bbm::mask_t< Value_t< T > > | |||
| ) |
| BBM_DECLARE_CORE_TYPE | ( | Mat2d | , |
| T | , | ||
| bbm::mat2d< Value_t< T > > | |||
| ) |
| BBM_DECLARE_CORE_TYPE | ( | Mat3d | , |
| T | , | ||
| bbm::mat3d< Value_t< T > > | |||
| ) |
| BBM_DECLARE_CORE_TYPE | ( | Scalar | , |
| T | , | ||
| bbm::scalar_t< Value_t< T > > | |||
| ) |
| BBM_DECLARE_CORE_TYPE | ( | Size | , |
| T | , | ||
| bbm::index_t< Value_t< T > > | |||
| ) |
| BBM_DECLARE_CORE_TYPE | ( | Vec2d | , |
| T | , | ||
| bbm::vec2d< Value_t< T > > | |||
| ) |
| BBM_DECLARE_CORE_TYPE | ( | Vec3d | , |
| T | , | ||
| bbm::vec3d< Value_t< T > > | |||
| ) |
| BBM_DECLARE_FORWARD_IMPORT | ( | bsdfsample | ) |
| BBM_DECLARE_FORWARD_IMPORT | ( | vec3dpair | ) |
| BBM_DECLARE_SHORTHAND | ( | BsdfSample_t | , |
| bsdfsample | |||
| ) |
| BBM_DECLARE_SHORTHAND | ( | Vec3dPair_t | , |
| vec3dpair | |||
| ) |
| BBM_ENUM | ( | bsdf_attr | , |
| None | , | ||
| DiffuseScale | , | ||
| DiffuseParameter | , | ||
| SpecularScale | , | ||
| SpecularParameter | , | ||
| Dependent | , | ||
| Diffuse | , | ||
| Specular | , | ||
| Scale | , | ||
| Parameter | , | ||
| All | |||
| ) |
| BBM_ENUM | ( | unit_t | , |
| Radiance | , | ||
| Importance | |||
| ) |
| auto begin | ( | T && | t | ) |
|
inline |
Run-time binary search for a matching name in a named tuple based on a string. The (index of the) found element is forwarded to a processing lambda.
| str | = string of name to find |
| named | = (sorted) named tuple |
| process | = lambda function to process the found element |
| context... | = additional parameters to pass to process |
Q&A:
|
inlineconstexpr |
| auto cbegin | ( | T && | t | ) |
| auto cend | ( | T && | t | ) |
|
inline |
|
inlineconstexpr |
constfor given the number of iterations
|
inlineconstexpr |
constfor given an index sequence of indexes.
|
inlineconstexpr |
constforeach over all typenames in T.
| std::pair< vec3d< T >, vec3d< T > > convertFromHalfwayDifference | ( | const vec3d< T > & | half, |
| const vec3d< T > & | diff | ||
| ) |
Convert from Halfway-Difference to Canonical parameterization.
| a | = first vector |
| b | = second vector |
| std::pair< vec3d< T >, vec3d< T > > convertToHalfwayDifference | ( | const vec3d< T > & | a, |
| const vec3d< T > & | b | ||
| ) |
Convert fro Canonical to the Halfway-Difference parameterization.
| a | = first vector |
| b | = second vector |
|
inline |
Returns the righthand (counterclockwise) perpendicular vector of a 2D vector.
| v | Input vector |
|
inlineconstexpr |
Cross product of two 3D vectors.
| a | = first vector |
| b | = second vector |
|
inlineconstexpr |
| auto detach_gradient | ( | T & | t | ) |
Detach the value from the gradient computations.
| t | = variable to detach |
Note: if the variable does not support gradients, then the value is returned unchanged.
|
inline |
Get the detached values from a parameter set.
| vec3d< T > difference | ( | const vec3d< T > & | a, |
| const vec3d< T > & | b | ||
| ) |
Difference vector.
| a | = first vector |
| b | = second vector |
| auto end | ( | T && | t | ) |
| void enumerate | ( | T && | value, |
| CALLBACK && | callback | ||
| ) |
Convertible to VALUE => callback.
|
inline |
Enumerate the default values of the attributes from a bsdf model.
|
inline |
Enumerate the lower bounds of the attributes from a bsdf model.
|
inline |
Enumerate the values of the attributes from a bsdf model.
|
inline |
Enumerate the upper bounds of the attributes from a bsdf model.
|
constexpr |
Compute n!
| T | = type to return (default = unsigned long long int) |
Throws an exception if n > max_factorial<T>.
| void forward_gradient | ( | T & | t | ) |
Enable forward gradient tracking.
| t | = variable to track |
static_assert if T is not differentiable.
|
inline |
Forward computation of gradients on a parameter set.
|
inline |
fromString alias
|
inline |
Normalized incomplete lower gamma function.
\( P(a,x) = \frac{\gamma(a,x)}{\Gamma(a)} = \frac{1}{\Gamma(a)} \int^x_0 e^{-t} t^{a-1} dt \)
|
inline |
the inverse of the normalized upper incomplete gamma function
\( x = P^{-1}(a, p)\)
such that \( p = P(a, x) \).
|
inline |
Normalized incomplete upper and lower gamma function.
|
inline |
Normalized incomplete upper gamma function.
\( Q(a,x) = 1 - P(a,x) = \frac{\Gamma(a,x)}{\Gamma(a)} = \frac{1}{\Gamma(a)} \int^\infty_x e^{-t} t^{a-1} dt \)
|
inline |
the inverse of the normalized lower incomplete gamma function
\( x = Q^{-1}(a, q)\)
such that \( q = Q(a, x) \).
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
Get the gradient from a parameter set.
| auto gradient | ( | T & | t | ) |
Return the gradient.
| t | = variable to return the tracked gradient |
static_assert if T is not differentiable.
| vec3d< T > halfway | ( | const vec3d< T > & | a, |
| const vec3d< T > & | b | ||
| ) |
Halfway vector (3D)
| a | = first vector |
| b | = second vector |
|
inlineconstexpr |
create an identity matrix
| bool is_gradient_tracked | ( | const T & | t | ) |
Checks if gradients are enabled for a variable.
| t | = variable to check |
|
inlineconstexpr |
Check if all in 'flag' are also set in 'a'; compatible with packet types.
|
inline |
linear search for unsorted named tuples
| str | = string to find |
| named | = named tuple to search |
| process | = lambda function to process the found element |
| context... | = additional parameters to pass to process |
Process will be called with IDX == NAMED::size if not found.
|
inline |
|
inline |
Generalize backbone::lookup to include containers of tuples/named tuples/reflection-supported types.
| RET | = return type; must support reflection |
| container | = a container to lookup from |
| idx | = index of the elements to lookup |
| mask | = enable/disable lanes |
When tuple/named or reflection supported type, we lookup each element seperately to support packet data structures.
|
inlineconstexpr |
| alternative< BSDFMODEL >::type make_alternative | ( | const BSDFMODEL & | src | ) |
COnstruct an equivalent alternative BSDF. Should be specialized for each model that provides this option.
| bsdf_ptr< get_config< BSDFTYPE > > make_bsdf_ptr | ( | ARGS... | args | ) |
Helper method for making a bsdf_ptr from a BSDF (new construction)
| BSDFTYPE | = BSDF type that the ptr will point to. |
| args | = constuctor arguments of the BSDF type. |
This method allocates a new BSDF of BSDFTYPE, and constructs it with the given arguments. The bsdf_ptr owns the BSDF type object.
| bsdf_ptr< get_config< BSDFMODEL > > make_bsdf_ptr | ( | ARGS... | args | ) |
Helper method for making a bsdf_ptr from a BSDF MODEL (new construction)
| BSDFMODEL | = BSDF model that the ptr will point to. |
| args | = constuctor arguments of the BSDF type. |
This method allocates a new BSDF of bsdf<BSDFMODEL>, and constructs it with the given arguments. The bsdf_ptr owns the BSDF type object.
| bsdf_ptr< get_config< BSDFMODEL > > make_bsdf_ptr | ( | const BSDFMODEL & | arg | ) |
| bsdf_ptr< get_config< BSDFTYPE > > make_bsdf_ptr | ( | const BSDFTYPE & | arg | ) |
|
inlineconstexpr |
Make an object T from a series of non-array template literals.
| T | = object-type to create |
| V | = template literals to pass as constructor arguments. |
Will be at compile time if the constructor of T is constexpr.
|
inlineconstexpr |
Make an object T from the values passed in a array literal.
| T | = object-type to create |
| A | = std::array<arg_type, N>, i.e., N arguments to be passed to T. |
|
inlineconstexpr |
Make an object T from a pack of arguments.
| T | = object type to construct |
| args | = argument pack |
This function is essentially identical to directly calling T(args...) except for one key difference: this method will compile even if T is not constructible from 'args'. At run-time an exeption is thrown in the latter case.
| loss_ptr< get_config< LOSSTYPE > > make_loss_ptr | ( | ARGS &&... | args | ) |
Helper method for making loss_ptr from a LOSS (new construction)
| LOSSTYPE | = LOSS type that the pointer will point to. |
| args | = constructor arguments for the LOSS type consructor |
This method allocates a new LOSS of LOSSTYPE, and constructs it with the given arguments. The loss_ptr owns the created object.
| loss_ptr< get_config< LOSSFUNC > > make_loss_ptr | ( | ARGS &&... | args | ) |
| loss_ptr< get_config< LOSSFUNC > > make_loss_ptr | ( | const LOSSFUNC & | arg | ) |
| loss_ptr< get_config< LOSSTYPE > > make_loss_ptr | ( | const LOSSTYPE & | arg | ) |
|
constexpr |
Make a named of a gettable type (with size == #NAMES); renames if the type is a named container.
|
constexpr |
Make a named tuple from a list of arguments (number of arguments == #NAMES)
| optimizer_ptr< get_config< OPTIMIZER > > make_optimizer_ptr | ( | ARGS &&... | args | ) |
Helper method for making an optimizer_ptr from an optimizer (new construction)
| OPTIMIZER | = optimizer type that the pointer will point to. |
| args | = constructor arguments for the OPTIMIZER |
The method allocates a new OPTIMIZER and constructs it with the given arguments. The optimizer_ptr owns the created object.
| optimizer_ptr< get_config< OPTIMIZATION_ALGORITHM > > make_optimizer_ptr | ( | ARGS &&... | args | ) |
Helper method for making an optimizer_ptr from a OPTIMIZATION_ALGORITHM.
| OPTIMIZATION_ALGORITHM | = algorithm to point to |
| args | = constructor arguments |
Allocates a new optmizer<OPTIMIZATION_ALGORITHM> and constructs it with the given args. The optimizer_ptr owns the OPTIMIZER object.
| optimizer_ptr< get_config< OPTIMIZATION_ALGORITHM > > make_optimizer_ptr | ( | const OPTIMIZATION_ALGORITHM & | arg | ) |
Helper method for making an optimizer_ptr from a OPTIMIZATION_ALGORITHM (copy construction)
| arg | = optimization algorithm to copy |
A copy of the optimizer<OPTIMIZATION_ALGORITHM> is allocated (copied from arg). The optimizer_ptr owns the copied object.
| optimizer_ptr< get_config< OPTIMIZER > > make_optimizer_ptr | ( | const OPTIMIZER & | arg | ) |
Helper method for making an optimizer_ptr from a OPTIMZER (copy construction)
| arg | = optimizer to copy |
A copy of the optimizer is allocated. The optimizer_ptr owns the copied object
| optimizer_ptr< CONF > make_optimizer_ptr | ( | const optimizer_ptr< CONF > & | arg | ) |
Helper method for making an optimizer_ptr (avoid optimizer_ptr of optimizer_ptr>)
| arg | = optimizer_ptr object we want to copy |
|
inlineconstexpr |
Make a tuple of references.
Returns std::tuple<ARGS...>, and therefore this method differs from:
| consteval size_t max_factorial | ( | void | ) |
Returns the largest possible factorial index for a given type that does not result in an overflow.
| T | = type to compute factorial in (default = unsigned long long int) |
|
inlineconstexpr |
flatten a named type with merging names
merge_named_flatten( named< std::tuple<named<std::tuple<float, char>, "A", "B">, int>, "C", "D" > )
yields
named<std::tuple<float, char, int>, "C.A", "C.B", "D">
The default seperator symbol is ".", but this can be changed by passing a different symbols as the first template argument.
|
inline |
ranged for loop over multiple containers at once
| func | = function to call in each loop. The function is expected to return void, and takes as many arguments as there are containers. For each call, a reference to the corresponding element in each container is passed. |
| containers... | = containers. If not iterable, then the value is passed to each call of FUNC. |
Example:
This method will compute 'a_container += b_container'.
Note: all containers must either have size==1 or the same size.
|
inlineconstexpr |
cat named types
named_cat( named<std::tuple<...>, "A", "B">{a,b}, named<std::tuple<...>, "C">{c} )
yields
named<std::tuple<...>, "A", B", "C">{a,b,c}
|
inlineconstexpr |
flatten a named type without merging names
named_flatten( named< std::tuple<named<std::tuple<float, char>, "A", "B">, int>, "C", "D" > )
yields
named<std::tuple<float, char, int>, "A", "B", "D">
| arg< void, NAME > operator""_arg | ( | void | ) |
arg literal
|
constexpr |
custom literal operator for string_literals
|
inline |
|
inline |
|
inlineconstexpr |
Get the shared flags.
|
inlineconstexpr |
Update 'a' with a & b.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineconstexpr |
Conact two flags.
|
inlineconstexpr |
Update 'a' with a+b.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| std::ostream & operator<< | ( | std::ostream & | s, |
| const bbm::bsdf_prop & | prop | ||
| ) |
| std::ostream & operator<< | ( | std::ostream & | s, |
| const bbm::bsdfsample< CONF > & | ss | ||
| ) |
| std::ostream & operator<< | ( | std::ostream & | s, |
| const bbm::vec3dpair< CONF > & | rs | ||
| ) |
| std::ostream & operator<< | ( | std::ostream & | s, |
| const BSDF & | bsdf | ||
| ) |
| std::ostream & operator<< | ( | std::ostream & | s, |
| const BSDFMODEL & | model | ||
| ) |
ostream output uses toString conversion
| std::ostream & operator<< | ( | std::ostream & | s, |
| const NDF & | ndf | ||
| ) |
| std::ostream & operator<< | ( | std::ostream & | s, |
| const std::vector< T > & | vec | ||
| ) |
| std::ostream & operator<< | ( | std::ostream & | s, |
| ENUM | e | ||
| ) |
ostream output uses toString conversion
|
inlineconstexpr |
Get the flags from 'a' that are not in 'b'.
|
inlineconstexpr |
Update 'a' with a^b,.
|
inlineconstexpr |
Concat two flags.
|
inlineconstexpr |
Update 'a' with a | b.
|
inlineconstexpr |
Set/unset flag that are unset/set respectively.
|
inline |
Enumerate the default parameters of a BSDF in a vector.
| model | = bsdf model to extract default parameters from |
| flag | = bsdf_attr flag to select a subset of the parameters |
|
inline |
Enumerate the default parameters of a BSDF model in a vector.
| model | = bsdf model to extract default parameters from |
| flag | = bsdf_attr flag to select a subset of the parameters |
|
inline |
Enumerate the lower bound of the parameters of a BSDF in a vector.
| model | = bsdf model to extract lower bound from |
| flag | = bsdf_attr flag to select a subset of the parameters |
|
inline |
Enumerate the lower bound of the parameters of a BSDF model in a vector.
| model | = bsdf model to extract lower bound from |
| flag | = bsdf_attr flag to select a subset of the parameters |
|
inline |
Enumerate the upper bound of the parameters of a BSDF in a vector.
| model | = bsdf model to extract upper bound from |
| flag | = bsdf_attr flag to select a subset of the parameters |
|
inline |
Enumerate the upper bound of the parameters of a BSDF model in a vector.
| model | = bsdf model to extract upper bound from |
| flag | = bsdf_attr flag to select a subset of the parameters |
|
inline |
Enumerate the parameters of a BSDF in a vector.
| model | = bsdf model to extract parameters from |
| flag | = bsdf_attr flag to select a subset of the parameters |
|
inline |
Enumerate the parameters of a BSDF model in a vector.
| model | = bsdf model to extract parameters from |
| flag | = bsdf_attr flag to select a subset of the parameters |
|
inline |
Returns the lefthand (clockwise) perpendicular vector of a 2D vector.
| v | Input vector |
|
constexpr |
Pick a subset/reshuffle a named container T and return as a named tuple.
|
inlineconstexpr |
Compute a polynomial \( p(x) = \sum_{i=0} x^i * c_i \).
| x | = value to evaluate the polynomial at |
| c0 | = constant coefficient |
| c... | = remainder of coefficients. |
Determins the max degree based on the number of coefficients.
|
inlineconstexpr |
Compute a polynomial \( p(x) = \sum_{i=0}^N x^i * c_i \).
| N | = max polynomial degree |
| x | = value to evaluate the polynomial at |
| c0 | = constant coefficient |
| c... | = remainder of coefficients. |
Will only evaluate the coefficients less than max degree+1.
|
inlineconstexpr |
postfix names in type
postfix_names<"_BLA", named<std::tuple<...>, "A", "B">{a,b}
yields
named<std::tuple<...>, "A_BLA", "B_BLA">{a,b}
|
inlineconstexpr |
prefix names in type
prefix_names<"BLA_", named<std::tuple<...>, "A", "B">{a,b}
yields
named<std::tuple<...>, "BLA_A", "BLA_B">{a,b}
|
inline |
Reflects a 3D vector around Z=1.
| v | Input vector to reflect |
|
inline |
Reflects a 3D vector.
| v | Input vector to reflect |
| normal | Normal to reflect around |
|
inline |
2D rotation matrix
| cossin | = (cos, sin) |
| mat2d< std::decay_t< T > > rotation2d | ( | T | angle | ) |
2D rotation matrix
| angle | = rotation angle |
| mat3d< std::decay_t< T > > rotationX | ( | const vec2d< T > & | cossin | ) |
Rotation around the X-axis.
| angle | = rotation angle |
| mat3d< std::decay_t< T > > rotationX | ( | T | angle | ) |
Rotation around the X-axis.
| angle | = rotation angle |
| mat3d< std::decay_t< T > > rotationY | ( | const vec2d< T > & | cossin | ) |
Rotation around the Y-axis.
| angle | = rotation angle |
| mat3d< std::decay_t< T > > rotationY | ( | T | angle | ) |
Rotation around the Y-axis.
| angle | = rotation angle |
| mat3d< std::decay_t< T > > rotationZ | ( | const vec2d< T > & | cossin | ) |
Rotation around the Z-axis.
| angle | = rotation angle |
| mat3d< std::decay_t< T > > rotationZ | ( | T | angle | ) |
Rotation around the Z-axis.
| angle | = rotation angle |
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
Generalization of backbone::set to include tuples/named/reflection-supported objects.
| container | container to set data in |
| indx | index at which to set the data |
| value | value to store |
| mask | enable/disbale lanes |
When tuple/named or reflection-type, we set each element seperately to support packet data structures.
| size_t size | ( | T && | t | ) |
|
inlineconstexpr |
sort a named tuple by name using insert-sort.
| named | = named tuple to sort |
| IDX | = start index of elements to sort; recommended default value = 0 |
| PARTIAL | = partial solution to insert into; recommended default value = empty named tuple |
Details: this is a constexpr recursive method. It will attempt to insert the IDX-th element in PARTIAL, and then recurse to the IDX+1 element, until all elements are inserted.
|
inlineconstexpr |
get a subset of a named tuple
| START | = index of first element |
| COUNT | = number of elements |
| named | = named tuple |
|
inlineconstexpr |
subtuple
| START | = start index of elements to include in the new tuple |
| COUNT | = number of elements to include |
|
inline |
Unnormalized incomplete upper gamma function.
\( \gamma(a,x) = \int^\infty_x e^{-t} t^{a-1} dt \)
|
inline |
Unnormalized incomplete lower gamma function.
\( \gamma(a,x) = \int^x_0 e^{-t} t^{a-1} dt \)
| named< std::tuple< Ts &... >, NAMES... > tie | ( | Ts &&... | src | ) |
Tie by name.
|
constexpr |
convert integrals to string_literal
| N | = (integer) literal to covert into a string_literal |
| base | = conversion base; must be less than 16. Default base=10. |
|
inline |
Create a tuple from any other type that supports std::get.
| mat3d< std::decay_t< T > > toGlobalShadingFrame | ( | const vec3d< T > & | normal | ) |
Construct a local shading frame to global frame transformation given a normal direction.
| normal | = local shading frame normal direction |
Create a shading frame transformation from the local to the global shading frame determined by the surface normal. The tangent vector is randomly selected.
|
inline |
Construct a global to local shading frame transformation.
|
inline |
toString alias
| void track_gradient | ( | T & | t, |
| bool | toggle = true |
||
| ) |
Enable/disable tracking of gradients for a variable.
| t | = variable to track |
| toggle | = enable/disable |
static_assert if T is not differentiable.
|
inline |
Enable gradients for a parameter set.
|
inlineconstexpr |
Bring 'transpose' in the bbm namespace.
|
inlineconstexpr |
tuple_add_const to each element
|
inlineconstexpr |
Recursively flatten a tuple.
The resulting tuple is the concatenation of all elements of child tuples.
|
inlineconstexpr |
tuple_remove_const from each element
|
inlineconstexpr |
| decltype(auto) value | ( | T && | t | ) |
return the value of an attribute, or if not an attribute the object
|
inlineconstexpr |
value copy a named tuple
| src | = named tuple, possibly with references |
|
inlineconstexpr |
Value-copy a tuple.
| tup | = tuple, possibly with references |
For example std::tuple<int&, int> will be converted to std::tuple<int, int>
|
staticconstexpr |
binary search a sorted named tuple
| NAME | = name to search for |
| NAMED | = named tuple |
|
staticconstexpr |
|
staticconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
staticconstexpr |
true if named tuple is sorted by name
|
inlineconstexpr |
|
inlineconstexpr |
|
staticconstexpr |
|
staticconstexpr |