[][src]Function pbrt::core::paramset::testutils::make_vector2f_param_set

pub fn make_vector2f_param_set(name: &str, vals: Vec<Vector2f>) -> ParamSet

Creates a ParamSet with one entry containing name and set to vals.

Examples

use pbrt::core::paramset::testutils::make_vector2f_param_set;
use pbrt::core::geometry::Vector2f;
let ps = make_vector2f_param_set("value", vec![Vector2f::from([1., 1.])]);
assert_eq!(ps.find_one_vector2f("value", Vector2f::from([2., 2.])), Vector2f::from([1., 1.]));
assert_eq!(ps.find_one_vector2f("non-existent", Vector2f::from([2., 2.])), Vector2f::from([2., 2.]));