mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Creating a base toolkit for functions independent from other toolkits
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// Freely inspired from https://github.com/alter-rokuz/glm-aabb.git
|
||||
|
||||
#include "GlmToolkit.h"
|
||||
|
||||
@@ -10,14 +9,6 @@
|
||||
#include <chrono>
|
||||
#include <ctime>
|
||||
|
||||
|
||||
uint64_t GlmToolkit::uniqueId()
|
||||
{
|
||||
auto duration = std::chrono::high_resolution_clock::now().time_since_epoch();
|
||||
// 64-bit int 18446744073709551615UL
|
||||
return std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count() % 1000000000000000000UL;
|
||||
}
|
||||
|
||||
glm::mat4 GlmToolkit::transform(glm::vec3 translation, glm::vec3 rotation, glm::vec3 scale)
|
||||
{
|
||||
glm::mat4 View = glm::translate(glm::identity<glm::mat4>(), translation);
|
||||
@@ -59,6 +50,8 @@ void GlmToolkit::inverse_transform(glm::mat4 M, glm::vec3 &translation, glm::vec
|
||||
// return angle;
|
||||
//}
|
||||
|
||||
// Freely inspired from https://github.com/alter-rokuz/glm-aabb.git
|
||||
|
||||
GlmToolkit::AxisAlignedBoundingBox::AxisAlignedBoundingBox() :
|
||||
mMin(glm::vec3(1.f)), mMax(glm::vec3(-1.f))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user