Made bounding volume handing part of SceneNodes

Former-commit-id: d09d06ac4515ce09aa16fd92dd045c2a06730a99
This commit is contained in:
Lynix
2015-01-20 20:35:16 +01:00
parent bce3cadfd5
commit 8a3c410d60
19 changed files with 127 additions and 229 deletions

View File

@@ -22,7 +22,6 @@ class NAZARA_API NzSprite : public NzSceneNode
void AddToRenderQueue(NzAbstractRenderQueue* renderQueue) const override;
const NzBoundingVolumef& GetBoundingVolume() const override;
const NzColor& GetColor() const;
NzMaterial* GetMaterial() const;
nzSceneNodeType GetSceneNodeType() const override;
@@ -44,18 +43,16 @@ class NAZARA_API NzSprite : public NzSceneNode
private:
void InvalidateNode() override;
void MakeBoundingVolume() const override;
void Register() override;
void Unregister() override;
void UpdateBoundingVolume() const;
void UpdateVertices() const;
mutable NzBoundingVolumef m_boundingVolume;
NzColor m_color;
NzMaterialRef m_material;
NzRectf m_textureCoords;
NzVector2f m_size;
mutable NzVertexStruct_XYZ_Color_UV m_vertices[4];
mutable bool m_boundingVolumeUpdated;
mutable bool m_verticesUpdated;
};