Commit 575b79f7 by Sebastian Eichelbaum

[MERGE]

parents b4ec70bb b142eed5
Pipeline #229 passed with stages
in 17 minutes 53 seconds
stages:
- test
- Initialization
- Stylecheck_doc_stage
- Build_and_test_release_stage
- Build_and_test_debug_stage
buildAndTest:
stage: test
create_directory_and_cmake___release:
stage: Initialization
cache:
key: "CacheRelease"
paths:
- build/release
script:
- echo "Init1 job output"
- ls
- mkdir -p build
- cd build
- cmake ../src -DCMAKE_BUILD_TYPE=Release
- make
- make vtest
- mkdir -p release
- cd release
- ls
- cmake ../../src -DCMAKE_BUILD_TYPE=Release
- ls
create_directry_and_cmake___debug:
stage: Initialization
cache:
key: "CacheDebug"
paths:
- build/debug
script:
- echo "Init1 job output"
- ls
- mkdir -p build
- cd build
- mkdir -p debug
- cd debug
- ls
- cmake ../../src -DCMAKE_BUILD_TYPE=Debug
- ls
stylecheck_job:
stage: Stylecheck_doc_stage
cache:
key: "CacheRelease"
paths:
- build/release
script:
- pwd
- cd build/release
- pwd
- ls
- make stylecheck
doc_job:
stage: Stylecheck_doc_stage
cache:
key: "CacheDebug"
paths:
- build/debug
script:
- pwd
- cd build/debug
- pwd
- ls
- make doc
buildAndTest:
stage: Build_and_test_release_stage
cache:
key: "CacheRelease"
paths:
- build/release
script:
- pwd
- cd build/release
- pwd
- ls
- make -j 8
- make vtest
buildAndTestDebug:
stage: Build_and_test_debug_stage
cache:
key: "CacheDebug"
paths:
- build/debug
script:
- pwd
- cd build/debug
- pwd
- ls
- make -j 8
- make vtest
......@@ -23,4 +23,5 @@ Patrick Oesterling
Robert Frohl
Robin Ledig
Sebastian Kiunke
Sebastian Volke
Stefan Philips
......@@ -74,7 +74,7 @@ void genReactionDiffusion( unsigned char* target,
unsigned int width, unsigned int /* height */,
unsigned int iterations,
float spotSize,
float spotIrregularity)
float spotIrregularity )
{
/////////////////////////////////////////////////////////////////////////////////////////////
// 1: get memory
......@@ -131,7 +131,7 @@ void genReactionDiffusion( unsigned char* target,
float kaMin = 0.02;
float kaMax = 0.6;
float ka = (kaMin + ((kaMax - kaMin) * (1.0-spotSize))) / 15.0; // size of spots
float ka = ( kaMin + ( ( kaMax - kaMin ) * ( 1.0 - spotSize ) ) ) / 15.0; // size of spots
float d1= 0.25 / 2.0;
float d2= 0.0625 / 2.0;
float speed = 1.0;
......
......@@ -22,6 +22,7 @@
//
//---------------------------------------------------------------------------
#include <algorithm>
#include <iostream>
#include <vector>
......@@ -239,12 +240,18 @@ void WTuringTextureCreator::TextureThread::threadMain()
// diffusion
( *m_delta1 )[ idx ] = m_spotFactor * ( 16.0f - ( *m_concentration1 )[ idx ] * ( *m_concentration2 )[ idx ] ) + m_diffusionConstant1 * dc1;
( *m_delta2 )[ idx ] = m_spotFactor * ( ( *m_concentration1 )[ idx ] * ( *m_concentration2 )[ idx ] - ( *m_concentration2 )[ idx ] - ( *m_noise )[ idx ] ) + m_diffusionConstant2 * dc2;
( *m_delta2 )[ idx ] = m_spotFactor *
( ( *m_concentration1 )[ idx ] * ( *m_concentration2 )[ idx ]
- ( *m_concentration2 )[ idx ] - ( *m_noise )[ idx ] )
+ m_diffusionConstant2 * dc2;
}
}
void WTuringTextureCreator::TextureThread::setBufferPointers( std::vector< float > const* concentration1, std::vector< float > const* concentration2,
std::vector< float > const* noise, std::vector< float >* delta1, std::vector< float >* delta2 )
void WTuringTextureCreator::TextureThread::setBufferPointers( std::vector< float > const* concentration1,
std::vector< float > const* concentration2,
std::vector< float > const* noise,
std::vector< float >* delta1,
std::vector< float >* delta2 )
{
WPrecond( concentration1 != 0, "Invalid pointer!" );
WPrecond( concentration2 != 0, "Invalid pointer!" );
......
......@@ -38,7 +38,6 @@
class WTuringTextureCreator
{
public:
/**
* Constructor. Initializes threading but does not yet start texture creation.
*
......@@ -150,7 +149,6 @@ private:
virtual void threadMain();
private:
/**
* ID of the thread.
*/
......
......@@ -126,14 +126,14 @@ uniform float u_clipFA = 0.01;
// computes FA from eigenvalues
float getFA( vec3 evalues )
{
float sqrt32 = sqrt(3./2.); // would make this const, if compiler let me
float sqrt32 = sqrt( 3. / 2. ); // would make this const, if compiler let me
float I1 = evalues.x+evalues.y+evalues.z;
float mu = I1/3.;
float mu = I1 / 3.;
vec3 deriv;
deriv.x = (evalues.x-mu);
deriv.y = (evalues.y-mu);
deriv.z = (evalues.z-mu);
float FA = sqrt32 * length(deriv)/length(evalues);
deriv.x = ( evalues.x - mu );
deriv.y = ( evalues.y - mu );
deriv.z = ( evalues.z - mu );
float FA = sqrt32 * length( deriv ) / length( evalues );
return FA;
}
......@@ -157,11 +157,11 @@ void main()
// find nearest cube planes in direction of the normal
int nearestPlane = 0;
float smallestD = 1e10;
vec3 cubeBase = vec3( 0.0 );//cubeBaseX, cubeBaseY, cubeBaseZ);
vec3 cubeBase = vec3( 0.0 ); //cubeBaseX, cubeBaseY, cubeBaseZ);
#ifdef CUBETEXTUREMAPPING_VARIANT1_A
// try each of the 6 planes and find nearest (positive) hit
for( int axis=0; axis<3; axis++ )
for( int axis = 0; axis < 3; axis++ )
{
// search the n in : vertex[axis]+n*_normal[axis] = 1.0 | 0.0
float n1 = ( 1.0 - v[axis] ) / v_normalObject[axis];
......@@ -185,7 +185,7 @@ void main()
#ifdef CUBETEXTUREMAPPING_VARIANT1_B
// try each of the 6 planes and find nearest (positive) hit
for( int axis=0; axis<3; axis++ )
for( int axis = 0; axis < 3; axis++ )
{
float d1 = v[axis];
float d2 = 1.0 - v[axis];
......@@ -196,7 +196,7 @@ void main()
float d = min( d1, d2 );
// smaller than currently found one?
if ( d < smallestD )
if( d < smallestD )
{
smallestD = d;
nearestPlane = axis;
......@@ -245,7 +245,7 @@ void main()
#endif
#ifdef CUBETEXTUREMAPPING_VARIANT2
vec3 v = v_vertex.xyz;// - floor( v_vertex.xyz );
vec3 v = v_vertex.xyz; // - floor( v_vertex.xyz );
float scaler = ( u_noiseResoultuion / 100.0 );
v*=scaler;
if( abs( v_normalObject.x ) == max( abs( v_normalObject.x ), max( abs( v_normalObject.y ), abs( v_normalObject.z ) ) ) )
......@@ -263,7 +263,7 @@ void main()
#endif
#ifdef CUBETEXTUREMAPPING_VARIANT3
float scaler = 10.0 / u_noiseResoultuion ;
float scaler = 10.0 / u_noiseResoultuion;
noiseTexCoords = vec2( scaler * gl_FragCoord.x / u_texture3SizeX,
scaler * gl_FragCoord.y / u_texture3SizeY );
#endif
......@@ -357,6 +357,5 @@ void main()
gl_FragData[1] = vec4( light, noise, gl_FragCoord.z, 1.0 );
gl_FragData[2] = vec4( abs( evals.r - evals.g ), fa, 0.0, 1.0 );
gl_FragData[3] = cmap;
}
......@@ -272,7 +272,12 @@ FUNCTION( SETUP_STYLECHECKER _TargetName _CheckFiles _Excludes )
# add a new target for this lib
ADD_CUSTOM_TARGET( stylecheck_${_TargetName}
# The following COMMAND will cause printing of the errors if there are errors
# and no ouput if no errors occured (not even the number of errors, i.e. 0)
COMMAND cat ${BrainLinterListFile} | xargs ${XARGS_OPTIONS} ${PROJECT_SOURCE_DIR}/../tools/style/brainlint/brainlint.py ${STYLECHECK_OPTIONS} 2>&1 | grep -iv 'Total errors found: 0$$' | cat
# The following COMMAND will cause will produce the exit code corresponding to
# whether there have been errors (2) or not (0).
COMMAND cat ${BrainLinterListFile} | xargs ${XARGS_OPTIONS} ${PROJECT_SOURCE_DIR}/../tools/style/brainlint/brainlint.py ${STYLECHECK_OPTIONS} 2>&1 | grep -qi 'Total errors found: 0$$'
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Check if ${_TargetName} complies to CodingStandard"
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment