Moved Model::EnableDraw to SceneNode::EnableDrawing

Same goes for Model::IsDrawEnabled() => SceneNode::IsDrawingEnabled()
Is Drawable is now a pure virtual method from SceneNode


Former-commit-id: 217c6a21a98206ee0b283aaa216d419696a70faf
This commit is contained in:
Lynix
2013-08-23 13:16:42 +02:00
parent fe6816b089
commit 7fa8f3dafd
10 changed files with 87 additions and 39 deletions

View File

@@ -66,6 +66,11 @@ const NzRectf& NzSprite::GetTextureCoords() const
return m_textureCoords;
}
bool NzSprite::IsDrawable() const
{
return m_material != nullptr;
}
void NzSprite::SetMaterial(NzMaterial* material)
{
m_material = material;
@@ -132,7 +137,7 @@ void NzSprite::Unregister()
void NzSprite::UpdateBoundingVolume() const
{
if (m_boundingVolume.IsNull())
m_boundingVolume.Set(-m_size.x*0.5f, -m_size.y*0.5f, 0, m_size.x, m_size.y, 1.f);
m_boundingVolume.Set(-m_size.x*0.5f, -m_size.y*0.5f, 0, m_size.x, m_size.y, 0.f);
if (!m_transformMatrixUpdated)
UpdateTransformMatrix();