diff --git a/src/sceneGraph.cpp b/src/sceneGraph.cpp index 92408d7..dad2ac6 100644 --- a/src/sceneGraph.cpp +++ b/src/sceneGraph.cpp @@ -1,31 +1,31 @@ -#include "sceneGraph.hpp" -#include - -SceneNode* createSceneNode() { - return new SceneNode(); -} -SceneNode* createSceneNode(SceneNodeType type) { - return new SceneNode(type); -} - -// Add a child node to its parent's list of children -void addChild(SceneNode* parent, SceneNode* child) { - parent->children.push_back(child); -} - -// Pretty prints the current values of a SceneNode instance to stdout -void printNode(SceneNode* node) { - printf( - "SceneNode {\n" - " Child count: %i\n" - " Rotation: (%f, %f, %f)\n" - " Location: (%f, %f, %f)\n" - " Reference point: (%f, %f, %f)\n" - " VAO ID: %i\n" - "}\n", - int(node->children.size()), - node->rotation.x, node->rotation.y, node->rotation.z, - node->position.x, node->position.y, node->position.z, - node->referencePoint.x, node->referencePoint.y, node->referencePoint.z, - node->vertexArrayObjectID); -} +#include "sceneGraph.hpp" +#include + +SceneNode* createSceneNode() { + return new SceneNode(); +} +SceneNode* createSceneNode(SceneNodeType type) { + return new SceneNode(type); +} + +// Add a child node to its parent's list of children +void addChild(SceneNode* parent, SceneNode* child) { + parent->children.push_back(child); +} + +// Pretty prints the current values of a SceneNode instance to stdout +void printNode(SceneNode* node) { + printf( + "SceneNode {\n" + " Child count: %i\n" + " Rotation: (%f, %f, %f)\n" + " Location: (%f, %f, %f)\n" + " Reference point: (%f, %f, %f)\n" + " VAO ID: %i\n" + "}\n", + int(node->children.size()), + node->rotation.x, node->rotation.y, node->rotation.z, + node->position.x, node->position.y, node->position.z, + node->referencePoint.x, node->referencePoint.y, node->referencePoint.z, + node->vertexArrayObjectID); +} diff --git a/src/utilities/imageLoader.hpp b/src/utilities/imageLoader.hpp index 47aa18f..954ebfa 100644 --- a/src/utilities/imageLoader.hpp +++ b/src/utilities/imageLoader.hpp @@ -1,19 +1,19 @@ -#pragma once - -#include "lodepng.h" -#include -#include - -typedef unsigned int uint; - -struct PNGImage { - uint width, height; - bool repeat_mirrored = false; - std::vector pixels; // RGBA -}; - -PNGImage loadPNGFile(std::string fileName, bool flip_handedness=false); - -PNGImage makePerlinNoisePNG(uint w, uint h, float scale=0.1); - -PNGImage makePerlinNoisePNG(uint w, uint h, std::vector scales); +#pragma once + +#include "lodepng.h" +#include +#include + +typedef unsigned int uint; + +struct PNGImage { + uint width, height; + bool repeat_mirrored = false; + std::vector pixels; // RGBA +}; + +PNGImage loadPNGFile(std::string fileName, bool flip_handedness=false); + +PNGImage makePerlinNoisePNG(uint w, uint h, float scale=0.1); + +PNGImage makePerlinNoisePNG(uint w, uint h, std::vector scales);