- Timestamp:
- 05/14/10 11:31:00 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/avango-display/python/avango/display/_screen_descriptor.py
r399 r448 1 # -*- Mode:Python -*- 2 3 ########################################################################## 4 # # 5 # This file is part of AVANGO. # 6 # # 7 # Copyright 1997 - 2010 Fraunhofer-Gesellschaft zur Foerderung der # 8 # angewandten Forschung (FhG), Munich, Germany. # 9 # # 10 # AVANGO is free software: you can redistribute it and/or modify # 11 # it under the terms of the GNU Lesser General Public License as # 12 # published by the Free Software Foundation, version 3. # 13 # # 14 # AVANGO is distributed in the hope that it will be useful, # 15 # but WITHOUT ANY WARRANTY; without even the implied warranty of # 16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 17 # GNU General Public License for more details. # 18 # # 19 # You should have received a copy of the GNU Lesser General Public # 20 # License along with AVANGO. If not, see <http://www.gnu.org/licenses/>. # 21 # # 22 ########################################################################## 23 1 24 import avango 2 25 import avango.osg … … 13 36 self.RealSize.value = avango.osg.Vec2(1., 1.) 14 37 self.PixelSize.value = avango.osg.Vec2(1., 1.) 15 38 16 39 17 40 class ScreenSpaceTransform(avango.script.Script): … … 26 49 scale_mat = avango.osg.make_scale_mat(scale, scale, scale) 27 50 self.Transform.value = scale_mat * self.ScreenTransform.value * self.ViewerTransform.value 28 29 30 51 52 53 31 54 class ScreenSpaceToPixelTransform(avango.script.Script): 32 55 … … 36 59 PixelSize = avango.osg.SFVec2() 37 60 Transform = avango.osg.SFMatrix() 38 61 39 62 def __init__(self): 40 63 self.super(ScreenSpaceToPixelTransform).__init__()
Note: See TracChangeset
for help on using the changeset viewer.
