Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (15 years ago)
Author:
garnier
Message:

update ti head

Location:
trunk/source/visualization/management
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/management/CVS/Entries

    r1337 r1340  
    44/Doxyfile/1.2/Mon Jul 12 14:53:19 2010//
    55/GNUmakefile/1.17/Thu Sep 30 06:17:35 2010//
    6 /History/1.153/Thu Sep 30 11:54:27 2010//
    76/sources.cmake/1.1/Wed Sep 29 19:15:02 2010//
     7/History/1.155/Fri Oct  8 10:03:41 2010//
  • trunk/source/visualization/management/History

    r1337 r1340  
    1 $Id: History,v 1.153 2010/09/03 15:57:22 gcosmo Exp $
     1$Id: History,v 1.155 2010/10/07 07:31:43 allison Exp $
    22
    33-------------------------------------------------------------------
     
    2626History file for visualization management sub-category
    2727------------------------------------------------------
     28
     294th November 2010  Laurent Garnier Allison
     30- Added initialization of fGeometryMask (according to coverity.cern.ch)
     31
     326th October 2010  John Allison  (visman-V09-03-12)
     33- Added /vis/viewer/set/defaultColour and /vis/viewer/set/defaultTextColour.
    2834
    29353rd September 2010  Gabriele Cosmo  (visman-V09-03-11)
  • trunk/source/visualization/management/include/CVS/Entries

    r1337 r1340  
    2626/G4VisCommandsSceneHandler.hh/1.8/Thu Sep 30 06:17:37 2010//
    2727/G4VisCommandsViewer.hh/1.23/Thu Sep 30 06:17:37 2010//
    28 /G4VisCommandsViewerSet.hh/1.23/Thu Sep 30 06:17:37 2010//
    2928/G4VisExecutive.hh/1.10/Thu Sep 30 06:17:38 2010//
    3029/G4VisExecutive.icc/1.26/Thu Sep 30 06:17:38 2010//
     
    3938/G4VisModelManager.hh/1.4/Thu Sep 30 06:17:38 2010//
    4039/G4VisStateDependent.hh/1.5/Thu Sep 30 06:17:38 2010//
     40/G4VisCommandsViewerSet.hh/1.24/Wed Oct  6 15:52:57 2010//
    4141D
  • trunk/source/visualization/management/include/G4VisCommandsViewerSet.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4VisCommandsViewerSet.hh,v 1.23 2009/05/13 18:17:25 allison Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4VisCommandsViewerSet.hh,v 1.24 2010/10/06 10:15:38 allison Exp $
     28// GEANT4 tag $Name: $
    2929
    3030// /vis/viewer/set commands - John Allison  16th May 2000
     
    5959  G4UIcommand*          fpCommandCulling;
    6060  G4UIcmdWithAString*   fpCommandCutawayMode;
     61  G4UIcommand*          fpCommandDefaultColour;
     62  G4UIcommand*          fpCommandDefaultTextColour;
    6163  G4UIcmdWithABool*     fpCommandEdge;
    6264  G4UIcommand*          fpCommandExplodeFactor;
  • trunk/source/visualization/management/src/CVS/Entries

    r1337 r1340  
    1616/G4VisCommandsSceneHandler.cc/1.32/Thu Sep 30 06:17:41 2010//
    1717/G4VisCommandsViewer.cc/1.76/Thu Sep 30 06:17:42 2010//
    18 /G4VisCommandsViewerSet.cc/1.50/Thu Sep 30 06:17:42 2010//
    1918/G4VisFeaturesOfDAWNFILE.cc/1.6/Thu Sep 30 06:17:42 2010//
    2019/G4VisFeaturesOfFukuiRenderer.cc/1.5/Thu Sep 30 06:17:42 2010//
     
    2423/G4VisStateDependent.cc/1.6/Thu Sep 30 06:17:43 2010//
    2524/G4ViewParameters.cc/1.37/Thu Sep 30 11:54:33 2010//
     25/G4VisCommandsViewerSet.cc/1.52/Mon Oct 11 09:00:12 2010//
    2626D
  • trunk/source/visualization/management/src/G4ViewParameters.cc

    r1337 r1340  
    4949  fXNegative(0x0010),
    5050  fYNegative(0x0020),
     51  fGeometryMask(0),
    5152  fDrawingStyle (wireframe),
    5253  fAuxEdgeVisible (false),
  • trunk/source/visualization/management/src/G4VisCommandsViewerSet.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4VisCommandsViewerSet.cc,v 1.50 2009/05/13 18:17:25 allison Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4VisCommandsViewerSet.cc,v 1.52 2010/10/08 12:41:52 allison Exp $
     28// GEANT4 tag $Name: $
    2929
    3030// /vis/viewer/set commands - John Allison  16th May 2000
     
    143143  fpCommandCutawayMode->SetDefaultValue("union");
    144144
     145  fpCommandDefaultColour = new G4UIcommand
     146    ("/vis/viewer/set/defaultColour",this);
     147  fpCommandDefaultColour->SetGuidance
     148    ("Set defaultColour colour and transparency (default white and opaque).");
     149  fpCommandDefaultColour->SetGuidance
     150    ("Accepts (a) RGB triplet. e.g., \".3 .4 .5\", or"
     151     "\n(b) string such as \"white\", \"black\", \"grey\", \"red\"..."
     152     "\n(c) an additional number for opacity, e.g., \".3 .4 .5 .6\""
     153     "\n    or \"grey ! ! .6\" (note \"!\"'s for unused green and blue parameters),"
     154     "\n    e.g. \"! ! ! 0.\" for a transparent colour.");
     155  parameter = new G4UIparameter("red_or_string", 's', omitable = true);
     156  parameter -> SetDefaultValue ("1.");
     157  fpCommandDefaultColour -> SetParameter (parameter);
     158  parameter = new G4UIparameter("green", 'd', omitable = true);
     159  parameter -> SetDefaultValue (1.);
     160  fpCommandDefaultColour -> SetParameter (parameter);
     161  parameter = new G4UIparameter ("blue", 'd', omitable = true);
     162  parameter -> SetDefaultValue (1.);
     163  fpCommandDefaultColour -> SetParameter (parameter);
     164  parameter = new G4UIparameter ("opacity", 'd', omitable = true);
     165  parameter -> SetDefaultValue (1.);
     166  fpCommandDefaultColour -> SetParameter (parameter);
     167
     168  fpCommandDefaultTextColour = new G4UIcommand
     169    ("/vis/viewer/set/defaultTextColour",this);
     170  fpCommandDefaultTextColour->SetGuidance
     171    ("Set defaultTextColour colour and transparency (default white and opaque).");
     172  fpCommandDefaultTextColour->SetGuidance
     173    ("Accepts (a) RGB triplet. e.g., \".3 .4 .5\", or"
     174     "\n(b) string such as \"white\", \"black\", \"grey\", \"red\"..."
     175     "\n(c) an additional number for opacity, e.g., \".3 .4 .5 .6\""
     176     "\n    or \"grey ! ! .6\" (note \"!\"'s for unused green and blue parameters),"
     177     "\n    e.g. \"! ! ! 0.\" for a transparent colour.");
     178  parameter = new G4UIparameter("red_or_string", 's', omitable = true);
     179  parameter -> SetDefaultValue ("1.");
     180  fpCommandDefaultTextColour -> SetParameter (parameter);
     181  parameter = new G4UIparameter("green", 'd', omitable = true);
     182  parameter -> SetDefaultValue (1.);
     183  fpCommandDefaultTextColour -> SetParameter (parameter);
     184  parameter = new G4UIparameter ("blue", 'd', omitable = true);
     185  parameter -> SetDefaultValue (1.);
     186  fpCommandDefaultTextColour -> SetParameter (parameter);
     187  parameter = new G4UIparameter ("opacity", 'd', omitable = true);
     188  parameter -> SetDefaultValue (1.);
     189  fpCommandDefaultTextColour -> SetParameter (parameter);
     190
    145191  fpCommandEdge = new G4UIcmdWithABool("/vis/viewer/set/edge",this);
    146192  fpCommandEdge->SetGuidance
     
    267313  parameter = new G4UIparameter("field-half-angle",'d',omitable = true);
    268314  parameter->SetDefaultValue(30.);
     315  parameter->SetCurrentAsDefault(true);
    269316  fpCommandProjection->SetParameter(parameter);
    270317  parameter = new G4UIparameter("unit",'s',omitable = true);
    271318  parameter->SetDefaultValue("deg");
     319  parameter->SetCurrentAsDefault(true);
    272320  fpCommandProjection->SetParameter(parameter);
    273321
     
    401449  delete fpCommandCulling;
    402450  delete fpCommandCutawayMode;
     451  delete fpCommandDefaultColour;
     452  delete fpCommandDefaultTextColour;
    403453  delete fpCommandEdge;
    404454  delete fpCommandExplodeFactor;
     
    611661  }
    612662
     663  else if (command == fpCommandDefaultColour) {
     664    G4String redOrString;
     665    G4double green, blue, opacity;
     666    std::istringstream iss(newValue);
     667    iss >> redOrString >> green >> blue >> opacity;
     668    G4Colour colour(1.,1.,1.);  // Default white and opaque.
     669    const size_t iPos0 = 0;
     670    if (std::isalpha(redOrString[iPos0])) {
     671      G4Colour::GetColour(redOrString, colour); // Remains default (white) if
     672                                                // not found.
     673    } else {
     674      colour = G4Colour(G4UIcommand::ConvertTo3Vector(newValue));
     675    }
     676    colour = G4Colour(colour.GetRed(), colour.GetGreen(), colour.GetBlue(), opacity);
     677    G4VisAttributes va = vp.GetDefaultVisAttributes();
     678    va.SetColour(colour);
     679    vp.SetDefaultVisAttributes(va);
     680    if (verbosity >= G4VisManager::confirmations) {
     681      G4cout << "Default colour "
     682             << vp.GetDefaultVisAttributes()->GetColour()
     683             << " requested."
     684             << G4endl;
     685    }
     686  }
     687
     688  else if (command == fpCommandDefaultTextColour) {
     689    G4String redOrString;
     690    G4double green, blue, opacity;
     691    std::istringstream iss(newValue);
     692    iss >> redOrString >> green >> blue >> opacity;
     693    G4Colour colour(1.,1.,1.);  // Default white and opaque.
     694    const size_t iPos0 = 0;
     695    if (std::isalpha(redOrString[iPos0])) {
     696      G4Colour::GetColour(redOrString, colour); // Remains default (white) if
     697                                                // not found.
     698    } else {
     699      colour = G4Colour(G4UIcommand::ConvertTo3Vector(newValue));
     700    }
     701    colour = G4Colour(colour.GetRed(), colour.GetGreen(), colour.GetBlue(), opacity);
     702    G4VisAttributes va = vp.GetDefaultTextVisAttributes();
     703    va.SetColour(colour);
     704    vp.SetDefaultTextVisAttributes(va);
     705    if (verbosity >= G4VisManager::confirmations) {
     706      G4cout << "Default colour "
     707             << vp.GetDefaultTextVisAttributes()->GetColour()
     708             << " requested."
     709             << G4endl;
     710    }
     711  }
     712
    613713  else if (command == fpCommandEdge) {
    614714    G4ViewParameters::DrawingStyle existingStyle = vp.GetDrawingStyle();
Note: See TracChangeset for help on using the changeset viewer.