Add some functions
This commit is contained in:
@@ -29,6 +29,12 @@ namespace OpenVulkano::Math
|
|||||||
constexpr T CONVERSION = std::numbers::pi_v<T> / 180.0;
|
constexpr T CONVERSION = std::numbers::pi_v<T> / 180.0;
|
||||||
return degree * CONVERSION;
|
return degree * CONVERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
constexpr T Square(T val)
|
||||||
|
{
|
||||||
|
return val * val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T> using Matrix2_SIMD = glm::tmat2x2<T, glm::aligned>;
|
template<typename T> using Matrix2_SIMD = glm::tmat2x2<T, glm::aligned>;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Base/ICloseable.hpp"
|
#include "Base/ICloseable.hpp"
|
||||||
|
#include "Scene/Camera.hpp"
|
||||||
#include "IRecordable.hpp"
|
#include "IRecordable.hpp"
|
||||||
#include "Vulkan/Resources/UniformBuffer.hpp"
|
#include "Vulkan/Resources/UniformBuffer.hpp"
|
||||||
|
|
||||||
@@ -39,5 +40,7 @@ namespace OpenVulkano::Vulkan
|
|||||||
m_camera = nullptr;
|
m_camera = nullptr;
|
||||||
delete m_buffer;
|
delete m_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] Scene::Camera* GetCamera() const { return m_camera; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ namespace OpenVulkano::Vulkan
|
|||||||
|
|
||||||
void SetCamera(Scene::Camera* camera);
|
void SetCamera(Scene::Camera* camera);
|
||||||
|
|
||||||
VulkanShader* GetShader() const { return m_lastShader; }
|
[[nodiscard]] VulkanShader* GetShader() const { return m_lastShader; }
|
||||||
|
|
||||||
|
[[nodiscard]] VulkanCamera* GetCamera() const { return m_lastCamera; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user