// Copyright (C) 2017 Jérôme Leclercq // This file is part of the "Nazara Development Kit" // For conditions of distribution and use, see copyright notice in Prerequisites.hpp #pragma once #ifndef NDK_SERVER #ifndef NDK_SYSTEMS_DEBUGSYSTEM_HPP #define NDK_SYSTEMS_DEBUGSYSTEM_HPP #include #include #include #include #include namespace Ndk { class NDK_API DebugSystem : public System { public: DebugSystem(); ~DebugSystem() = default; void EnableDepthBuffer(bool enable); inline bool IsDepthBufferEnabled() const; static SystemIndex systemIndex; private: Nz::InstancedRenderableRef GenerateBox(Nz::Boxf box); Nz::InstancedRenderableRef GenerateCollision2DMesh(Entity* entity, Nz::Vector3f* offset); Nz::InstancedRenderableRef GenerateCollision3DMesh(Entity* entity); std::pair GetBoxMesh(); Nz::MaterialRef GetCollisionMaterial(); Nz::MaterialRef GetGlobalAABBMaterial(); Nz::MaterialRef GetLocalAABBMaterial(); Nz::MaterialRef GetOBBMaterial(); void OnEntityValidation(Entity* entity, bool justAdded) override; void OnUpdate(float elapsedTime) override; Nz::MaterialRef m_globalAabbMaterial; Nz::MaterialRef m_localAabbMaterial; Nz::MaterialRef m_collisionMaterial; Nz::MaterialRef m_obbMaterial; Nz::IndexBufferRef m_boxMeshIndexBuffer; Nz::VertexBufferRef m_boxMeshVertexBuffer; bool m_isDepthBufferEnabled; }; } #include #endif // NDK_SYSTEMS_DEBUGSYSTEM_HPP #endif // NDK_SERVER