<commit_before>#ifndef SDF_LOADER_HPP
#define SDF_LOADER_HPP

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include "material.hpp"

struct SDFloader
{
	SDFloader() :
	{};

	void sdfLoad(std::string const& inputFile)
	{
		std::fstream input;
		input.open(inputFile);

		if(input.is_open())
		{
			std::stringstream stream;
			std::string line;
			std::string word;
			std::vector<Material> vec_material;
			
			while(std::getline(input, line))
			{	
				stream << line; 
				stream >> word;	
				if(word == "define")
				{
					stream >> word;

					if(word == "material")
					{
						int i = 16;	//gets name
						std::string name;
						while(line.at(i) != ' ')
						{
							name.push_back(line[i]);
							++i;
						}
						++i;
						
						std::vector<float> numbers(10);
						for(int j = 0; j < numbers.size(); ++j)
						{		//gets numbers for colours etc
							float a = line[i] - '0';
							numbers[j] = a;
							i = i+2;
						}

						Color color1(numbers[0], numbers[1], numbers[2]);
						Color color2(numbers[3], numbers[4], numbers[5]);
						Color color3(numbers[6], numbers[7], numbers[8]);

						Material material(name, color1, color2, color3, numbers[9]);
						vec_material.push_back(material);
					}
				}
				
			}

			for (std::vector<Material>::iterator it = vec_material.begin(); it != vec_material.end(); ++it)
	    	{
	    		std::cout << ' ' << *it;
	    	}
	 		std::cout << '\n';
		}
		else<commit_msg>sdfloader looks better now maybe lissy out<commit_after>#ifndef SDF_LOADER_HPP
#define SDF_LOADER_HPP

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include "material.hpp"

struct SDFloader
{
	SDFloader() :
	{};

	void sdfLoad(std::string const& inputFile)
	{
		std::fstream input;
		input.open(inputFile);

		if(input.is_open())
		{
			std::stringstream stream;
			std::string line;
			std::string word;
			std::vector<Material> vec_material;
			
			while(std::getline(input, line))
			{	
				stream << line; 
				stream >> word;	
				if(word == "define")
				{
					stream >> word;

					if(word == "material")
					{
						Material material;
						
						stream >> material.m_name;
						stream >> material.m_ka.r;
						stream >> material.m_ka.g;
						stream >> material.m_ka.b;
						stream >> material.m_kd.r;
						stream >> material.m_kd.g;
						stream >> material.m_kd.b;
						stream >> material.m_ks.r;
						stream >> material.m_ks.g;
						stream >> material.m_ks.b;
						
					}
				}
				
			}

			for (std::vector<Material>::iterator it = vec_material.begin(); it != vec_material.end(); ++it)
	    	{
	    		std::cout << ' ' << *it;
	    	}
	 		std::cout << '\n';
		}
		else
{'fraction_non_alphanumeric': 0.16202155332590115, 'fraction_numerical': 0.008547008547008548, 'mean_word_length': 2.518954248366013, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 44, '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': '2936841', 'n_tokens_mistral': 1295, 'n_tokens_neox': 965, 'n_words': 192}