Classes | |
| struct | interpreter |
| Python interpreter with BBM module imported. More... | |
| struct | py_cast |
| Default casting. More... | |
| struct | py_cast< TARGET > |
| specialization for bbm::attribute More... | |
Functions | |
| template<typename RET_TYPE , typename CONF = get_config<RET_TYPE>> requires concepts::config<CONF> | |
| RET_TYPE | capture (const std::string &prog) |
| Helper function to execute a python string and capture the output. | |
| template<typename CONF > requires concepts::config<CONF> | |
| void | execute (const std::string &prog) |
| Helper function to execute a python string and ignore the output. | |
| template<typename ARGS > requires is_args_v<ARGS> | |
| auto | py_args_to_bbm_args (py::args &args, py::kwargs &kwargs) |
| Create a bbm::arg from py:args and py::kwargs. | |
| template<typename OBJ_TYPE > requires concepts::constructor<OBJ_TYPE> | |
| OBJ_TYPE | create_object (py::args &args, py::kwargs &kwargs) |
| Construct an object with a valid 'constructor_args_t' based on python args and kwargs. | |
| template<typename ARGS , bool TYPE = false> requires is_args_v<ARGS> | |
| std::string | args_to_string (void) |
| Provide a human readable string of an bbm::args type. | |
| template<typename BSDFMODEL > requires concepts::bsdfmodel<BSDFMODEL> && concepts::constructor<BSDFMODEL> | |
| void | def_bsdf (py::module &m) |
| export a BSDF model to Python | |
| template<typename T > | |
| void | fresnel (py::module &m, const std::string &prefix="") |
| Define a python interface for ior::ior and ior::reflectance given a value type T. | |
| template<typename T > | |
| void | complex_fresnel (py::module &m, const std::string &prefix="") |
| Define a python interface for ior::complex given a value type T. | |
| std::string args_to_string | ( | void | ) |
| RET_TYPE capture | ( | const std::string & | prog | ) |
Helper function to execute a python string and capture the output.
| RET_TYPE | = type of the return value (must be specified manually) |
| CONF | = config of the bbm python lib. |
| prog | = string of python program to run |
| void complex_fresnel | ( | py::module & | m, |
| const std::string & | prefix = "" |
||
| ) |
Define a python interface for ior::complex given a value type T.
| T | = value type for ior::complex |
|
inline |
Construct an object with a valid 'constructor_args_t' based on python args and kwargs.
| OBJ_TYPE | = object type to create |
| args | = list of python arguments (copied to the first N attributes) |
| kwargs | = list of keyword arguments |
Attempt to create an object with with 'OBJ_TYPE' from py::args and py::kwargs when 'constructor_ars_t' exists (i.e., bbm/constructor.h was used to declare a constructor).
| void def_bsdf | ( | py::module & | m | ) |
export a BSDF model to Python
| BSDFMODEL | = BSDF model to export |
| m | = python module |
Creates a bsdf_ptr wrapper for a BSDF model, and exports it to the python module 'm' with 'name'. Using a trampoline function to set the attributes instead of direcly defining the attributes and default values, otherwise there might be issues with embedding the module more than once for certain types of default values (e.g., numpy).
| void execute | ( | const std::string & | prog | ) |
Helper function to execute a python string and ignore the output.
| CONF | = config of the bbm python lib |
| prog | = string of python program to run |
| void fresnel | ( | py::module & | m, |
| const std::string & | prefix = "" |
||
| ) |
Define a python interface for ior::ior and ior::reflectance given a value type T.
| T | = value type of ior or reflectance |