Graphics/Renderable: Provide Cull default implementation
Former-commit-id: 7584b42b8737a426818af836628f8e7e1e34eb46
This commit is contained in:
parent
be335c3e81
commit
f181d0f2df
|
|
@ -36,7 +36,7 @@ class NAZARA_API NzRenderable : public NzRefCounted
|
|||
void EnsureBoundingVolumeUpdated() const;
|
||||
|
||||
virtual void AddToRenderQueue(NzAbstractRenderQueue* renderQueue, const NzMatrix4f& transformMatrix) const = 0;
|
||||
virtual void Cull(const NzFrustumf& frustum, const NzBoundingVolumef& volume, const NzMatrix4f& transformMatrix) const = 0;
|
||||
virtual bool Cull(const NzFrustumf& frustum, const NzBoundingVolumef& volume, const NzMatrix4f& transformMatrix) const;
|
||||
virtual const NzBoundingVolumef& GetBoundingVolume() const;
|
||||
virtual void UpdateBoundingVolume(NzBoundingVolumef* boundingVolume, const NzMatrix4f& transformMatrix) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,13 @@
|
|||
|
||||
NzRenderable::~NzRenderable() = default;
|
||||
|
||||
bool NzRenderable::Cull(const NzFrustumf& frustum, const NzBoundingVolumef& volume, const NzMatrix4f& transformMatrix) const
|
||||
{
|
||||
NazaraUnused(transformMatrix);
|
||||
|
||||
return frustum.Contains(volume);
|
||||
}
|
||||
|
||||
const NzBoundingVolumef& NzRenderable::GetBoundingVolume() const
|
||||
{
|
||||
EnsureBoundingVolumeUpdated();
|
||||
|
|
|
|||
Loading…
Reference in New Issue