Relaxed constant access
Former-commit-id: 885a7f065ccf9ff1fdbef23c88b852bb2e48fac7
This commit is contained in:
@@ -42,7 +42,7 @@ NzModel::~NzModel()
|
||||
Reset();
|
||||
}
|
||||
|
||||
const NzAnimation* NzModel::GetAnimation() const
|
||||
NzAnimation* NzModel::GetAnimation() const
|
||||
{
|
||||
return m_animation;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ const NzAxisAlignedBox& NzModel::GetAABB() const
|
||||
return m_mesh->GetAABB();
|
||||
}
|
||||
|
||||
const NzMaterial* NzModel::GetMaterial(unsigned int matIndex) const
|
||||
NzMaterial* NzModel::GetMaterial(unsigned int matIndex) const
|
||||
{
|
||||
#if NAZARA_3D_SAFE
|
||||
if (matIndex >= m_matCount)
|
||||
@@ -73,7 +73,7 @@ const NzMaterial* NzModel::GetMaterial(unsigned int matIndex) const
|
||||
return m_materials[matIndex];
|
||||
}
|
||||
|
||||
const NzMaterial* NzModel::GetMaterial(unsigned int skinIndex, unsigned int matIndex) const
|
||||
NzMaterial* NzModel::GetMaterial(unsigned int skinIndex, unsigned int matIndex) const
|
||||
{
|
||||
#if NAZARA_3D_SAFE
|
||||
if (skinIndex >= m_skinCount)
|
||||
@@ -102,7 +102,7 @@ unsigned int NzModel::GetSkinCount() const
|
||||
return m_skinCount;
|
||||
}
|
||||
|
||||
const NzMesh* NzModel::GetMesh() const
|
||||
NzMesh* NzModel::GetMesh() const
|
||||
{
|
||||
return m_mesh;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ void NzModel::Reset()
|
||||
}
|
||||
}
|
||||
|
||||
bool NzModel::SetAnimation(const NzAnimation* animation)
|
||||
bool NzModel::SetAnimation(NzAnimation* animation)
|
||||
{
|
||||
#if NAZARA_3D_SAFE
|
||||
if (!m_mesh)
|
||||
@@ -243,7 +243,7 @@ bool NzModel::SetAnimation(const NzAnimation* animation)
|
||||
return true;
|
||||
}
|
||||
|
||||
void NzModel::SetMaterial(unsigned int matIndex, const NzMaterial* material)
|
||||
void NzModel::SetMaterial(unsigned int matIndex, NzMaterial* material)
|
||||
{
|
||||
#if NAZARA_3D_SAFE
|
||||
if (matIndex >= m_matCount)
|
||||
@@ -263,7 +263,7 @@ void NzModel::SetMaterial(unsigned int matIndex, const NzMaterial* material)
|
||||
m_materials[matIndex]->AddResourceReference();
|
||||
}
|
||||
|
||||
void NzModel::SetMaterial(unsigned int skinIndex, unsigned int matIndex, const NzMaterial* material)
|
||||
void NzModel::SetMaterial(unsigned int skinIndex, unsigned int matIndex, NzMaterial* material)
|
||||
{
|
||||
#if NAZARA_3D_SAFE
|
||||
if (skinIndex >= m_skinCount)
|
||||
@@ -291,7 +291,7 @@ void NzModel::SetMaterial(unsigned int skinIndex, unsigned int matIndex, const N
|
||||
m_materials[index]->AddResourceReference();
|
||||
}
|
||||
|
||||
void NzModel::SetMesh(const NzMesh* mesh, const NzModelParameters& modelParameters)
|
||||
void NzModel::SetMesh(NzMesh* mesh, const NzModelParameters& modelParameters)
|
||||
{
|
||||
Reset();
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ const NzTextureSampler& NzMaterial::GetDiffuseSampler() const
|
||||
return m_diffuseSampler;
|
||||
}
|
||||
|
||||
const NzTexture* NzMaterial::GetDiffuseMap() const
|
||||
NzTexture* NzMaterial::GetDiffuseMap() const
|
||||
{
|
||||
return m_diffuseMap;
|
||||
}
|
||||
@@ -237,12 +237,12 @@ nzFaceFilling NzMaterial::GetFaceFilling() const
|
||||
return m_faceFilling;
|
||||
}
|
||||
|
||||
const NzTexture* NzMaterial::GetHeightMap() const
|
||||
NzTexture* NzMaterial::GetHeightMap() const
|
||||
{
|
||||
return m_diffuseMap;
|
||||
}
|
||||
|
||||
const NzTexture* NzMaterial::GetNormalMap() const
|
||||
NzTexture* NzMaterial::GetNormalMap() const
|
||||
{
|
||||
return m_diffuseMap;
|
||||
}
|
||||
@@ -265,7 +265,7 @@ NzColor NzMaterial::GetSpecularColor() const
|
||||
return m_specularColor;
|
||||
}
|
||||
|
||||
const NzTexture* NzMaterial::GetSpecularMap() const
|
||||
NzTexture* NzMaterial::GetSpecularMap() const
|
||||
{
|
||||
return m_specularMap;
|
||||
}
|
||||
@@ -385,7 +385,7 @@ void NzMaterial::SetDiffuseColor(const NzColor& diffuse)
|
||||
m_diffuseColor = diffuse;
|
||||
}
|
||||
|
||||
void NzMaterial::SetDiffuseMap(const NzTexture* map)
|
||||
void NzMaterial::SetDiffuseMap(NzTexture* map)
|
||||
{
|
||||
if (m_diffuseMap)
|
||||
m_diffuseMap->RemoveResourceReference();
|
||||
@@ -415,7 +415,7 @@ void NzMaterial::SetFaceFilling(nzFaceFilling filling)
|
||||
m_faceFilling = filling;
|
||||
}
|
||||
|
||||
void NzMaterial::SetHeightMap(const NzTexture* map)
|
||||
void NzMaterial::SetHeightMap(NzTexture* map)
|
||||
{
|
||||
if (m_heightMap)
|
||||
m_heightMap->RemoveResourceReference();
|
||||
@@ -425,7 +425,7 @@ void NzMaterial::SetHeightMap(const NzTexture* map)
|
||||
m_heightMap->AddResourceReference();
|
||||
}
|
||||
|
||||
void NzMaterial::SetNormalMap(const NzTexture* map)
|
||||
void NzMaterial::SetNormalMap(NzTexture* map)
|
||||
{
|
||||
if (m_normalMap)
|
||||
m_normalMap->RemoveResourceReference();
|
||||
@@ -456,7 +456,7 @@ void NzMaterial::SetSpecularColor(const NzColor& specular)
|
||||
m_specularColor = specular;
|
||||
}
|
||||
|
||||
void NzMaterial::SetSpecularMap(const NzTexture* map)
|
||||
void NzMaterial::SetSpecularMap(NzTexture* map)
|
||||
{
|
||||
if (m_specularMap)
|
||||
m_specularMap->RemoveResourceReference();
|
||||
@@ -545,7 +545,7 @@ NzMaterial& NzMaterial::operator=(NzMaterial&& material)
|
||||
return *this;
|
||||
}
|
||||
|
||||
const NzMaterial* NzMaterial::GetDefault()
|
||||
NzMaterial* NzMaterial::GetDefault()
|
||||
{
|
||||
static NzMaterial defaultMaterial;
|
||||
static bool initialized = false;
|
||||
|
||||
Reference in New Issue
Block a user