bool isPropertyMaterialChecked(UFTMaterialWitTextureProps mat, string propName) { int hash = getCominedMaterialPropertyHash(mat, propName); if (checkedMaterialsHash.ContainsKey(hash)) { return(checkedMaterialsHash[hash]); } else { checkedMaterialsHash.Add(hash, DEFAULT_CHECKED_MATERIAL_PROPERTY_VALUE); return(DEFAULT_CHECKED_MATERIAL_PROPERTY_VALUE); } }
private int getCominedMaterialPropertyHash(UFTMaterialWitTextureProps mat, string propName){ return (mat.GetHashCode() +"]["+propName.GetHashCode()).GetHashCode(); }
bool isPropertyMaterialChecked (UFTMaterialWitTextureProps mat, string propName) { int hash=getCominedMaterialPropertyHash(mat,propName); if (checkedMaterialsHash.ContainsKey(hash)){ return checkedMaterialsHash[hash]; } else { checkedMaterialsHash.Add(hash,DEFAULT_CHECKED_MATERIAL_PROPERTY_VALUE); return DEFAULT_CHECKED_MATERIAL_PROPERTY_VALUE; } }
void setPropertyMaterialChecked(UFTMaterialWitTextureProps mat, string propName, bool val){ int hash=getCominedMaterialPropertyHash(mat,propName); checkedMaterialsHash[hash]=val; }
private int getCominedMaterialPropertyHash(UFTMaterialWitTextureProps mat, string propName) { return((mat.GetHashCode() + "][" + propName.GetHashCode()).GetHashCode()); }
void setPropertyMaterialChecked(UFTMaterialWitTextureProps mat, string propName, bool val) { int hash = getCominedMaterialPropertyHash(mat, propName); checkedMaterialsHash[hash] = val; }