]> granicus.if.org Git - graphviz/commitdiff
smyrna animation
authorarif <devnull@localhost>
Mon, 16 Feb 2009 22:03:14 +0000 (22:03 +0000)
committerarif <devnull@localhost>
Mon, 16 Feb 2009 22:03:14 +0000 (22:03 +0000)
cmd/smyrna/topfisheyeview.c
cmd/smyrna/viewport.c
dot.demo/dot_demo.vcproj
graphviz.sln

index 370987d2422d9e01f8fd3567890884a72616dec3..ff1e5faadf6e10f8d5db34654b40c3366c738104 100644 (file)
@@ -291,21 +291,8 @@ void drawtopfishnodes(topview * t)
        
        glEnable(GL_POINT_SMOOTH);      /*turn this off to make points look square*/
        //draw focused node little bigger than others
-       glPointSize(8);
-//    glBegin(GL_POINTS);
-
-/*     for (v = 0; v < hp->nvtxs[0]; v++) 
-       {
-               ex_vtx_data *gg = hp->geom_graphs[0];
-               if ((gg[v].active_level == 0) &&(v==t->fs->foci_nodes[0]))
-               {
-                       double x0,y0;
-                       get_temp_coords(t,0,v,&x0,&y0);
-                       glColor3f(0,0,1);
-                       glVertex3f((GLfloat) x0, (GLfloat) y0, (GLfloat) -0.1);
-               }
-       }
-       glEnd();*/
+/*             ex_vtx_data *gg = hp->geom_graphs[0];
+               if ((gg[v].active_level == 0) &&(v==t->fs->foci_nodes[0]))*/
 
 
 
@@ -399,37 +386,47 @@ int get_temp_coords(topview* t,int level,int v,double* coord_x,double* coord_y)
        else
        {
 
-                       double x0,y0,x1,y1;     
-                                               if  (
-                               ((level == gg[v].old_active_level)  && (level == gg[v].active_level))
-                                               ||
-                               ((level < gg[v].old_active_level)  && (level == gg[v].active_level))
-                                       ||
-                               ((level == gg[v].old_active_level)  && (level < gg[v].active_level))
-                               )
-                       {
                                
+                               double x0,y0,x1,y1;     
+                               int OAL,AL;
+
+                               x0=0;
+                               y0=0;
+                               x1=0;
+                               y1=0;
                                get_active_frame(t);
-                               if (!((level == gg[v].old_active_level)  && (level < gg[v].active_level)))
-                               {
-                                       find_old_physical_coords(t->h,level,v,&x0,&y0);
-                                       x1=(double)gg[v].physical_x_coord;
-                                       y1=(double)gg[v].physical_y_coord;
-                               }
-                               else
-                               {
-                                       find_physical_coords(t->h,level,v,&x1,&y1);
-                                       x0=(double)gg[v].old_physical_x_coord;
-                                       y0=(double)gg[v].old_physical_y_coord;
 
+                               AL=gg[v].active_level;
+                               OAL=gg[v].old_active_level;
 
-                               }
+                               if ((OAL < level) || (AL < level))      //no draw 
+                                       return 0;
+                               if ((OAL >= level) || (AL >= level))    //draw the node
+                               {
+                                       if((OAL == level) && (AL == level)) //draw as is from old coords to new)
+                                       {
+                                               x0=(double)gg[v].old_physical_x_coord;
+                                               y0=(double)gg[v].old_physical_y_coord;
+                                               x1=(double)gg[v].physical_x_coord;
+                                               y1=(double)gg[v].physical_y_coord;                                      
+                                       }
+                                       if((OAL > level) && (AL == level)) //draw as  from ancs  to new)
+                                       {
+                                               find_old_physical_coords(t->h,level,v,&x0,&y0);
+                                               x1=(double)gg[v].physical_x_coord;
+                                               y1=(double)gg[v].physical_y_coord;              
+                                       }
+                                       if((OAL == level) && (AL > level)) //draw as  from ancs  to new)
+                                       {
+                                               find_physical_coords(t->h,level,v,&x1,&y1);
+                                               x0=(double)gg[v].old_physical_x_coord;
+                                               y0=(double)gg[v].old_physical_y_coord;          
+                                       }
+                                       get_interpolated_coords(x0,y0,x1,y1,view->active_frame,view->total_frames,coord_x,coord_y);
+                                       if ((x0 == 0) || (x1==0))
+                                               return 0;
 
-//                             get_interpolated_coords(x0,y0,(double)gg[v].physical_x_coord,(double)gg[v].physical_y_coord,view->active_frame,view->total_frames,coord_x,coord_y);
-                               get_interpolated_coords(x0,y0,x1,y1,view->active_frame,view->total_frames,coord_x,coord_y);
-                       }
-                       else
-                               return 0;
+                               }
        }
        return 1;
 }
@@ -657,6 +654,8 @@ void changetopfishfocus(topview * t, float *x, float *y,
        t->parms.repos.distortion=atof(agget(view->g[0],"topologicalfisheyedistortionfactor"));
        positionAllItems(hp, fs, &(t->parms.repos));
 
+       view->Topview->animate=1;
+
        if(t->animate)
        {
                view->active_frame=0;
@@ -708,7 +707,7 @@ int get_active_frame(topview* t)
        else
        {
                g_timer_stop(view->timer); 
-//             view->Topview->animate=0;
+               view->Topview->animate=0;
                return 0;
        }
 
index 754473b413e85cfd974b9c81160cbcec00a92401..86dc05a827faa3aab1a3b729a36f9c315759b169 100755 (executable)
@@ -396,8 +396,8 @@ void init_viewport(ViewInfo * view)
        view->timer=g_timer_new();
        g_timer_stop(view->timer); 
        view->active_frame=0;
-       view->total_frames=75;
-       view->frame_length=125;
+       view->total_frames=125;
+       view->frame_length=5;
        /*add a call back to the main()*/
        g_timeout_add_full(G_PRIORITY_DEFAULT,100,gl_main_expose,NULL,NULL);
        view->Topview->topviewmenu = '\0';
index 6e3ff42ca70647cc6c3295e304eb6ce35d1063a9..0322e8f74841f836cd5cf4f2a575b4a52a2c9716 100644 (file)
@@ -48,7 +48,7 @@
                                WarningLevel="3"
                                Detect64BitPortabilityProblems="true"
                                DebugInformationFormat="4"
-                               CompileAs="1"
+                               CompileAs="2"
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
index ecbc1e7befd6c5f551d1e8d1cc6f54a62b3b16c0..bf25f48739a3fe85c9229a0cb1599ac9b8ff751d 100644 (file)
@@ -10,12 +10,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdt", "lib\cdt\cdt.vcproj",
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvc", "lib\gvc.vcproj", "{15229511-9F6C-48A5-9194-660CA6492563}"
        ProjectSection(ProjectDependencies) = postProject
+               {A8018B47-1FB9-4966-A02C-1F64D65C33C9} = {A8018B47-1FB9-4966-A02C-1F64D65C33C9}
                {BD347753-A09D-48B4-8752-F1D8D9CF235D} = {BD347753-A09D-48B4-8752-F1D8D9CF235D}
                {83CF0498-7884-49D3-8B3C-263C5AF5FE1B} = {83CF0498-7884-49D3-8B3C-263C5AF5FE1B}
+               {0DEA7FAC-4190-4B39-BEF0-1C055758FED3} = {0DEA7FAC-4190-4B39-BEF0-1C055758FED3}
                {6BD77BDE-151D-4824-A8BC-9F067662F7AB} = {6BD77BDE-151D-4824-A8BC-9F067662F7AB}
                {4B6103EF-590B-4916-92CB-D06934459928} = {4B6103EF-590B-4916-92CB-D06934459928}
-               {0DEA7FAC-4190-4B39-BEF0-1C055758FED3} = {0DEA7FAC-4190-4B39-BEF0-1C055758FED3}
-               {A8018B47-1FB9-4966-A02C-1F64D65C33C9} = {A8018B47-1FB9-4966-A02C-1F64D65C33C9}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graph", "lib\graph\graph.vcproj", "{A8018B47-1FB9-4966-A02C-1F64D65C33C9}"
@@ -375,8 +375,8 @@ Global
                {89ED80CE-5DEF-46B1-9A12-1D991236EE3E}.Release|Win32.Build.0 = Debug|Win32
                {8262E86F-BCFF-4F29-B583-4320932B023B}.Debug|Win32.ActiveCfg = Debug|Win32
                {8262E86F-BCFF-4F29-B583-4320932B023B}.Debug|Win32.Build.0 = Debug|Win32
-               {8262E86F-BCFF-4F29-B583-4320932B023B}.Release|Win32.ActiveCfg = Debug|Win32
-               {8262E86F-BCFF-4F29-B583-4320932B023B}.Release|Win32.Build.0 = Debug|Win32
+               {8262E86F-BCFF-4F29-B583-4320932B023B}.Release|Win32.ActiveCfg = Release|Win32
+               {8262E86F-BCFF-4F29-B583-4320932B023B}.Release|Win32.Build.0 = Release|Win32
                {0DEA6915-263C-4570-B25C-E0A449894D45}.Debug|Win32.ActiveCfg = Debug|Win32
                {0DEA6915-263C-4570-B25C-E0A449894D45}.Debug|Win32.Build.0 = Debug|Win32
                {0DEA6915-263C-4570-B25C-E0A449894D45}.Release|Win32.ActiveCfg = Debug|Win32