Graphics: Add frustum culling
Former-commit-id: 2741c465f9acb4a190de0a29db4a3853700461fd [formerly be67ee144fe577767a11be40f79f3f2e85d030c0] [formerly 302a6d2c8a3222401890d217f01c24a03db9ebc8 [formerly 762367a1144c340b84b61eee9d7577dcdaf717c6]] Former-commit-id: 6504b78e4ce04d8eea0c10e7ce27bdda4b95f2dc [formerly 8d0fba6c2dde5dcc43cbea0e6e5fd2980af4b801] Former-commit-id: 75d1deaf21035eb1b630705017462b9e059149a9
This commit is contained in:
@@ -25,7 +25,9 @@ namespace Nz
|
||||
virtual ~Renderable();
|
||||
|
||||
virtual void AddToRenderQueue(AbstractRenderQueue* renderQueue, const Matrix4f& transformMatrix) const = 0;
|
||||
|
||||
virtual bool Cull(const Frustumf& frustum, const Matrix4f& transformMatrix) const;
|
||||
|
||||
inline void EnsureBoundingVolumeUpdated() const;
|
||||
virtual const BoundingVolumef& GetBoundingVolume() const;
|
||||
virtual void UpdateBoundingVolume(const Matrix4f& transformMatrix);
|
||||
@@ -36,11 +38,12 @@ namespace Nz
|
||||
protected:
|
||||
virtual void MakeBoundingVolume() const = 0;
|
||||
inline void InvalidateBoundingVolume();
|
||||
inline void UpdateBoundingVolume() const;
|
||||
|
||||
mutable BoundingVolumef m_boundingVolume;
|
||||
|
||||
private:
|
||||
inline void UpdateBoundingVolume() const;
|
||||
|
||||
mutable bool m_boundingVolumeUpdated;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user