Added code comments.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
This commit is contained in:
santorac
2022-01-20 09:33:21 -08:00
parent fbe17b0022
commit 730daae1e6
@@ -109,6 +109,9 @@ namespace AZ
return m_wasPreFinalized;
}
//! Attempts to convert a numeric MaterialPropertyValue to another numeric type @T,
//! since MaterialPropertyValue itself does not support any kind of casting.
//! If the original MaterialPropertyValue is not a numeric type, the original value is returned.
template<typename T>
MaterialPropertyValue CastNumericMaterialPropertyValue(const MaterialPropertyValue& value)
{
@@ -135,7 +138,10 @@ namespace AZ
return value;
}
}
//! Attempts to convert an AZ::Vector[2-4] MaterialPropertyValue to another AZ::Vector[2-4] type @T.
//! Any extra elements will be dropped or set to 0.0 as needed.
//! If the original MaterialPropertyValue is not a Vector type, the original value is returned.
template<typename VectorT>
MaterialPropertyValue CastVectorMaterialPropertyValue(const MaterialPropertyValue& value)
{