mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Simplified Node id
This commit is contained in:
@@ -19,12 +19,15 @@
|
|||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
int Node::node_counter = 0;
|
||||||
|
|
||||||
// Node
|
// Node
|
||||||
Node::Node() : initialized_(false), visible_(true), refcount_(0)
|
Node::Node() : initialized_(false), visible_(true), refcount_(0)
|
||||||
{
|
{
|
||||||
// create unique id
|
// create unique id
|
||||||
auto duration = std::chrono::high_resolution_clock::now().time_since_epoch();
|
id_ = ++node_counter;
|
||||||
id_ = std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count() % 100000000;
|
// auto duration = std::chrono::high_resolution_clock::now().time_since_epoch();
|
||||||
|
// id_ = std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count() % 100000000;
|
||||||
|
|
||||||
transform_ = glm::identity<glm::mat4>();
|
transform_ = glm::identity<glm::mat4>();
|
||||||
scale_ = glm::vec3(1.f);
|
scale_ = glm::vec3(1.f);
|
||||||
|
|||||||
Reference in New Issue
Block a user