Skip to content

Improve hash for BSDF hemisphere #32

@vidanovic

Description

@vidanovic

For optical layer IGU hashing BSDFHemisphere class (from WindowsCalc-Engine) is not fully hashed but only size is taken into account.

struct LayerCacheKey {
std::string method_name;
Spectal_Data_Wavelength_Range_Method wavelength_method;
int number_visible_bands;
int number_solar_bands;
size_t bsdf_direction_count; // new addition
bool operator==(const LayerCacheKey & other) const {
return method_name == other.method_name &&
wavelength_method == other.wavelength_method &&
number_visible_bands == other.number_visible_bands &&
number_solar_bands == other.number_solar_bands &&
bsdf_direction_count == other.bsdf_direction_count;
}
};
}

Make sure to extend hashing to cover for all the classes in BSDFHemisphere.

NOTE: This will currently produce incorrect results if Glazing_System is called consecutively with different BSDF hemispheres that have the same size.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions