Loading...
Searching...
No Matches
Classes | Namespaces | Concepts
ior.h File Reference

Defines 'ior' and 'reflectance' types. More...

#include <type_traits>
#include "core/attribute.h"

Go to the source code of this file.

Classes

struct  ior_tag< T >
 
struct  complex_ior_tag< T >
 
struct  reflectance_tag< T >
 

Namespaces

namespace  bbm
 
namespace  bbm::ior
 Namespace for 'ior' and 'reflectance' types.
 

Concepts

concept  bbm::ior::is_ior_v
 
concept  bbm::ior::is_complex_ior_v
 
concept  bbm::ior::is_reflectance_v
 
concept  bbm::ior::is_ior_type
 

Typedefs

Type definition
template<typename T >
using ior = attribute< ior_tag< T > >
 
template<typename T >
using complex_ior = attribute< complex_ior_tag< T > >
 
template<typename T >
using reflectance = attribute< reflectance_tag< T > >
 

Functions

Conversion between 'ior' and 'reflectance'

Conversion between 'ior' and 'reflectance' types

Parameters
target= type to copy to.
source= which variable to copy from
template<typename T >
void convert (reflectance< T > &target, const ior< T > &i)
 
template<typename T >
void convert (ior< T > &target, const reflectance< T > &r)
 
template<typename T >
void convert (complex< T > &target, const ior< T > &i)
 

Detailed Description

Defines 'ior' and 'reflectance' types.

Index of refraction (ior) and reflectance at normal incidence are two common methods for parameterizing Fresnel reflectance. Both are floats. BBM defines both as an attribute variable with property 'tags': reflectance_tag and ior_tag.


Class Documentation

◆ bbm::ior::ior_tag

struct bbm::ior::ior_tag
template<typename T>
struct bbm::ior::ior_tag< T >
Class Members
typedef T type

◆ bbm::ior::complex_ior_tag

struct bbm::ior::complex_ior_tag
template<typename T>
struct bbm::ior::complex_ior_tag< T >
Class Members
typedef complex< T > type

◆ bbm::ior::reflectance_tag

struct bbm::ior::reflectance_tag
template<typename T>
struct bbm::ior::reflectance_tag< T >
Class Members
typedef T type