Added follow cam

Added "Controlled" mesh classes
Added Global Lighting Class
Added Gamepad controls
Split terrain nodes into Height and Perlin classes
Fixed Splitmesh node stuff
This commit is contained in:
iDunnoDev
2022-05-09 17:50:22 +01:00
committed by iDunnoDev
parent bc906064e5
commit f6bba67897
58 changed files with 1743 additions and 351 deletions

View File

@ -0,0 +1,29 @@
#pragma once
#include "DirectXFramework.h"
#include <vector>
#include <numeric>
#include <random>
#include "SharedMethods.h"
#include "TerrainNode.h"
class PerlinTerrainNode : public TerrainNode
{
public:
PerlinTerrainNode(wstring name, wstring seed, float offsetX, float offsetY, float chunkSize, int layers, int widthX = 1023, int widthZ = 1023, float waterHeight = 150.0f, int cellSizeX = 10, int cellSizeZ = 10);
private:
vector<int> p;
float _offsetX;
float _offsetY;
float _chunkSize;
int _layers;
float Fade(float t);
float Grad(int hash, float x, float y);
bool GeneratePerlinHeights();
float GetPerlinValueAt(float x, float y, int octaves, float persistance);
float GetNoiseValueAt(float x, float y);
void GeneratePerlinValues();
};