/** * @brief Get the material * in instance level, material only holds parameter tips, which means its materialTemplate * is on in effect. * * @result the material tips * */ public CatMaterial GetMaterial() { // check whether the materialTemplate of model has changed if (m_materialParameterTips.GetMaterialTemplate() != m_catModel.GetMaterial().GetMaterialTemplate()) { // the material template has changed, change the material m_materialParameterTips.ChangeMaterialTemplate(m_catModel.GetMaterial().GetMaterialTemplate()); } return(m_materialParameterTips); }
public void SetMaterialToTemplate(CatMaterialTemplate _materialTemplate) { if (m_material == null) { m_material = _materialTemplate.GetMaterialPrototype().Clone(); } else { m_material.ChangeMaterialTemplate(_materialTemplate); } }