[−][src]Function pbrt::core::paramset::testutils::make_point3f_param_set
pub fn make_point3f_param_set(name: &str, vals: Vec<Point3f>) -> ParamSet
Creates a ParamSet
with one entry containing name
and set to vals
.
Examples
use pbrt::core::paramset::testutils::make_point3f_param_set; use pbrt::core::geometry::Point3f; let ps = make_point3f_param_set("value", vec![Point3f::from([1., 1., 1.])]); assert_eq!(ps.find_one_point3f("value", Point3f::from([2., 2., 2.])), Point3f::from([1., 1., 1.])); assert_eq!(ps.find_one_point3f("non-existent", Point3f::from([2., 2., 2.])), Point3f::from([2., 2., 2.]));