From e4537770e3983b74a59034ecd623daffe5b2279f Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 4 Jul 2008 18:32:40 +0000 Subject: [PATCH] comet --- Common/DefaultOptions.h | 2 +- Common/Options.cpp | 4 ++-- Fltk/GUI.cpp | 3 ++- Graphics/Entity.cpp | 14 +++++++++++++- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index f9c3a9c700..c98bb2ff97 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -1384,7 +1384,7 @@ StringXNumber ViewOptions_Number[] = { "Use generalized raise?" }, { F|O, "VectorType" , opt_view_vector_type , 4 , - "Vector display type (1=segment, 2=arrow, 3=pyramid, 4=3D arrow, 5=displacement)" }, + "Vector display type (1=segment, 2=arrow, 3=pyramid, 4=3D arrow, 5=displacement, 6=comet)" }, { F, "Visible" , opt_view_visible , 1. , "Is the view visible?" }, diff --git a/Common/Options.cpp b/Common/Options.cpp index ec29d3c215..2e5148d8f9 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.402 2008-06-28 17:06:54 geuzaine Exp $ +// $Id: Options.cpp,v 1.403 2008-07-04 18:32:39 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -7119,7 +7119,7 @@ double opt_view_vector_type(OPT_ARGS_NUM) GET_VIEW(0.); if(action & GMSH_SET) { opt->VectorType = (int)val; - if(opt->VectorType < 1 || opt->VectorType > 5) + if(opt->VectorType < 1 || opt->VectorType > 6) opt->VectorType = 1; if(view) view->setChanged(true); } diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index ad0cd0a390..58a7e1536a 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.692 2008-06-28 17:06:54 geuzaine Exp $ +// $Id: GUI.cpp,v 1.693 2008-07-04 18:32:39 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -3273,6 +3273,7 @@ void GUI::create_option_window() {"Pyramid", 0, 0, 0}, {"3D arrow", 0, 0, 0}, {"Displacement", 0, 0, 0}, + {"Comet", 0, 0, 0}, {0} }; view_choice[2] = new Fl_Choice(L + 2 * WB, 2 * WB + 6 * BH, IW, BH, "Vector display"); diff --git a/Graphics/Entity.cpp b/Graphics/Entity.cpp index cd821367eb..c42bc348e1 100644 --- a/Graphics/Entity.cpp +++ b/Graphics/Entity.cpp @@ -1,4 +1,4 @@ -// $Id: Entity.cpp,v 1.84 2008-04-17 18:21:11 geuzaine Exp $ +// $Id: Entity.cpp,v 1.85 2008-07-04 18:32:40 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -392,6 +392,18 @@ void Draw_Vector(int Type, int Fill, glVertex3d(x + dx, y + dy, z + dz); glEnd(); break; + case 6: + if(relHeadRadius){ + glBegin(GL_POINTS); + glVertex3d(x + dx, y + dy, z + dz); + glEnd(); + } + glBegin(GL_LINES); + glVertex3d(x + dx, y + dy, z + dz); + //glColor4ubv((GLubyte *) & CTX.color.bg); + glVertex3d(x, y, z); + glEnd(); + break; case 2: Draw_SimpleVector(1, Fill, relHeadRadius, relStemLength, relStemRadius, x, y, z, dx, dy, dz, length, light); -- GitLab