Graphics: Add Renderable class
WIP Former-commit-id: b9ea2a443cf2e5f8b90360e1f47466b0c3ce69fa
This commit is contained in:
24
src/Nazara/Graphics/Renderable.cpp
Normal file
24
src/Nazara/Graphics/Renderable.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
// Copyright (C) 2015 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Graphics module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Graphics/Renderable.hpp>
|
||||
#include <Nazara/Graphics/Debug.hpp>
|
||||
|
||||
NzRenderable::~NzRenderable() = default;
|
||||
|
||||
const NzBoundingVolumef& NzRenderable::GetBoundingVolume() const
|
||||
{
|
||||
EnsureBoundingVolumeUpdated();
|
||||
|
||||
return m_boundingVolume;
|
||||
}
|
||||
|
||||
void NzRenderable::UpdateBoundingVolume(NzBoundingVolumef* boundingVolume, const NzMatrix4f& transformMatrix) const
|
||||
{
|
||||
NazaraAssert(boundingVolume, "Invalid bounding volume");
|
||||
|
||||
boundingVolume->Update(transformMatrix);
|
||||
}
|
||||
|
||||
NzRenderableLibrary::LibraryMap NzRenderable::s_library;
|
||||
Reference in New Issue
Block a user