Skip to content

Commit

Permalink
fixed important RTT initialization problem where backward and forward…
Browse files Browse the repository at this point in the history
… directions where not equivalent
  • Loading branch information
chamberm committed Nov 13, 2015
1 parent cc1d0af commit 3797a27
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/dataset/RTTFibers.cpp
Expand Up @@ -147,6 +147,8 @@ void RTTFibers::clearFibersRTT()
m_streamlinesColors.clear();
m_streamlinesPoints.clear();

m_storedDir.clear();

if( SceneManager::getInstance()->isUsingVBO() )
{
glDeleteBuffers( 2, m_bufferObjectsRTT );
Expand Down Expand Up @@ -1500,7 +1502,17 @@ void RTTFibers::performHARDIRTT(Vector seed, int bwdfwd, vector<float>& points,
if( withinMapThreshold(sticksNumber, currPosition) && !m_stop && absPeak != 0)
{
bool initWithDir = RTTrackingHelper::getInstance()->isInitSeed();
sticks = pickDirection(m_pMaximasInfo->getMainDirData()->at(sticksNumber), initWithDir, currPosition);

if(bwdfwd != -1)
{
sticks = pickDirection(m_pMaximasInfo->getMainDirData()->at(sticksNumber), initWithDir, currPosition);
m_storedDir = sticks;
}
else
{
sticks = m_storedDir;
}


currDirection.x = flippedAxes.x * sticks[0];
currDirection.y = flippedAxes.y * sticks[1];
Expand Down
2 changes: 2 additions & 0 deletions src/dataset/RTTFibers.h
Expand Up @@ -127,6 +127,8 @@ class RTTFibers

std::vector<float> m_streamlinesPoints; // Points to be rendered Forward
std::vector<float> m_streamlinesColors; //Color (local directions)Forward

std::vector<float> m_storedDir;


float m_alpha;
Expand Down

0 comments on commit 3797a27

Please sign in to comment.