Skip to content
Snippets Groups Projects
Commit a2df63f4 authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

ENH : initialize points and intialize rendering funnction

parent a997d49a
Branches
Tags
No related merge requests found
......@@ -81,7 +81,8 @@ public:
virtual bool HandleWidgetEvent(std::string widgetId, int event)
{
// Variable declaration
PointType spacePoint, screenPoint;
PointType spacePoint;
spacePoint.Fill(0);
// Left screen abcisse
spacePoint[0] = m_LeftAsymptote->GetAbcisse();
......@@ -137,21 +138,23 @@ virtual bool HandleWidgetEvent(std::string widgetId, int event)
// Update The Rendering Function min and max
ParametersType param = m_RenderingFunction->GetParameters();
param.SetElement(2*m_Channel, m_LeftAsymptote->GetAbcisse() + tx);
param.SetElement(2*m_Channel+1, m_RightAsymptote->GetAbcisse());
param.SetElement(2*m_Channel+1, m_RightAsymptote->GetAbcisse());
m_RenderingFunction->SetParameters(param);
m_RenderingFunction->Initialize();
}
if(m_ModifyRight)
{
double tx = x - abcisseR;
m_RightAsymptote->SetAbcisse(m_RightAsymptote->GetAbcisse() + tx);
m_RightAsymptote->SetAbcisse(m_RightAsymptote->GetAbcisse() + tx);
m_Curve->redraw();
// Update The Rendering Function min and max
ParametersType param = m_RenderingFunction->GetParameters();
param.SetElement(2*m_Channel, m_LeftAsymptote->GetAbcisse());
param.SetElement(2*m_Channel+1, m_RightAsymptote->GetAbcisse()+tx);
param.SetElement(2*m_Channel+1, m_RightAsymptote->GetAbcisse()+tx);
m_RenderingFunction->SetParameters(param);
m_RenderingFunction->Initialize();
}
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment