Merge branch 'master' into NDK-ShadowMapping

Former-commit-id: 83435ab51753299b30a102871fbcd5558d2ac4f1
This commit is contained in:
Lynix
2015-12-09 00:59:07 +01:00
751 changed files with 79400 additions and 71735 deletions

View File

@@ -20,8 +20,8 @@ namespace Ndk
PhysicsSystem(const PhysicsSystem& system);
~PhysicsSystem() = default;
NzPhysWorld& GetWorld();
const NzPhysWorld& GetWorld() const;
Nz::PhysWorld& GetWorld();
const Nz::PhysWorld& GetWorld() const;
static SystemIndex systemIndex;
@@ -31,7 +31,7 @@ namespace Ndk
EntityList m_dynamicObjects;
EntityList m_staticObjects;
NzPhysWorld m_world;
Nz::PhysWorld m_world;
};
}

View File

@@ -4,12 +4,12 @@
namespace Ndk
{
inline NzPhysWorld& PhysicsSystem::GetWorld()
inline Nz::PhysWorld& PhysicsSystem::GetWorld()
{
return m_world;
}
inline const NzPhysWorld& PhysicsSystem::GetWorld() const
inline const Nz::PhysWorld& PhysicsSystem::GetWorld() const
{
return m_world;
}

View File

@@ -27,16 +27,16 @@ namespace Ndk
inline RenderSystem(const RenderSystem& renderSystem);
~RenderSystem() = default;
inline const NzBackgroundRef& GetDefaultBackground() const;
inline const NzMatrix4f& GetCoordinateSystemMatrix() const;
inline NzVector3f GetGlobalForward() const;
inline NzVector3f GetGlobalRight() const;
inline NzVector3f GetGlobalUp() const;
inline const Nz::BackgroundRef& GetDefaultBackground() const;
inline const Nz::Matrix4f& GetCoordinateSystemMatrix() const;
inline Nz::Vector3f GetGlobalForward() const;
inline Nz::Vector3f GetGlobalRight() const;
inline Nz::Vector3f GetGlobalUp() const;
inline void SetDefaultBackground(NzBackgroundRef background);
inline void SetGlobalForward(const NzVector3f& direction);
inline void SetGlobalRight(const NzVector3f& direction);
inline void SetGlobalUp(const NzVector3f& direction);
inline void SetDefaultBackground(Nz::BackgroundRef background);
inline void SetGlobalForward(const Nz::Vector3f& direction);
inline void SetGlobalRight(const Nz::Vector3f& direction);
inline void SetGlobalUp(const Nz::Vector3f& direction);
static SystemIndex systemIndex;
@@ -46,7 +46,7 @@ namespace Ndk
void OnEntityRemoved(Entity* entity) override;
void OnEntityValidation(Entity* entity, bool justAdded) override;
void OnUpdate(float elapsedTime) override;
void UpdateDirectionalShadowMaps(const NzAbstractViewer& viewer);
void UpdateDirectionalShadowMaps(const Nz::AbstractViewer& viewer);
void UpdatePointSpotShadowMaps();
EntityList m_cameras;
@@ -54,11 +54,11 @@ namespace Ndk
EntityList m_directionalLights;
EntityList m_lights;
EntityList m_pointSpotLights;
NzBackgroundRef m_background;
NzDepthRenderTechnique m_shadowTechnique;
NzForwardRenderTechnique m_renderTechnique;
NzMatrix4f m_coordinateSystemMatrix;
NzRenderTexture m_shadowRT;
Nz::BackgroundRef m_background;
Nz::DepthRenderTechnique m_shadowTechnique;
Nz::ForwardRenderTechnique m_renderTechnique;
Nz::Matrix4f m_coordinateSystemMatrix;
Nz::RenderTexture m_shadowRT;
bool m_coordinateSystemInvalidated;
};
}

View File

@@ -9,37 +9,37 @@ namespace Ndk
{
}
inline const NzBackgroundRef& RenderSystem::GetDefaultBackground() const
inline const Nz::BackgroundRef& RenderSystem::GetDefaultBackground() const
{
return m_background;
}
inline const NzMatrix4f& RenderSystem::GetCoordinateSystemMatrix() const
inline const Nz::Matrix4f& RenderSystem::GetCoordinateSystemMatrix() const
{
return m_coordinateSystemMatrix;
}
inline NzVector3f RenderSystem::GetGlobalForward() const
inline Nz::Vector3f RenderSystem::GetGlobalForward() const
{
return NzVector3f(-m_coordinateSystemMatrix.m13, -m_coordinateSystemMatrix.m23, -m_coordinateSystemMatrix.m33);
return Nz::Vector3f(-m_coordinateSystemMatrix.m13, -m_coordinateSystemMatrix.m23, -m_coordinateSystemMatrix.m33);
}
inline NzVector3f RenderSystem::GetGlobalRight() const
inline Nz::Vector3f RenderSystem::GetGlobalRight() const
{
return NzVector3f(m_coordinateSystemMatrix.m11, m_coordinateSystemMatrix.m21, m_coordinateSystemMatrix.m31);
return Nz::Vector3f(m_coordinateSystemMatrix.m11, m_coordinateSystemMatrix.m21, m_coordinateSystemMatrix.m31);
}
inline NzVector3f RenderSystem::GetGlobalUp() const
inline Nz::Vector3f RenderSystem::GetGlobalUp() const
{
return NzVector3f(m_coordinateSystemMatrix.m12, m_coordinateSystemMatrix.m22, m_coordinateSystemMatrix.m32);
return Nz::Vector3f(m_coordinateSystemMatrix.m12, m_coordinateSystemMatrix.m22, m_coordinateSystemMatrix.m32);
}
inline void RenderSystem::SetDefaultBackground(NzBackgroundRef background)
inline void RenderSystem::SetDefaultBackground(Nz::BackgroundRef background)
{
m_background = std::move(background);
}
inline void RenderSystem::SetGlobalForward(const NzVector3f& direction)
inline void RenderSystem::SetGlobalForward(const Nz::Vector3f& direction)
{
m_coordinateSystemMatrix.m13 = -direction.x;
m_coordinateSystemMatrix.m23 = -direction.y;
@@ -48,7 +48,7 @@ namespace Ndk
InvalidateCoordinateSystem();
}
inline void RenderSystem::SetGlobalRight(const NzVector3f& direction)
inline void RenderSystem::SetGlobalRight(const Nz::Vector3f& direction)
{
m_coordinateSystemMatrix.m11 = direction.x;
m_coordinateSystemMatrix.m21 = direction.y;
@@ -57,7 +57,7 @@ namespace Ndk
InvalidateCoordinateSystem();
}
inline void RenderSystem::SetGlobalUp(const NzVector3f& direction)
inline void RenderSystem::SetGlobalUp(const Nz::Vector3f& direction)
{
m_coordinateSystemMatrix.m12 = direction.x;
m_coordinateSystemMatrix.m22 = direction.y;