Changeset 5729


Ignore:
Timestamp:
Jun 22, 2015 1:17:20 PM (9 years ago)
Author:
ldelgass
Message:

Start syncing up code between viewers

Location:
trunk/gui/scripts
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/flowvisviewer.tcl

    r5645 r5729  
    33#  COMPONENT: flowvisviewer - 3D flow rendering
    44#
    5 #  This widget performs volume and flow rendering on 3D scalar/vector datasets.
     5#  This widget performs volume and flow rendering on 3D vector datasets.
    66#  It connects to the Nanovis server running on a rendering farm,
    77#  transmits data, and displays the results.
    88# ======================================================================
    99#  AUTHOR:  Michael McLennan, Purdue University
    10 #  Copyright (c) 2004-2012  HUBzero Foundation, LLC
     10#  Copyright (c) 2004-2015  HUBzero Foundation, LLC
    1111#
    1212#  See the file "license.terms" for information on usage and
     
    171171    set _serverType "nanovis"
    172172
    173     # Draw legend event
     173    #DebugOn
     174    EnableWaitDialog 900
     175
     176    # Rebuild event
     177    $_dispatcher register !rebuild
     178    $_dispatcher dispatch $this !rebuild "[itcl::code $this Rebuild]; list"
     179
     180    # Resize event
     181    $_dispatcher register !resize
     182    $_dispatcher dispatch $this !resize "[itcl::code $this DoResize]; list"
     183
     184    # Legend event
    174185    $_dispatcher register !legend
    175186    $_dispatcher dispatch $this !legend "[itcl::code $this FixLegend]; list"
     
    179190    $_dispatcher dispatch $this !send_transfunc \
    180191        "[itcl::code $this SendTransferFunctions]; list"
    181 
    182     # Rebuild event
    183     $_dispatcher register !rebuild
    184     $_dispatcher dispatch $this !rebuild "[itcl::code $this Rebuild]; list"
    185 
    186     # Resize event
    187     $_dispatcher register !resize
    188     $_dispatcher dispatch $this !resize "[itcl::code $this DoResize]; list"
    189192
    190193    $_dispatcher register !play
     
    211214    # Initialize the view to some default parameters.
    212215    array set _view {
    213         -qw      0.853553
    214         -qx      -0.353553
    215         -qy      0.353553
    216         -qz      0.146447
    217         -xpan    0
    218         -ypan    0
    219         -zoom    1.0
     216        -qw       0.853553
     217        -qx       -0.353553
     218        -qy       0.353553
     219        -qz       0.146447
     220        -xpan     0
     221        -ypan     0
     222        -zoom     1.0
    220223    }
    221224    set _arcball [blt::arcball create 100 100]
     
    266269    }]
    267270
    268     itk_component add 3dview {
     271    itk_component add view {
    269272        label $itk_component(plotarea).view -image $_image(plot) \
    270273            -highlightthickness 0 -borderwidth 0
     
    273276        ignore -highlightthickness -borderwidth  -background
    274277    }
    275     bind $itk_component(3dview) <Control-F1> [itcl::code $this ToggleConsole]
     278    bind $itk_component(view) <Control-F1> [itcl::code $this ToggleConsole]
    276279
    277280    set f [$itk_component(main) component controls]
     
    317320            -onimage [Rappture::icon volume-on] \
    318321            -offimage [Rappture::icon volume-off] \
    319             -command [itcl::code $this AdjustSetting -volume] \
    320             -variable [itcl::scope _settings(-volume)]
     322            -variable [itcl::scope _settings(-volume)] \
     323            -command [itcl::code $this AdjustSetting -volume]
    321324    }
    322325    $itk_component(volume) select
     
    362365    # the server.  So the panewindow uses the tiny size.
    363366    set w 10000
    364     pack forget $itk_component(3dview)
     367    pack forget $itk_component(view)
    365368    blt::table $itk_component(plotarea) \
    366         0,0 $itk_component(3dview) -fill both -reqwidth $w \
     369        0,0 $itk_component(view) -fill both -reqwidth $w \
    367370        1,0 $itk_component(legend) -fill x
    368371    blt::table configure $itk_component(plotarea) r1 -resize none
     
    511514    blt::table configure $itk_component(flowcontrols) r0 -pady 1
    512515    # Bindings for rotation via mouse
    513     bind $itk_component(3dview) <ButtonPress-1> \
     516    bind $itk_component(view) <ButtonPress-1> \
    514517        [itcl::code $this Rotate click %x %y]
    515     bind $itk_component(3dview) <B1-Motion> \
     518    bind $itk_component(view) <B1-Motion> \
    516519        [itcl::code $this Rotate drag %x %y]
    517     bind $itk_component(3dview) <ButtonRelease-1> \
     520    bind $itk_component(view) <ButtonRelease-1> \
    518521        [itcl::code $this Rotate release %x %y]
    519522
    520     bind $itk_component(3dview) <Configure> \
     523    bind $itk_component(view) <Configure> \
    521524        [itcl::code $this EventuallyResize %w %h]
    522525
    523526    # Bindings for panning via mouse
    524     bind $itk_component(3dview) <ButtonPress-2> \
     527    bind $itk_component(view) <ButtonPress-2> \
    525528        [itcl::code $this Pan click %x %y]
    526     bind $itk_component(3dview) <B2-Motion> \
     529    bind $itk_component(view) <B2-Motion> \
    527530        [itcl::code $this Pan drag %x %y]
    528     bind $itk_component(3dview) <ButtonRelease-2> \
     531    bind $itk_component(view) <ButtonRelease-2> \
    529532        [itcl::code $this Pan release %x %y]
    530533
    531534    # Bindings for panning via keyboard
    532     bind $itk_component(3dview) <KeyPress-Left> \
     535    bind $itk_component(view) <KeyPress-Left> \
    533536        [itcl::code $this Pan set -10 0]
    534     bind $itk_component(3dview) <KeyPress-Right> \
     537    bind $itk_component(view) <KeyPress-Right> \
    535538        [itcl::code $this Pan set 10 0]
    536     bind $itk_component(3dview) <KeyPress-Up> \
     539    bind $itk_component(view) <KeyPress-Up> \
    537540        [itcl::code $this Pan set 0 -10]
    538     bind $itk_component(3dview) <KeyPress-Down> \
     541    bind $itk_component(view) <KeyPress-Down> \
    539542        [itcl::code $this Pan set 0 10]
    540     bind $itk_component(3dview) <Shift-KeyPress-Left> \
     543    bind $itk_component(view) <Shift-KeyPress-Left> \
    541544        [itcl::code $this Pan set -2 0]
    542     bind $itk_component(3dview) <Shift-KeyPress-Right> \
     545    bind $itk_component(view) <Shift-KeyPress-Right> \
    543546        [itcl::code $this Pan set 2 0]
    544     bind $itk_component(3dview) <Shift-KeyPress-Up> \
     547    bind $itk_component(view) <Shift-KeyPress-Up> \
    545548        [itcl::code $this Pan set 0 -2]
    546     bind $itk_component(3dview) <Shift-KeyPress-Down> \
     549    bind $itk_component(view) <Shift-KeyPress-Down> \
    547550        [itcl::code $this Pan set 0 2]
    548551
    549552    # Bindings for zoom via keyboard
    550     bind $itk_component(3dview) <KeyPress-Prior> \
     553    bind $itk_component(view) <KeyPress-Prior> \
    551554        [itcl::code $this Zoom out]
    552     bind $itk_component(3dview) <KeyPress-Next> \
     555    bind $itk_component(view) <KeyPress-Next> \
    553556        [itcl::code $this Zoom in]
    554557
    555     bind $itk_component(3dview) <Enter> "focus $itk_component(3dview)"
     558    bind $itk_component(view) <Enter> "focus $itk_component(view)"
    556559
    557560    if {[string equal "x11" [tk windowingsystem]]} {
    558561        # Bindings for zoom via mouse
    559         bind $itk_component(3dview) <4> [itcl::code $this Zoom out]
    560         bind $itk_component(3dview) <5> [itcl::code $this Zoom in]
     562        bind $itk_component(view) <4> [itcl::code $this Zoom out]
     563        bind $itk_component(view) <5> [itcl::code $this Zoom in]
    561564    }
    562565
     
    565568    eval itk_initialize $args
    566569
    567     EnableWaitDialog 900
    568570    Connect
    569571}
     
    629631# ----------------------------------------------------------------------
    630632# USAGE: get ?-objects?
    631 # USAGE: get ?-image 3dview|legend?
     633# USAGE: get ?-image view|legend?
    632634#
    633635# Clients use this to query the list of objects being plotted, in
     
    659661        -image {
    660662            if {[llength $args] != 2} {
    661                 error "wrong # args: should be \"get -image 3dview|legend\""
     663                error "wrong # args: should be \"get -image view|legend\""
    662664            }
    663665            switch -- [lindex $args end] {
    664                 3dview {
     666                view {
    665667                    return $_image(plot)
    666668                }
     
    669671                }
    670672                default {
    671                     error "bad image name \"[lindex $args end]\": should be 3dview or legend"
     673                    error "bad image name \"[lindex $args end]\": should be view or legend"
    672674                }
    673675            }
     
    682684# USAGE: delete ?<dataobj1> <dataobj2> ...?
    683685#
    684 #       Clients use this to delete a dataobj from the plot.  If no dataobjs
    685 #       are specified, then all dataobjs are deleted.  No data objects are
    686 #       deleted.  They are only removed from the display list.
    687 #
     686# Clients use this to delete a dataobj from the plot.  If no dataobjs
     687# are specified, then all dataobjs are deleted.  No data objects are
     688# deleted.  They are only removed from the display list.
    688689# ----------------------------------------------------------------------
    689690itcl::body Rappture::FlowvisViewer::delete {args} {
     
    868869        }
    869870
    870         set w [winfo width $itk_component(3dview)]
    871         set h [winfo height $itk_component(3dview)]
     871        set w [winfo width $itk_component(view)]
     872        set h [winfo height $itk_component(view)]
    872873        EventuallyResize $w $h
    873874    }
     
    878879# isconnected --
    879880#
    880 #       Indicates if we are currently connected to the visualization server.
     881# Indicates if we are currently connected to the visualization server.
    881882#
    882883itcl::body Rappture::FlowvisViewer::isconnected {} {
     
    894895# Disconnect --
    895896#
    896 #       Clients use this method to disconnect from the current rendering
    897 #       server.
     897# Clients use this method to disconnect from the current rendering server.
    898898#
    899899itcl::body Rappture::FlowvisViewer::Disconnect {} {
     
    10251025# ReceiveLegend --
    10261026#
    1027 #       The procedure is the response from the render server to each "legend"
    1028 #       command.  The server sends back a "legend" command invoked our
    1029 #       the slave interpreter.  The purpose is to collect data of the image
    1030 #       representing the legend in the canvas.  In addition, the
    1031 #       active transfer function is displayed.
     1027# The procedure is the response from the render server to each "legend"
     1028# command.  The server sends back a "legend" command invoked our
     1029# the slave interpreter.  The purpose is to collect data of the image
     1030# representing the legend in the canvas.  In addition, the
     1031# active transfer function is displayed.
    10321032#
    10331033itcl::body Rappture::FlowvisViewer::ReceiveLegend { tag vmin vmax size } {
     
    10451045# ReceiveData --
    10461046#
    1047 #       The procedure is the response from the render server to each "data
    1048 #       follows" command.  The server sends back a "data" command invoked our
    1049 #       the slave interpreter.  The purpose was to collect the min/max of the
    1050 #       volume sent to the render server.  This is no longer needed since we
    1051 #       already know the limits.
     1047# The procedure is the response from the render server to each "data
     1048# follows" command.  The server sends back a "data" command invoked our
     1049# the slave interpreter.  The purpose was to collect the min/max of the
     1050# volume sent to the render server.  This is no longer needed since we
     1051# already know the limits.
    10521052#
    10531053itcl::body Rappture::FlowvisViewer::ReceiveData { args } {
     
    10711071# ----------------------------------------------------------------------
    10721072itcl::body Rappture::FlowvisViewer::Rebuild {} {
    1073     set w [winfo width $itk_component(3dview)]
    1074     set h [winfo height $itk_component(3dview)]
     1073    set w [winfo width $itk_component(view)]
     1074    set h [winfo height $itk_component(view)]
    10751075    if { $w < 2 || $h < 2 } {
    10761076        update
     
    11831183        PanCamera
    11841184        SendCmd "camera zoom $_view(-zoom)"
     1185        set _reset 0
    11851186    }
    11861187
     
    11971198    StopBufferingCommands
    11981199    blt::busy release $itk_component(hull)
    1199     set _reset 0
    12001200}
    12011201
     
    12951295    switch -- $option {
    12961296        click {
    1297             $itk_component(3dview) configure -cursor fleur
     1297            $itk_component(view) configure -cursor fleur
    12981298            set _click(x) $x
    12991299            set _click(y) $y
     
    13031303                Rotate click $x $y
    13041304            } else {
    1305                 set w [winfo width $itk_component(3dview)]
    1306                 set h [winfo height $itk_component(3dview)]
     1305                set w [winfo width $itk_component(view)]
     1306                set h [winfo height $itk_component(view)]
    13071307                if {$w <= 0 || $h <= 0} {
    13081308                    return
     
    13311331        release {
    13321332            Rotate drag $x $y
    1333             $itk_component(3dview) configure -cursor ""
     1333            $itk_component(view) configure -cursor ""
    13341334            catch {unset _click}
    13351335        }
     
    13501350itcl::body Rappture::FlowvisViewer::Pan {option x y} {
    13511351    # Experimental stuff
    1352     set w [winfo width $itk_component(3dview)]
    1353     set h [winfo height $itk_component(3dview)]
     1352    set w [winfo width $itk_component(view)]
     1353    set h [winfo height $itk_component(view)]
    13541354    if { $option == "set" } {
    13551355        set x [expr $x / double($w)]
     
    13651365        set _click(x) $x
    13661366        set _click(y) $y
    1367         $itk_component(3dview) configure -cursor hand1
     1367        $itk_component(view) configure -cursor hand1
    13681368    }
    13691369    if { $option == "drag" || $option == "release" } {
     
    13791379    }
    13801380    if { $option == "release" } {
    1381         $itk_component(3dview) configure -cursor ""
     1381        $itk_component(view) configure -cursor ""
    13821382    }
    13831383}
     
    14701470            if { $_settings($what) } {
    14711471                blt::table $itk_component(plotarea) \
    1472                     0,0 $itk_component(3dview) -fill both \
     1472                    0,0 $itk_component(view) -fill both \
    14731473                    1,0 $itk_component(legend) -fill x
    14741474                blt::table configure $itk_component(plotarea) r1 -resize none
     
    15911591# NameTransferFunction --
    15921592#
    1593 #       Creates a transfer function name based on the <style> settings in the
    1594 #       library run.xml file. This placeholder will be used later to create
    1595 #       and send the actual transfer function once the data info has been sent
    1596 #       to us by the render server. [We won't know the volume limits until the
    1597 #       server parses the 3D data and sends back the limits via ReceiveData.]
     1593# Creates a transfer function name based on the <style> settings in the
     1594# library run.xml file. This placeholder will be used later to create
     1595# and send the actual transfer function once the data info has been sent
     1596# to us by the render server. [We won't know the volume limits until the
     1597# server parses the 3D data and sends back the limits via ReceiveData.]
    15981598#
    15991599itcl::body Rappture::FlowvisViewer::NameTransferFunction { dataobj cname } {
     
    16161616# ComputeTransferFunction --
    16171617#
    1618 #       Computes and sends the transfer function to the render server.  It's
    1619 #       assumed that the volume data limits are known and that the global
    1620 #       transfer-functions slider values have been set up.  Both parts are
    1621 #       needed to compute the relative value (location) of the marker, and
    1622 #       the alpha map of the transfer function.
     1618# Computes and sends the transfer function to the render server.  It's
     1619# assumed that the volume data limits are known and that the global
     1620# transfer-functions slider values have been set up.  Both parts are
     1621# needed to compute the relative value (location) of the marker, and
     1622# the alpha map of the transfer function.
    16231623#
    16241624itcl::body Rappture::FlowvisViewer::ComputeTransferFunction { tf } {
     
    26032603        }
    26042604        "next" {
    2605             if { ![winfo viewable $itk_component(3dview)] } {
     2605            if { ![winfo viewable $itk_component(view)] } {
    26062606                flow stop
    26072607                return
     
    29182918# BuildVolumeComponents --
    29192919#
    2920 #    This is called from the "scale" method which is called when a new
    2921 #    dataset is added or deleted.  It repopulates the dropdown menu of
    2922 #    volume component names.  It sets the current component to the first
    2923 #    component in the list (of components found).  Finally, if there is
    2924 #    only one component, don't display the label or the combobox in the
    2925 #    volume settings tab.
     2920# This is called from the "scale" method which is called when a new
     2921# dataset is added or deleted.  It repopulates the dropdown menu of
     2922# volume component names.  It sets the current component to the first
     2923# component in the list (of components found).  Finally, if there is
     2924# only one component, don't display the label or the combobox in the
     2925# volume settings tab.
    29262926#
    29272927itcl::body Rappture::FlowvisViewer::BuildVolumeComponents {} {
     
    29372937# GetDatasetsWithComponents --
    29382938#
    2939 #    Returns a list of all the datasets (known by the combination of their
    2940 #    data object and component name) that match the given component name.
    2941 #    For example, this is used where we want to change the settings of
    2942 #    volumes that have the current component.
     2939# Returns a list of all the datasets (known by the combination of their
     2940# data object and component name) that match the given component name.
     2941# For example, this is used where we want to change the settings of
     2942# volumes that have the current component.
    29432943#
    29442944itcl::body Rappture::FlowvisViewer::GetDatasetsWithComponent { cname } {
  • trunk/gui/scripts/molvisviewer.tcl

    r5726 r5729  
    88# ======================================================================
    99#  AUTHOR:  Michael McLennan, Purdue University
    10 #  Copyright (c) 2004-2012  HUBzero Foundation, LLC
     10#  Copyright (c) 2004-2015  HUBzero Foundation, LLC
    1111#
    1212#  See the file "license.terms" for information on usage and
     
    230230    }]
    231231
    232     itk_component add 3dview {
     232    itk_component add view {
    233233        label $itk_component(plotarea).view -image $_image(plot) \
    234234            -highlightthickness 0 -borderwidth 0
     
    237237        ignore -highlightthickness -borderwidth  -background
    238238    }
    239     bind $itk_component(3dview) <Control-F1> [itcl::code $this ToggleConsole]
     239    bind $itk_component(view) <Control-F1> [itcl::code $this ToggleConsole]
    240240
    241241    set f [$itk_component(main) component controls]
     
    312312    BuildSettingsTab
    313313
    314     # HACK ALERT. Initially force a requested width of the 3dview label.
    315 
    316     # It's a chicken-and-the-egg problem.  The size of the 3dview label is set
     314    # HACK ALERT. Initially force a requested width of the view label.
     315
     316    # It's a chicken-and-the-egg problem.  The size of the view label is set
    317317    # from the size of the image retrieved from the server.  But the size of
    318318    # the image is specified by the viewport which is the size of the label.
     
    324324    # (that's why we're using the blt::table to manage the geometry).  It has
    325325    # to be big, because we don't know how big the user may want to stretch
    326     # the window.  This at least forces the sidebarframe to give the 3dview
     326    # the window.  This at least forces the sidebarframe to give the view
    327327    # the maximum size available, which is perfect for an initially closed
    328328    # sidebar.
    329329
    330330    blt::table $itk_component(plotarea) \
    331         0,0 $itk_component(3dview) -fill both -reqwidth 10000
     331        0,0 $itk_component(view) -fill both -reqwidth 10000
    332332    #
    333333    # RENDERING AREA
     
    338338    if { $_useVmouseEvents } {
    339339        # set up bindings to bridge mouse events to server
    340         bind $itk_component(3dview) <ButtonPress> \
     340        bind $itk_component(view) <ButtonPress> \
    341341            [itcl::code $this Vmouse click %b %s %x %y]
    342         bind $itk_component(3dview) <ButtonRelease> \
     342        bind $itk_component(view) <ButtonRelease> \
    343343            [itcl::code $this Vmouse release %b %s %x %y]
    344         bind $itk_component(3dview) <B1-Motion> \
     344        bind $itk_component(view) <B1-Motion> \
    345345            [itcl::code $this Vmouse drag 1 %s %x %y]
    346         bind $itk_component(3dview) <B2-Motion> \
     346        bind $itk_component(view) <B2-Motion> \
    347347            [itcl::code $this Vmouse drag 2 %s %x %y]
    348         bind $itk_component(3dview) <B3-Motion> \
     348        bind $itk_component(view) <B3-Motion> \
    349349            [itcl::code $this Vmouse drag 3 %s %x %y]
    350         bind $itk_component(3dview) <Motion> \
     350        bind $itk_component(view) <Motion> \
    351351            [itcl::code $this Vmouse move 0 %s %x %y]
    352352    } else {
    353353        # set up bindings for rotation with mouse
    354         bind $itk_component(3dview) <ButtonPress-1> \
     354        bind $itk_component(view) <ButtonPress-1> \
    355355            [itcl::code $this Rotate click %x %y]
    356         bind $itk_component(3dview) <B1-Motion> \
     356        bind $itk_component(view) <B1-Motion> \
    357357            [itcl::code $this Rotate drag %x %y]
    358         bind $itk_component(3dview) <ButtonRelease-1> \
     358        bind $itk_component(view) <ButtonRelease-1> \
    359359            [itcl::code $this Rotate release %x %y]
    360360
    361361        # set up bindings for panning with mouse
    362         bind $itk_component(3dview) <ButtonPress-2> \
     362        bind $itk_component(view) <ButtonPress-2> \
    363363            [itcl::code $this Pan click %x %y]
    364         bind $itk_component(3dview) <B2-Motion> \
     364        bind $itk_component(view) <B2-Motion> \
    365365            [itcl::code $this Pan drag %x %y]
    366         bind $itk_component(3dview) <ButtonRelease-2> \
     366        bind $itk_component(view) <ButtonRelease-2> \
    367367            [itcl::code $this Pan release %x %y]
    368368
    369369        # scroll wheel zoom
    370370        if {[string equal "x11" [tk windowingsystem]]} {
    371             bind $itk_component(3dview) <4> [itcl::code $this Zoom out 2]
    372             bind $itk_component(3dview) <5> [itcl::code $this Zoom in 2]
     371            bind $itk_component(view) <4> [itcl::code $this Zoom out 2]
     372            bind $itk_component(view) <5> [itcl::code $this Zoom in 2]
    373373        }
    374374    }
    375375
    376376    # Set up bindings for panning with keyboard
    377     bind $itk_component(3dview) <KeyPress-Left> \
     377    bind $itk_component(view) <KeyPress-Left> \
    378378        [itcl::code $this Pan set -10 0]
    379     bind $itk_component(3dview) <KeyPress-Right> \
     379    bind $itk_component(view) <KeyPress-Right> \
    380380        [itcl::code $this Pan set 10 0]
    381     bind $itk_component(3dview) <KeyPress-Up> \
     381    bind $itk_component(view) <KeyPress-Up> \
    382382        [itcl::code $this Pan set 0 -10]
    383     bind $itk_component(3dview) <KeyPress-Down> \
     383    bind $itk_component(view) <KeyPress-Down> \
    384384        [itcl::code $this Pan set 0 10]
    385     bind $itk_component(3dview) <Shift-KeyPress-Left> \
     385    bind $itk_component(view) <Shift-KeyPress-Left> \
    386386        [itcl::code $this Pan set -50 0]
    387     bind $itk_component(3dview) <Shift-KeyPress-Right> \
     387    bind $itk_component(view) <Shift-KeyPress-Right> \
    388388        [itcl::code $this Pan set 50 0]
    389     bind $itk_component(3dview) <Shift-KeyPress-Up> \
     389    bind $itk_component(view) <Shift-KeyPress-Up> \
    390390        [itcl::code $this Pan set 0 -50]
    391     bind $itk_component(3dview) <Shift-KeyPress-Down> \
     391    bind $itk_component(view) <Shift-KeyPress-Down> \
    392392        [itcl::code $this Pan set 0 50]
    393393
    394394    # Set up bindings for zoom with keyboard
    395     bind $itk_component(3dview) <KeyPress-Prior> \
     395    bind $itk_component(view) <KeyPress-Prior> \
    396396        [itcl::code $this Zoom out 2]
    397     bind $itk_component(3dview) <KeyPress-Next> \
     397    bind $itk_component(view) <KeyPress-Next> \
    398398        [itcl::code $this Zoom in 2]
    399399
    400     bind $itk_component(3dview) <Enter> "focus $itk_component(3dview)"
    401 
    402     bind $itk_component(3dview) <Configure> \
     400    bind $itk_component(view) <Enter> "focus $itk_component(view)"
     401
     402    bind $itk_component(view) <Configure> \
    403403        [itcl::code $this EventuallyResize %w %h]
    404     bind $itk_component(3dview) <Unmap> \
     404    bind $itk_component(view) <Unmap> \
    405405        [itcl::code $this Unmap]
    406     bind $itk_component(3dview) <Map> \
     406    bind $itk_component(view) <Map> \
    407407        [itcl::code $this Map]
    408408
     
    11061106        # Set or restore viewing parameters.  We do this for the first
    11071107        # model and assume this works for everything else.
    1108         set w  [winfo width $itk_component(3dview)]
    1109         set h  [winfo height $itk_component(3dview)]
     1108        set w  [winfo width $itk_component(view)]
     1109        set h  [winfo height $itk_component(view)]
    11101110        SendCmd "reset"
    11111111        SendCmd "screen $w $h"
     
    12401240    }
    12411241    if { $option == "click" } {
    1242         $itk_component(3dview) configure -cursor hand1
     1242        $itk_component(view) configure -cursor hand1
    12431243    }
    12441244    if { $option == "drag" || $option == "release" } {
     
    12531253    set _mevent(y) $y
    12541254    if { $option == "release" } {
    1255         $itk_component(3dview) configure -cursor ""
     1255        $itk_component(view) configure -cursor ""
    12561256    }
    12571257}
     
    13071307        unset _rocker(afterid)
    13081308    }
    1309     if { ![winfo viewable $itk_component(3dview)] } {
     1309    if { ![winfo viewable $itk_component(view)] } {
    13101310        return
    13111311    }
     
    13791379    }
    13801380    if { $option == "click" } {
    1381         $itk_component(3dview) configure -cursor fleur
     1381        $itk_component(view) configure -cursor fleur
    13821382    }
    13831383    if { $option == "drag" || $option == "release" } {
     
    13881388            return
    13891389        }
    1390         set w [winfo width $itk_component(3dview)]
    1391         set h [winfo height $itk_component(3dview)]
     1390        set w [winfo width $itk_component(view)]
     1391        set h [winfo height $itk_component(view)]
    13921392        if {$w <= 0 || $h <= 0} {
    13931393            return
     
    14301430    set _mevent(time) $now
    14311431    if { $option == "release" } {
    1432         $itk_component(3dview) configure -cursor ""
     1432        $itk_component(view) configure -cursor ""
    14331433    }
    14341434}
     
    14521452    switch -- $option {
    14531453        click {
    1454             $itk_component(3dview) configure -cursor fleur
     1454            $itk_component(view) configure -cursor fleur
    14551455            set _click(x) $x
    14561456            set _click(y) $y
     
    14621462                Rotate.old click $x $y
    14631463            } else {
    1464                 set w [winfo width $itk_component(3dview)]
    1465                 set h [winfo height $itk_component(3dview)]
     1464                set w [winfo width $itk_component(view)]
     1465                set h [winfo height $itk_component(view)]
    14661466                if {$w <= 0 || $h <= 0} {
    14671467                    return
     
    15281528        release {
    15291529            Rotate.old drag $x $y
    1530             $itk_component(3dview) configure -cursor ""
     1530            $itk_component(view) configure -cursor ""
    15311531            catch {unset _click}
    15321532        }
  • trunk/gui/scripts/nanovisviewer.tcl

    r5645 r5729  
    88# ======================================================================
    99#  AUTHOR:  Michael McLennan, Purdue University
    10 #  Copyright (c) 2004-2012  HUBzero Foundation, LLC
     10#  Copyright (c) 2004-2015  HUBzero Foundation, LLC
    1111#
    1212#  See the file "license.terms" for information on usage and
     
    158158    set _serverType "nanovis"
    159159
    160     # Draw legend event
     160    #DebugOn
     161    EnableWaitDialog 900
     162
     163    # Rebuild event
     164    $_dispatcher register !rebuild
     165    $_dispatcher dispatch $this !rebuild "[itcl::code $this Rebuild]; list"
     166
     167    # Resize event
     168    $_dispatcher register !resize
     169    $_dispatcher dispatch $this !resize "[itcl::code $this DoResize]; list"
     170
     171    # Legend event
    161172    $_dispatcher register !legend
    162173    $_dispatcher dispatch $this !legend "[itcl::code $this FixLegend]; list"
     
    166177    $_dispatcher dispatch $this !send_transfunc \
    167178        "[itcl::code $this SendTransferFunctions]; list"
    168 
    169     # Rebuild event
    170     $_dispatcher register !rebuild
    171     $_dispatcher dispatch $this !rebuild "[itcl::code $this Rebuild]; list"
    172 
    173     # Resize event
    174     $_dispatcher register !resize
    175     $_dispatcher dispatch $this !resize "[itcl::code $this DoResize]; list"
    176179
    177180    #
     
    184187    # Initialize the view to some default parameters.
    185188    array set _view {
    186         -qw      0.853553
    187         -qx      -0.353553
    188         -qy      0.353553
    189         -qz      0.146447
    190         -xpan    0
    191         -ypan    0
    192         -zoom    1.0
     189        -qw       0.853553
     190        -qx       -0.353553
     191        -qy       0.353553
     192        -qz       0.146447
     193        -xpan     0
     194        -ypan     0
     195        -zoom     1.0
    193196    }
    194197    set _arcball [blt::arcball create 100 100]
    195198    $_arcball quaternion [ViewToQuaternion]
    196 
    197     set _reset 1
    198199
    199200    array set _settings [subst {
     
    230231    }]
    231232
    232     itk_component add 3dview {
     233    itk_component add view {
    233234        label $itk_component(plotarea).view -image $_image(plot) \
    234235            -highlightthickness 0 -borderwidth 0
     
    237238        ignore -highlightthickness -borderwidth  -background
    238239    }
    239     bind $itk_component(3dview) <Control-F1> [itcl::code $this ToggleConsole]
     240    bind $itk_component(view) <Control-F1> [itcl::code $this ToggleConsole]
    240241
    241242    set f [$itk_component(main) component controls]
     
    281282            -onimage [Rappture::icon volume-on] \
    282283            -offimage [Rappture::icon volume-off] \
    283             -command [itcl::code $this AdjustSetting -volume] \
    284             -variable [itcl::scope _settings(-volume)]
     284            -variable [itcl::scope _settings(-volume)] \
     285            -command [itcl::code $this AdjustSetting -volume]
    285286    }
    286287    $itk_component(volume) select
     
    330331    # the server.  So the panewindow uses the tiny size.
    331332    set w 10000
    332     pack forget $itk_component(3dview)
     333    pack forget $itk_component(view)
    333334    blt::table $itk_component(plotarea) \
    334         0,0 $itk_component(3dview) -fill both -reqwidth $w \
     335        0,0 $itk_component(view) -fill both -reqwidth $w \
    335336        1,0 $itk_component(legend) -fill x
    336337    blt::table configure $itk_component(plotarea) r1 -resize none
    337338
    338339    # Bindings for rotation via mouse
    339     bind $itk_component(3dview) <ButtonPress-1> \
     340    bind $itk_component(view) <ButtonPress-1> \
    340341        [itcl::code $this Rotate click %x %y]
    341     bind $itk_component(3dview) <B1-Motion> \
     342    bind $itk_component(view) <B1-Motion> \
    342343        [itcl::code $this Rotate drag %x %y]
    343     bind $itk_component(3dview) <ButtonRelease-1> \
     344    bind $itk_component(view) <ButtonRelease-1> \
    344345        [itcl::code $this Rotate release %x %y]
    345346
    346     bind $itk_component(3dview) <Configure> \
     347    bind $itk_component(view) <Configure> \
    347348        [itcl::code $this EventuallyResize %w %h]
    348349
    349350    # Bindings for panning via mouse
    350     bind $itk_component(3dview) <ButtonPress-2> \
     351    bind $itk_component(view) <ButtonPress-2> \
    351352        [itcl::code $this Pan click %x %y]
    352     bind $itk_component(3dview) <B2-Motion> \
     353    bind $itk_component(view) <B2-Motion> \
    353354        [itcl::code $this Pan drag %x %y]
    354     bind $itk_component(3dview) <ButtonRelease-2> \
     355    bind $itk_component(view) <ButtonRelease-2> \
    355356        [itcl::code $this Pan release %x %y]
    356357
    357358    # Bindings for panning via keyboard
    358     bind $itk_component(3dview) <KeyPress-Left> \
     359    bind $itk_component(view) <KeyPress-Left> \
    359360        [itcl::code $this Pan set -10 0]
    360     bind $itk_component(3dview) <KeyPress-Right> \
     361    bind $itk_component(view) <KeyPress-Right> \
    361362        [itcl::code $this Pan set 10 0]
    362     bind $itk_component(3dview) <KeyPress-Up> \
     363    bind $itk_component(view) <KeyPress-Up> \
    363364        [itcl::code $this Pan set 0 -10]
    364     bind $itk_component(3dview) <KeyPress-Down> \
     365    bind $itk_component(view) <KeyPress-Down> \
    365366        [itcl::code $this Pan set 0 10]
    366     bind $itk_component(3dview) <Shift-KeyPress-Left> \
     367    bind $itk_component(view) <Shift-KeyPress-Left> \
    367368        [itcl::code $this Pan set -2 0]
    368     bind $itk_component(3dview) <Shift-KeyPress-Right> \
     369    bind $itk_component(view) <Shift-KeyPress-Right> \
    369370        [itcl::code $this Pan set 2 0]
    370     bind $itk_component(3dview) <Shift-KeyPress-Up> \
     371    bind $itk_component(view) <Shift-KeyPress-Up> \
    371372        [itcl::code $this Pan set 0 -2]
    372     bind $itk_component(3dview) <Shift-KeyPress-Down> \
     373    bind $itk_component(view) <Shift-KeyPress-Down> \
    373374        [itcl::code $this Pan set 0 2]
    374375
    375376    # Bindings for zoom via keyboard
    376     bind $itk_component(3dview) <KeyPress-Prior> \
     377    bind $itk_component(view) <KeyPress-Prior> \
    377378        [itcl::code $this Zoom out]
    378     bind $itk_component(3dview) <KeyPress-Next> \
     379    bind $itk_component(view) <KeyPress-Next> \
    379380        [itcl::code $this Zoom in]
    380381
    381     bind $itk_component(3dview) <Enter> "focus $itk_component(3dview)"
     382    bind $itk_component(view) <Enter> "focus $itk_component(view)"
    382383
    383384    if {[string equal "x11" [tk windowingsystem]]} {
    384385        # Bindings for zoom via mouse
    385         bind $itk_component(3dview) <4> [itcl::code $this Zoom out]
    386         bind $itk_component(3dview) <5> [itcl::code $this Zoom in]
     386        bind $itk_component(view) <4> [itcl::code $this Zoom out]
     387        bind $itk_component(view) <5> [itcl::code $this Zoom in]
    387388    }
    388389
     
    390391
    391392    eval itk_initialize $args
    392 
    393     EnableWaitDialog 900
    394393    Connect
    395394}
     
    450449# ----------------------------------------------------------------------
    451450# USAGE: get ?-objects?
    452 # USAGE: get ?-image 3dview|legend?
     451# USAGE: get ?-image view|legend?
    453452#
    454453# Clients use this to query the list of objects being plotted, in
     
    480479        -image {
    481480            if {[llength $args] != 2} {
    482                 error "wrong # args: should be \"get -image 3dview|legend\""
     481                error "wrong # args: should be \"get -image view|legend\""
    483482            }
    484483            switch -- [lindex $args end] {
    485                 3dview {
     484                view {
    486485                    return $_image(plot)
    487486                }
     
    490489                }
    491490                default {
    492                     error "bad image name \"[lindex $args end]\": should be 3dview or legend"
     491                    error "bad image name \"[lindex $args end]\": should be view or legend"
    493492                }
    494493            }
     
    503502# USAGE: delete ?<dataobj1> <dataobj2> ...?
    504503#
    505 #       Clients use this to delete a dataobj from the plot.  If no dataobjs
    506 #       are specified, then all dataobjs are deleted.  No data objects are
    507 #       deleted.  They are only removed from the display list.
    508 #
     504# Clients use this to delete a dataobj from the plot.  If no dataobjs
     505# are specified, then all dataobjs are deleted.  No data objects are
     506# deleted.  They are only removed from the display list.
    509507# ----------------------------------------------------------------------
    510508itcl::body Rappture::NanovisViewer::delete {args} {
     
    682680        }
    683681
    684         set w [winfo width $itk_component(3dview)]
    685         set h [winfo height $itk_component(3dview)]
     682        set w [winfo width $itk_component(view)]
     683        set h [winfo height $itk_component(view)]
    686684        EventuallyResize $w $h
    687685    }
     
    692690# isconnected --
    693691#
    694 #       Indicates if we are currently connected to the visualization server.
     692# Indicates if we are currently connected to the visualization server.
    695693#
    696694itcl::body Rappture::NanovisViewer::isconnected {} {
     
    708706# Disconnect --
    709707#
    710 #       Clients use this method to disconnect from the current rendering
    711 #       server.
     708# Clients use this method to disconnect from the current rendering server.
    712709#
    713710itcl::body Rappture::NanovisViewer::Disconnect {} {
     
    809806# ReceiveLegend --
    810807#
    811 #       The procedure is the response from the render server to each "legend"
    812 #       command.  The server sends back a "legend" command invoked our
    813 #       the slave interpreter.  The purpose is to collect data of the image
    814 #       representing the legend in the canvas.  In addition, the
    815 #       active transfer function is displayed.
     808# The procedure is the response from the render server to each "legend"
     809# command.  The server sends back a "legend" command invoked our
     810# the slave interpreter.  The purpose is to collect data of the image
     811# representing the legend in the canvas.  In addition, the
     812# active transfer function is displayed.
    816813#
    817814itcl::body Rappture::NanovisViewer::ReceiveLegend { cname vmin vmax size } {
     
    829826# ReceiveData --
    830827#
    831 #       The procedure is the response from the render server to each "data
    832 #       follows" command.  The server sends back a "data" command invoked our
    833 #       the slave interpreter.  The purpose was to collect the min/max of the
    834 #       volume sent to the render server.  This is no longer needed since we
    835 #       already know the limits.
     828# The procedure is the response from the render server to each "data
     829# follows" command.  The server sends back a "data" command invoked our
     830# the slave interpreter.  The purpose was to collect the min/max of the
     831# volume sent to the render server.  This is no longer needed since we
     832# already know the limits.
    836833#
    837834itcl::body Rappture::NanovisViewer::ReceiveData { args } {
     
    855852# ----------------------------------------------------------------------
    856853itcl::body Rappture::NanovisViewer::Rebuild {} {
    857     set w [winfo width $itk_component(3dview)]
    858     set h [winfo height $itk_component(3dview)]
     854    set w [winfo width $itk_component(view)]
     855    set h [winfo height $itk_component(view)]
    859856    if { $w < 2 || $h < 2 } {
    860857        update
     
    961958        PanCamera
    962959        SendCmd "camera zoom $_view(-zoom)"
     960        set _reset 0
    963961    }
    964962
     
    973971    StopBufferingCommands
    974972    blt::busy release $itk_component(hull)
    975     set _reset 0
    976973}
    977974
     
    10711068    switch -- $option {
    10721069        click {
    1073             $itk_component(3dview) configure -cursor fleur
     1070            $itk_component(view) configure -cursor fleur
    10741071            set _click(x) $x
    10751072            set _click(y) $y
     
    10791076                Rotate click $x $y
    10801077            } else {
    1081                 set w [winfo width $itk_component(3dview)]
    1082                 set h [winfo height $itk_component(3dview)]
     1078                set w [winfo width $itk_component(view)]
     1079                set h [winfo height $itk_component(view)]
    10831080                if {$w <= 0 || $h <= 0} {
    10841081                    return
     
    11071104        release {
    11081105            Rotate drag $x $y
    1109             $itk_component(3dview) configure -cursor ""
     1106            $itk_component(view) configure -cursor ""
    11101107            catch {unset _click}
    11111108        }
     
    11261123itcl::body Rappture::NanovisViewer::Pan {option x y} {
    11271124    # Experimental stuff
    1128     set w [winfo width $itk_component(3dview)]
    1129     set h [winfo height $itk_component(3dview)]
     1125    set w [winfo width $itk_component(view)]
     1126    set h [winfo height $itk_component(view)]
    11301127    if { $option == "set" } {
    11311128        set x [expr $x / double($w)]
     
    11411138        set _click(x) $x
    11421139        set _click(y) $y
    1143         $itk_component(3dview) configure -cursor hand1
     1140        $itk_component(view) configure -cursor hand1
    11441141    }
    11451142    if { $option == "drag" || $option == "release" } {
     
    11551152    }
    11561153    if { $option == "release" } {
    1157         $itk_component(3dview) configure -cursor ""
     1154        $itk_component(view) configure -cursor ""
    11581155    }
    11591156}
     
    12481245            if { $_settings($what) } {
    12491246                blt::table $itk_component(plotarea) \
    1250                     0,0 $itk_component(3dview) -fill both \
     1247                    0,0 $itk_component(view) -fill both \
    12511248                    1,0 $itk_component(legend) -fill x
    12521249                blt::table configure $itk_component(plotarea) r1 -resize none
     
    13681365# NameTransferFunction --
    13691366#
    1370 #       Creates a transfer function name based on the <style> settings in the
    1371 #       library run.xml file. This placeholder will be used later to create
    1372 #       and send the actual transfer function once the data info has been sent
    1373 #       to us by the render server. [We won't know the volume limits until the
    1374 #       server parses the 3D data and sends back the limits via ReceiveData.]
     1367# Creates a transfer function name based on the <style> settings in the
     1368# library run.xml file. This placeholder will be used later to create
     1369# and send the actual transfer function once the data info has been sent
     1370# to us by the render server. [We won't know the volume limits until the
     1371# server parses the 3D data and sends back the limits via ReceiveData.]
    13751372#
    13761373itcl::body Rappture::NanovisViewer::NameTransferFunction { dataobj cname } {
     
    14031400# ComputeTransferFunction --
    14041401#
    1405 #       Computes and sends the transfer function to the render server.  It's
    1406 #       assumed that the volume data limits are known and that the global
    1407 #       transfer-functions slider values have been set up.  Both parts are
    1408 #       needed to compute the relative value (location) of the marker, and
    1409 #       the alpha map of the transfer function.
     1402# Computes and sends the transfer function to the render server.  It's
     1403# assumed that the volume data limits are known and that the global
     1404# transfer-functions slider values have been set up.  Both parts are
     1405# needed to compute the relative value (location) of the marker, and
     1406# the alpha map of the transfer function.
    14101407#
    14111408itcl::body Rappture::NanovisViewer::ComputeTransferFunction { cname } {
     
    20892086# InitComponentSettings --
    20902087#
    2091 #    Initializes the volume settings for a specific component. This should
    2092 #    match what's used as global settings above. This is called the first
    2093 #    time we try to switch to a given component in SwitchComponent below.
     2088# Initializes the volume settings for a specific component. This should
     2089# match what's used as global settings above. This is called the first
     2090# time we try to switch to a given component in SwitchComponent below.
    20942091#
    20952092itcl::body Rappture::NanovisViewer::InitComponentSettings { cname } {
     
    21122109# SwitchComponent --
    21132110#
    2114 #    This is called when the current component is changed by the dropdown
    2115 #    menu in the volume tab.  It synchronizes the global volume settings
    2116 #    with the settings of the new current component.
     2111# This is called when the current component is changed by the dropdown
     2112# menu in the volume tab.  It synchronizes the global volume settings
     2113# with the settings of the new current component.
    21172114#
    21182115itcl::body Rappture::NanovisViewer::SwitchComponent { cname } {
     
    21372134# BuildVolumeComponents --
    21382135#
    2139 #    This is called from the "scale" method which is called when a new
    2140 #    dataset is added or deleted.  It repopulates the dropdown menu of
    2141 #    volume component names.  It sets the current component to the first
    2142 #    component in the list (of components found).  Finally, if there is
    2143 #    only one component, don't display the label or the combobox in the
    2144 #    volume settings tab.
     2136# This is called from the "scale" method which is called when a new
     2137# dataset is added or deleted.  It repopulates the dropdown menu of
     2138# volume component names.  It sets the current component to the first
     2139# component in the list (of components found).  Finally, if there is
     2140# only one component, don't display the label or the combobox in the
     2141# volume settings tab.
    21452142#
    21462143itcl::body Rappture::NanovisViewer::BuildVolumeComponents {} {
     
    21682165# GetDatasetsWithComponents --
    21692166#
    2170 #    Returns a list of all the datasets (known by the combination of their
    2171 #    data object and component name) that match the given component name.
    2172 #    For example, this is used where we want to change the settings of
    2173 #    volumes that have the current component.
     2167# Returns a list of all the datasets (known by the combination of their
     2168# data object and component name) that match the given component name.
     2169# For example, this is used where we want to change the settings of
     2170# volumes that have the current component.
    21742171#
    21752172itcl::body Rappture::NanovisViewer::GetDatasetsWithComponent { cname } {
     
    21902187# HideAllMarkers --
    21912188#
    2192 #    Hide all the markers in all the transfer functions.  Can't simply
    2193 #    delete and recreate markers from the <style> since the user may have
    2194 #    created, deleted, or moved markers.
     2189# Hide all the markers in all the transfer functions.  Can't simply
     2190# delete and recreate markers from the <style> since the user may have
     2191# created, deleted, or moved markers.
    21952192#
    21962193itcl::body Rappture::NanovisViewer::HideAllMarkers {} {
  • trunk/gui/scripts/vtkvolumeviewer.tcl

    r5727 r5729  
    568568# USAGE: delete ?<dataobj1> <dataobj2> ...?
    569569#
    570 #       Clients use this to delete a dataobj from the plot.  If no dataobjs
    571 #       are specified, then all dataobjs are deleted.  No data objects are
    572 #       deleted.  They are only removed from the display list.
    573 #
     570# Clients use this to delete a dataobj from the plot.  If no dataobjs
     571# are specified, then all dataobjs are deleted.  No data objects are
     572# deleted.  They are only removed from the display list.
    574573# ----------------------------------------------------------------------
    575574itcl::body Rappture::VtkVolumeViewer::delete {args} {
     
    853852# isconnected --
    854853#
    855 #       Indicates if we are currently connected to the visualization server.
     854# Indicates if we are currently connected to the visualization server.
    856855#
    857856itcl::body Rappture::VtkVolumeViewer::isconnected {} {
     
    870869# Disconnect --
    871870#
    872 #       Clients use this method to disconnect from the current rendering
    873 #       server.
     871# Clients use this method to disconnect from the current rendering server.
    874872#
    875873itcl::body Rappture::VtkVolumeViewer::Disconnect {} {
     
    13591357# AdjustSetting --
    13601358#
    1361 #       Changes/updates a specific setting in the widget.  There are
    1362 #       usually user-setable option.  Commands are sent to the render
    1363 #       server.
     1359# Changes/updates a specific setting in the widget.  There are
     1360# usually user-setable option.  Commands are sent to the render
     1361# server.
    13641362#
    13651363itcl::body Rappture::VtkVolumeViewer::AdjustSetting {what {value ""}} {
     
    16111609# RequestLegend --
    16121610#
    1613 #       Request a new legend from the server.  The size of the legend
    1614 #       is determined from the height of the canvas.
     1611# Request a new legend from the server.  The size of the legend
     1612# is determined from the height of the canvas.
    16151613#
    16161614itcl::body Rappture::VtkVolumeViewer::RequestLegend {} {
     
    25372535# SetInitialTransferFunction --
    25382536#
    2539 #       Creates a transfer function name based on the <style> settings in the
    2540 #       library run.xml file. This placeholder will be used later to create
    2541 #       and send the actual transfer function once the data info has been sent
    2542 #       to us by the render server. [We won't know the volume limits until the
    2543 #       server parses the 3D data and sends back the limits via ReceiveData.]
     2537# Creates a transfer function name based on the <style> settings in the
     2538# library run.xml file. This placeholder will be used later to create
     2539# and send the actual transfer function once the data info has been sent
     2540# to us by the render server. [We won't know the volume limits until the
     2541# server parses the 3D data and sends back the limits via ReceiveData.]
    25442542#
    25452543itcl::body Rappture::VtkVolumeViewer::SetInitialTransferFunction { dataobj cname } {
     
    25562554# ComputeTransferFunction --
    25572555#
    2558 #       Computes and sends the transfer function to the render server.  It's
    2559 #       assumed that the volume data limits are known and that the global
    2560 #       transfer-functions slider values have been set up.  Both parts are
    2561 #       needed to compute the relative value (location) of the marker, and
    2562 #       the alpha map of the transfer function.
     2556# Computes and sends the transfer function to the render server.  It's
     2557# assumed that the volume data limits are known and that the global
     2558# transfer-functions slider values have been set up.  Both parts are
     2559# needed to compute the relative value (location) of the marker, and
     2560# the alpha map of the transfer function.
    25632561#
    25642562itcl::body Rappture::VtkVolumeViewer::ComputeTransferFunction { cname } {
     
    26282626# ResetColormap --
    26292627#
    2630 #       Changes only the colormap portion of the transfer function.
     2628# Changes only the colormap portion of the transfer function.
    26312629#
    26322630itcl::body Rappture::VtkVolumeViewer::ResetColormap { cname color } {
     
    26472645# USAGE: updateTransferFunctions
    26482646#
    2649 #       This is called by the transfer function editor whenever the
    2650 #       transfer function definition changes.
    2651 #
     2647# This is called by the transfer function editor whenever the
     2648# transfer function definition changes.
    26522649# ----------------------------------------------------------------------
    26532650itcl::body Rappture::VtkVolumeViewer::updateTransferFunctions {} {
     
    26982695# InitComponentSettings --
    26992696#
    2700 #       Initializes the volume settings for a specific component. This
    2701 #       should match what's used as global settings above. This
    2702 #       is called the first time we try to switch to a given component
    2703 #       in SwitchComponent below.
     2697# Initializes the volume settings for a specific component. This
     2698# should match what's used as global settings above. This
     2699# is called the first time we try to switch to a given component
     2700# in SwitchComponent below.
    27042701#
    27052702itcl::body Rappture::VtkVolumeViewer::InitComponentSettings { cname } {
     
    27242721# SwitchComponent --
    27252722#
    2726 #       This is called when the current component is changed by the
    2727 #       dropdown menu in the volume tab.  It synchronizes the global
    2728 #       volume settings with the settings of the new current component.
     2723# This is called when the current component is changed by the
     2724# dropdown menu in the volume tab.  It synchronizes the global
     2725# volume settings with the settings of the new current component.
    27292726#
    27302727itcl::body Rappture::VtkVolumeViewer::SwitchComponent { cname } {
     
    28212818# HideAllMarkers --
    28222819#
    2823 #       Hide all the markers in all the transfer functions.  Can't simply
    2824 #       delete and recreate markers from the <style> since the user may
    2825 #       have create, deleted, or moved markers.
     2820# Hide all the markers in all the transfer functions.  Can't simply
     2821# delete and recreate markers from the <style> since the user may
     2822# have create, deleted, or moved markers.
    28262823#
    28272824itcl::body Rappture::VtkVolumeViewer::HideAllMarkers {} {
     
    28342831# GetDatasetsWithComponent --
    28352832#
    2836 #       Returns a list of all the datasets (known by the combination of
    2837 #       their data object and component name) that match the given
    2838 #       component name.  For example, this is used where we want to change
    2839 #       the settings of volumes that have the current component.
     2833# Returns a list of all the datasets (known by the combination of
     2834# their data object and component name) that match the given
     2835# component name.  For example, this is used where we want to change
     2836# the settings of volumes that have the current component.
    28402837#
    28412838itcl::body Rappture::VtkVolumeViewer::GetDatasetsWithComponent { cname } {
     
    28492846# BuildVolumeComponents --
    28502847#
    2851 #       This is called from the "scale" method which is called when a
    2852 #       new dataset is added or deleted.  It repopulates the dropdown
    2853 #       menu of volume component names.  It sets the current component
    2854 #       to the first component in the list (of components found).
    2855 #       Finally, if there is only one component, don't display the
    2856 #       label or the combobox in the volume settings tab.
     2848# This is called from the "scale" method which is called when a
     2849# new dataset is added or deleted.  It repopulates the dropdown
     2850# menu of volume component names.  It sets the current component
     2851# to the first component in the list (of components found).
     2852# Finally, if there is only one component, don't display the
     2853# label or the combobox in the volume settings tab.
    28572854#
    28582855itcl::body Rappture::VtkVolumeViewer::BuildVolumeComponents {} {
Note: See TracChangeset for help on using the changeset viewer.