MCPcopy Create free account
hub / github.com/Norbyte/bg3se / GetVector3

Method GetVector3

BG3Extender/GameDefinitions/GameHelpers.cpp:915–930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

913}
914
915std::optional<glm::vec3> AppliedMaterial::GetVector3(FixedString const& paramName)
916{
917 for (auto const& param : Material->Parameters.Vector3Parameters) {
918 if (param.ParameterName == paramName) {
919 auto value = GetUniformParam<glm::vec3>(param.Binding);
920 if (value) {
921 return value;
922 } else {
923 return param.Value;
924 }
925 }
926 }
927
928 ERR("Material has no vec3 parameter named '%s'", paramName.GetString());
929 return {};
930}
931
932std::optional<glm::vec4> AppliedMaterial::GetVector4(FixedString const& paramName)
933{

Callers

nothing calls this directly

Calls 1

GetStringMethod · 0.80

Tested by

no test coverage detected