<commit_before>#include "worldNode.hh"
#include <glm/gtx/transform.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <algorithm>


WorldNode::WorldNode()
{
	id       = 0;
	parent   = 0;
	position = glm::vec3( 0 );
	rotation = glm::quat();
	scale    = glm::vec3( 1.f );
}


WorldNode::~WorldNode()
{
}



SerializedData WorldNode::Serialize( SerializeVarList vars )
{
	return nullptr;
}



bool WorldNode::Unserialize( SerializedData data )
{
	return false;
}



void WorldNode::UpdateTransformations()
{
	// Generate the local matrix
	transformMatrix = glm::translate( position ) *
		              glm::toMat4( rotation ) *
		              glm::scale( scale );

	// If we have parent, find it and get the transformation matrix,
	if( parent )
	{
		// TODO: get the matrix
		glm::mat4 parentMatrix; // Just an identity matrix for now.

		// Apply it:
		transformMatrix = transformMatrix * parentMatrix;
	}


	// Update the children
	std::for_each( children.begin(),
	               children.end(), [this]( unsigned int &childId )
	{
		// Find the child
		Serialize( nullptr );
	} );
}
<commit_msg>I don't even... Brainfart much?<commit_after>#include "worldNode.hh"
#include <glm/gtx/transform.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <algorithm>


WorldNode::WorldNode()
{
	id       = 0;
	parent   = 0;
	position = glm::vec3( 0 );
	rotation = glm::quat();
	scale    = glm::vec3( 1.f );
}


WorldNode::~WorldNode()
{
}



SerializedData WorldNode::Serialize( SerializeVarList vars )
{
	return nullptr;
}



bool WorldNode::Unserialize( SerializedData data )
{
	return false;
}



void WorldNode::UpdateTransformations()
{
	// Generate the local matrix
	transformMatrix = glm::translate( position ) *
		              glm::toMat4( rotation ) *
		              glm::scale( scale );

	// If we have parent, find it and get the transformation matrix,
	if( parent )
	{
		// TODO: get the matrix
		glm::mat4 parentMatrix; // Just an identity matrix for now.

		// Apply it:
		transformMatrix = transformMatrix * parentMatrix;
	}


	// Update the children
	std::for_each( children.begin(),
	               children.end(), [this]( unsigned int &childId )
	{
		// Find the child
		// Call update
	} );
}

{'fraction_non_alphanumeric': 0.1339972838388411, 'fraction_numerical': 0.007243096423721141, 'mean_word_length': 3.107806691449814, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3063433', 'n_tokens_mistral': 773, 'n_tokens_neox': 721, 'n_words': 188}