broken because of using Core::RenderContext

This commit is contained in:
Dominik Piasecki 2024-01-22 00:37:08 +01:00
parent 6718cd7e5e
commit 7431154600
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,23 @@
#include "Distribution.h"
#include <math.h>
float humMean; float humSD; float tempMean; float tempSD; std::string name; std::string fileName; Core::RenderContext modelContext; glm::mat4 modelMatrix;
Plant::Plant::Plant(float humMean, float humSD, float tempMean, float tempSD, std::string name, std::string fileName) {
humMean = humMean;
humSD = humSD;
tempMean = tempMean;
tempSD = tempSD;
name = name;
fileName = fileName;
modelContext = Core::RenderContext{};
modelMatrix = glm::mat4();
}
float Plant::Plant::calcProbability(float xValue, float mean, float sd)
{
float temp = (xValue - mean) / sd * sqrt(2);
return (1+erf(temp))/2;
}

View File

@ -0,0 +1,16 @@
#pragma once
#include <string>
#include "Render_Utils.h"
#include "Render_Utils.cpp"
#include "glm.hpp"
namespace Plant
{
class Plant {
public:
float humMean; float humSD; float tempMean; float tempSD; std::string name; std::string fileName; glm::mat4 modelMatrix;
Plant(float humMean, float humSD, float tempMean, float tempSD, std::string name, std::string fileName);
static float calcProbability(float xValue, float mean, float sd);
};
}