Exemplo n.º 1
0
void CStatDialog::OnSelchangeUser() 
{
	m_UserList.GetLBText(m_UserList.GetCurSel(), m_User);
	if (m_User.CompareNoCase("<<ALL>>") == 0)
		m_User = "";
	UpdatePlots();
}
Exemplo n.º 2
0
// ****************************************************************************
// Method:  EL3DWindow::SetPipeline
//
// Purpose:
///   Set the pipeline this window is showing.
//
// Arguments:
//   index      the index of the pipeline
//   p          the pipeline to show
//
// Programmer:  Jeremy Meredith
// Creation:    August 16, 2012
//
// Modifications:
// ****************************************************************************
void
EL3DWindow::PipelineUpdated(Pipeline *pipe)
{
    settings->PipelineUpdated(pipe);
    UpdatePlots();
    ResetView();
}
Exemplo n.º 3
0
void CStatDialog::OnSelchangeGroup() 
{
	m_GroupList.GetLBText(m_GroupList.GetCurSel(), m_Group);
	if (m_Group.CompareNoCase("<<ALL>>") == 0)
		m_Group = "";
	UpdatePlots();
}
Exemplo n.º 4
0
// ****************************************************************************
// Method:  EL3DWindow::ResetView
//
// Purpose:
///   Sets up the camera based on the current pipelines.
//
// Arguments:
//   w,h        new width, height
//
// Programmer:  Jeremy Meredith
// Creation:    August 16, 2012
//
// Modifications:
// ****************************************************************************
void
EL3DWindow::ResetView()
{
    //cerr << "EL3DWindow::ResetView\n";
    UpdatePlots();
    scene->ResetView(window);
    updateGL();
}
Exemplo n.º 5
0
// ****************************************************************************
// Method:  EL3DWindow::paintGL
//
// Purpose:
///   QGLWidget method for when the window needs to be painter.
///   This does all the drawing.
//
// Arguments:
//   none
//
// Programmer:  Jeremy Meredith
// Creation:    August 16, 2012
//
// Modifications:
//   Jeremy Meredith, Thu Nov 29 12:19:33 EST 2012
//   Added nodal surface normal lighting support.
//
// ****************************************************************************
void
EL3DWindow::paintGL()
{
    bool shoulddraw = UpdatePlots();

    ///\todo: note: there's some issue where this method is getting
    /// called before it's supposed to be.  (I believe it's from
    /// my use of updateGL() in other methods in this class when
    /// e.g. the variable or other settings change.)  If we continue
    /// on anyway, then something bad happens, such as creating
    /// a texture with either the wrong thread or before the context
    /// is ready, which makes the texture unusable.  A safe test
    /// we currently use before proceeding is simply whether or
    /// not any of the plots have data, because we know everything
    /// is safely initialized since the user was able to hit Execute.
    if (!shoulddraw)
        return;

    // okay, we think it's safe to proceed now!
    
    window->Paint();


#if 0
    // various tests of font rendering
    glEnable(GL_DEPTH_TEST);
    glDisable(GL_LIGHTING);
    static eavlTextAnnotation *t1=NULL,*t1b=NULL,*t1c=NULL, *t2a=NULL,*t2b=NULL,*t3=NULL,*t3b=NULL, *t4=NULL,*t4b=NULL;
    if (!t1)
    {
        t1 = new eavlScreenTextAnnotation(window,"Test 2D text, [] height=0.05 near upper-left corner (-.9,.9)",
                                          eavlColor::white, .05,
                                          -.9, 0.9);
        t1b = new eavlScreenTextAnnotation(window,"Test 2D text, [] height=0.05 at (-.9,.85) should be immediately below other 2D text",
                                           eavlColor::white, .05,
                                           -.9, 0.85);
        t1c = new eavlScreenTextAnnotation(window,"Test 2D text, [] height=0.05 at (-.9,-.9) oriented at 90 degrees",
                                           eavlColor::white, .05,
                                           -.9,-.9, 90.);
        t2a = new eavlWorldTextAnnotation(window,"Test 3D text (You), height=1.0 in 3D space at (-5,0,0), diagonal along X=Z, Y=up",
                                         eavlColor::white,
                                         1.0,
                                         -5,0,0,
                                         -1,0,1,
                                         0,1,0);
        t2b = new eavlWorldTextAnnotation(window,"Test 3D text (You), height=1.0 in 3D space at (0,0,-5), diagonal along X=Z, Y=up",
                                         eavlColor::white,
                                         1.0,
                                         0,0,-5,
                                         -1,0,1,
                                         0,1,0);
        t3 = new eavlBillboardTextAnnotation(window,"Test 3D billboard text, height=0.05 in screen space at (0,5,0)",
                                    eavlColor::white,
                                    .05,
                                    0,5,0, true);
        t3b = new eavlBillboardTextAnnotation(window,"Test 3D billboard text, height=1.0 in 3D space at (0,-12,0)",
                                    eavlColor::white,
                                    1.0,
                                    0,-12,0, false);

        t4 = new eavlBillboardTextAnnotation(window,"Test 3D billboard text, height in screen space at 90deg",
                                             eavlColor::white,
                                             .05,
                                             0,5,0, true, 90.0);
        t4b = new eavlBillboardTextAnnotation(window,"Test 3D billboard text, height in 3D space at 90deg",
                                              eavlColor::white,
                                              1.0,
                                              0,-12,0, false, 90.0);
    }


    t1->Render(window->view);
    t1b->Render(window->view);
    t1c->Render(window->view);
    t2a->Render(window->view);
    t2b->Render(window->view);
    t3->Render(window->view);
    t3b->Render(window->view);
    t4->Render(window->view);
    t4b->Render(window->view);
#endif

}
Exemplo n.º 6
0
void CStatDialog::OnSelchangeGraphtab(NMHDR* pNMHDR, LRESULT* pResult) 
{
	UpdatePlots();
	
	*pResult = 0;
}
Exemplo n.º 7
0
// ****************************************************************************
// Method:  EL2DWindow::paintGL
//
// Purpose:
///   QGLWidget method for when the window needs to be painter.
///   This does all the drawing.
//
// Arguments:
//   none
//
// Programmer:  Jeremy Meredith
// Creation:    August 16, 2012
//
// Modifications:
//   Jeremy Meredith, Thu Nov 29 12:19:33 EST 2012
//   Added nodal surface normal lighting support.
//
// ****************************************************************************
void
EL2DWindow::paintGL()
{
    bool shoulddraw = UpdatePlots();

    ///\todo: note: there's some issue where this method is getting
    /// called before it's supposed to be.  (I believe it's from
    /// my use of updateGL() in other methods in this class when
    /// e.g. the variable or other settings change.)  If we continue
    /// on anyway, then something bad happens, such as creating
    /// a texture with either the wrong thread or before the context
    /// is ready, which makes the texture unusable.  A safe test
    /// we currently use before proceeding is simply whether or
    /// not any of the plots have data, because we know everything
    /// is safely initialized since the user was able to hit Execute.
    if (!shoulddraw)
        return;

    // okay, we think it's safe to proceed now!
    window->Paint();

    // test of font rendering
#if 0
    static eavlTextAnnotation *tt=NULL;
    if (!tt)
    {
        switch (1)
        {
          case 1:
            tt = new eavlWorldTextAnnotation(window,"Test 2D world text, [] height=0.05 at (0.3,0.3)",
                                             eavlColor::white, .05,
                                             0.3, 0.3, 0,
                                             0,0,-1,   -1,1,0);
            //tt->SetAnchor(.5,.5);
            break;
          case 2:
            tt = new eavlScreenTextAnnotation(window,"Test 2D text, [] height=0.05 centered with top anchor at 0.9y",
                                              eavlColor::white, .05,
                                              0, 0.9);
            tt->SetAnchor(.5,1);
            break;
          case 3:
            tt = new eavlBillboardTextAnnotation(window,"Test 2D text, [] height=0.05 screen space at (.3,.3)",
                                                 eavlColor::white, .05,
                                                 0.3, 0.3, 0.0, true);
            //tt->SetAnchor(.5,0);
            break;
          case 4:
            tt = new eavlBillboardTextAnnotation(window,"Test 2D text, [] height=0.05 world space at (.3,.3)",
                                                 eavlColor::white, .05,
                                                 0.3, 0.3, 0.0, false);
            tt->SetAnchor(0,0);
            break;
        }
    }
    glDisable(GL_DEPTH_TEST);
    tt->Render(view);
    ///\todo: hack: should SetMatrices maybe do this?
#endif


}