-
Notifications
You must be signed in to change notification settings - Fork 25
/
NoiseCalculator.h
55 lines (35 loc) · 936 Bytes
/
NoiseCalculator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "Engine.h"
#include "TerrainGenManager.h"
/**
*
*/
class POLYVOX_TEST_API NoiseCalculator : FRunnable
{
public:
NoiseCalculator* calc;
FRunnableThread* Thread;
ATerrainGenManager* genchunk;
float noiseVal = 0.0f;
float de_frequency = 0.005;
float amplitude = 15.0f;
float x = 0.0f;
bool isThreadFinished = false;
FVector chunkloc;
float y = 0.0f;
float z = 0.0f;
bool isFinished() const
{
return noiseVal == 0.0f;
}
NoiseCalculator(ATerrainGenManager* chunk, FVector loc);
NoiseCalculator();
~NoiseCalculator();
virtual bool Init();
virtual void Stop();
virtual uint32 Run();
//virtual void Stop();
static void ShutDown();
void EnsureCompletion();
};