Fix CRLF to LF
This commit is contained in:
parent
54cd22ff57
commit
86f339ef56
@ -1,31 +1,31 @@
|
|||||||
#include "sceneGraph.hpp"
|
#include "sceneGraph.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
SceneNode* createSceneNode() {
|
SceneNode* createSceneNode() {
|
||||||
return new SceneNode();
|
return new SceneNode();
|
||||||
}
|
}
|
||||||
SceneNode* createSceneNode(SceneNodeType type) {
|
SceneNode* createSceneNode(SceneNodeType type) {
|
||||||
return new SceneNode(type);
|
return new SceneNode(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a child node to its parent's list of children
|
// Add a child node to its parent's list of children
|
||||||
void addChild(SceneNode* parent, SceneNode* child) {
|
void addChild(SceneNode* parent, SceneNode* child) {
|
||||||
parent->children.push_back(child);
|
parent->children.push_back(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pretty prints the current values of a SceneNode instance to stdout
|
// Pretty prints the current values of a SceneNode instance to stdout
|
||||||
void printNode(SceneNode* node) {
|
void printNode(SceneNode* node) {
|
||||||
printf(
|
printf(
|
||||||
"SceneNode {\n"
|
"SceneNode {\n"
|
||||||
" Child count: %i\n"
|
" Child count: %i\n"
|
||||||
" Rotation: (%f, %f, %f)\n"
|
" Rotation: (%f, %f, %f)\n"
|
||||||
" Location: (%f, %f, %f)\n"
|
" Location: (%f, %f, %f)\n"
|
||||||
" Reference point: (%f, %f, %f)\n"
|
" Reference point: (%f, %f, %f)\n"
|
||||||
" VAO ID: %i\n"
|
" VAO ID: %i\n"
|
||||||
"}\n",
|
"}\n",
|
||||||
int(node->children.size()),
|
int(node->children.size()),
|
||||||
node->rotation.x, node->rotation.y, node->rotation.z,
|
node->rotation.x, node->rotation.y, node->rotation.z,
|
||||||
node->position.x, node->position.y, node->position.z,
|
node->position.x, node->position.y, node->position.z,
|
||||||
node->referencePoint.x, node->referencePoint.y, node->referencePoint.z,
|
node->referencePoint.x, node->referencePoint.y, node->referencePoint.z,
|
||||||
node->vertexArrayObjectID);
|
node->vertexArrayObjectID);
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "lodepng.h"
|
#include "lodepng.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
typedef unsigned int uint;
|
typedef unsigned int uint;
|
||||||
|
|
||||||
struct PNGImage {
|
struct PNGImage {
|
||||||
uint width, height;
|
uint width, height;
|
||||||
bool repeat_mirrored = false;
|
bool repeat_mirrored = false;
|
||||||
std::vector<unsigned char> pixels; // RGBA
|
std::vector<unsigned char> pixels; // RGBA
|
||||||
};
|
};
|
||||||
|
|
||||||
PNGImage loadPNGFile(std::string fileName, bool flip_handedness=false);
|
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, float scale=0.1);
|
||||||
|
|
||||||
PNGImage makePerlinNoisePNG(uint w, uint h, std::vector<float> scales);
|
PNGImage makePerlinNoisePNG(uint w, uint h, std::vector<float> scales);
|
||||||
|
Loading…
Reference in New Issue
Block a user