Changeset 512 for trunk


Ignore:
Timestamp:
08/17/10 16:31:51 (21 months ago)
Author:
ddangelo
Message:

Added 3 default parameters to the Monitor constructor.
1)A bool indicating if a window should be generated by default. This may not be useful in subclass. Default is set to: True
2)The initial window transformation. Is only used if a default window is created. Default is: (0, 1.7, -0.6)
3)The initial user transformation. Is always used. Default is: (0, 1.7, 0)

Location:
trunk/avango-display
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/avango-display/SConscript

    r448 r512  
    3737    """) 
    3838av_display_setups_files = Split(""" 
     39    python/avango/display/setups/__init__.py 
    3940    python/avango/display/setups/AutoStereoDisplay.py 
    4041    python/avango/display/setups/FakeTwoView.py 
    4142    python/avango/display/setups/iCone.py 
    42     python/avango/display/setups/Monitor.py 
    4343    python/avango/display/setups/Monitor.py 
    4444    python/avango/display/setups/TwoView.py 
  • trunk/avango-display/python/avango/display/setups/Monitor.py

    r484 r512  
    3131class Monitor(avango.display.Display): 
    3232 
    33     def __init__(self, inspector, options): 
     33    def __init__(self, inspector, options, generate_window=True, window_translation = avango.osg.make_trans_mat(0, 1.7, -0.6), user_translation = avango.osg.make_trans_mat(avango.osg.Vec3(0., 1.7, 0.))): 
    3434        super(Monitor, self).__init__("Monitor", inspector) 
    3535 
     
    4444        if options.has_key(trackball_token) and self._bool_dict.has_key(options[trackball_token].lower()): 
    4545            self._enable_trackball=self._bool_dict[options[trackball_token].lower()] 
    46              
    47         window = self.make_window(0, 0,  1024, 768, 0.4, 0.3, False, self._screen_identifier, 2) 
    48         window.Name.value = "AVANGO" 
    49         window.Decoration.value = True 
    50         window.AutoHeight.value = True 
    51         window.ShowCursor.value = True 
    52         self.add_window(window, avango.osg.make_trans_mat(0, 1.7, -0.6), 0) 
    53         self._subdisplay_window[""]=window 
     46         
     47        if generate_window: 
     48            window = self.make_window(0, 0,  1024, 768, 0.4, 0.3, False, self._screen_identifier, 2) 
     49            window.Name.value = "AVANGO" 
     50            window.Decoration.value = True 
     51            window.AutoHeight.value = True 
     52            window.ShowCursor.value = True 
     53             
     54            self.add_window(window, window_translation, 0) 
     55            self._subdisplay_window[""]=window 
    5456         
    5557        user = avango.display.nodes.User() 
    56         user.Matrix.value = avango.osg.make_trans_mat(avango.osg.Vec3(0., 1.7, 0.)) 
     58        user.Matrix.value = user_translation 
    5759        self.add_user(user) 
    5860     
     
    167169 
    168170    def make_device(self, device, interface): 
    169          
    170171        if device == "SpaceMouse" or interface == "Relative6DOF": 
    171172 
Note: See TracChangeset for help on using the changeset viewer.