glm/test/gtx/gtx_noise.cpp

51 lines
1.3 KiB
C++
Raw Normal View History

2011-04-21 11:27:05 +00:00
///////////////////////////////////////////////////////////////////////////////////////////////////
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2011-04-21
2011-04-26 14:46:22 +00:00
// Updated : 2011-04-26
2011-04-21 11:27:05 +00:00
// Licence : This source is under MIT licence
// File : test/gtx/noise.cpp
///////////////////////////////////////////////////////////////////////////////////////////////////
#include <glm/glm.hpp>
#include <glm/gtx/noise.hpp>
#include <iostream>
2011-06-01 09:45:24 +00:00
int test_simplex()
2011-04-21 11:27:05 +00:00
{
2011-05-08 00:51:18 +00:00
float ValueSNoise2D = glm::simplex(glm::vec2(0.5f));
float ValueSNoise3D = glm::simplex(glm::vec3(0.5f));
float ValueSNoise4D = glm::simplex(glm::vec4(0.5f));
2011-04-26 14:46:22 +00:00
2011-06-01 09:45:24 +00:00
return 0;
}
int test_perlin()
{
2011-05-08 00:51:18 +00:00
float ValueCNoise2D = glm::perlin(glm::vec2(0.5f));
float ValueCNoise3D = glm::perlin(glm::vec3(0.5f));
float ValueCNoise4D = glm::perlin(glm::vec4(0.5f));
2011-04-28 10:26:18 +00:00
2011-06-01 09:45:24 +00:00
return 0;
}
int test_perlin_pedioric()
{
2011-05-08 00:51:18 +00:00
float ValuePNoise2D = glm::perlin(glm::vec2(0.5f), glm::vec2(0.5f));
float ValuePNoise3D = glm::perlin(glm::vec3(0.5f), glm::vec3(0.5f));
float ValuePNoise4D = glm::perlin(glm::vec4(0.5f), glm::vec4(0.5f));
2011-06-01 09:45:24 +00:00
return 0;
}
int main()
{
int Error = 0;
Error += test_simplex();
Error += test_perlin();
Error += test_perlin_pedioric();
return Error;
2011-04-21 11:27:05 +00:00
}