This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void computeCubicSplineCoefficients(double** a, double* x, double* y, int n) | |
{ | |
double** matrix = new double*[n-1]; | |
for (int i=0; i<n-1; i++) | |
matrix[i] = new double[n-1]; | |
double* sol = new double[n-1]; | |
double* rhs = new double[n-1]; | |
//create our h array | |
double* h = new double[n-1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void computeCubicSplineCoefficients(double** a, double* x, double* y, int n) | |
{ | |
double** matrix = new double*[n-1]; | |
for (int i=0; i<n-1; i++) | |
matrix[i] = new double[n-1]; | |
double* sol = new double[n-1]; | |
double* rhs = new double[n-1]; | |
/* Füllen Sie hier die Matrix und die rechte Seite mit den entsprechenden Werten. */ | |
for(int i=0;i<n-1;++i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void computeCubicSplineCoefficients(double** a, double* x, double* y, int n) | |
{ | |
double** matrix = new double*[n-1]; | |
for (int i=0; i<n-1; i++) | |
matrix[i] = new double[n-1]; | |
double* sol = new double[n-1]; | |
double* rhs = new double[n-1]; | |
/* Füllen Sie hier die Matrix und die rechte Seite mit den entsprechenden Werten. */ | |
for(int i=0;i<n-1;++i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void computeCubicSplineCoefficients(double** a, double* x, double* y, int n) | |
{ | |
double** matrix = new double*[n-1]; | |
for (int i=0; i<n-1; i++) | |
matrix[i] = new double[n-1]; | |
double* sol = new double[n-1]; | |
double* rhs = new double[n-1]; | |
/* Füllen Sie hier die Matrix und die rechte Seite mit den entsprechenden Werten. */ | |
for(int i=0;i<n-1;++i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void computeCubicSplineCoefficients(double** a, double* x, double* y, int n) | |
{ | |
double** matrix = new double*[n-1]; | |
for (int i=0; i<n-1; i++) | |
matrix[i] = new double[n-1]; | |
double* sol = new double[n-1]; | |
double* rhs = new double[n-1]; | |
/* Füllen Sie hier die Matrix und die rechte Seite mit den entsprechenden Werten. */ | |
for(int i=0;i<n-1;++i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
VERTEX SHADER FOR SIMPLE LIGHT MODELS | |
created by Daniel Jungblut, IWR Heidelberg, February 2008 | |
refined by Bastian Rieck, IWR Heidelberg, May 2010 | |
Simplified Blinn-Phong shading model for a single light source. Hit SPACE in | |
order to move the light source. All vector calculations should be made in | |
world coordinates. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <map> | |
namespace anvil | |
{ | |
template<class xtype, class ytype> | |
class Interpolate | |
{ | |
public: | |
inline void AddPoint(const xtype x, const ytype y) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void JsonLoader::LoadMaterial(const std::string &name, const std::string &path) | |
{ | |
std::shared_ptr<Material> mat; | |
std::ifstream fin(path, std::ios::in); | |
if (fin.fail()) | |
throw AnvilException("Failed to open material file: " + path, __FILE__, __LINE__); | |
IStreamWrapper isw(fin); | |
Document d; | |
ParseResult ok = d.ParseStream(isw); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 400 core | |
in vec3 position; | |
in vec2 uv; | |
in vec3 normal; | |
in vec3 material; | |
uniform vec3 cameraPos; | |
uniform vec3 lightDir; | |
uniform sampler2DArray albedoTex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 400 core | |
in vec3 position; | |
in vec2 uv; | |
in vec3 normal; | |
in vec3 material; | |
in mat3 TBN; | |
uniform vec3 cameraPos; | |
uniform vec3 lightDir; |