Changeset 498 for trunk/avango-utils/python/_converter.py
- Timestamp:
- 07/20/10 16:06:33 (22 months ago)
- File:
-
- 1 edited
-
trunk/avango-utils/python/_converter.py (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/avango-utils/python/_converter.py
r488 r498 37 37 def __init__(self): 38 38 self.super(FloatXBase).__init__() 39 40 self.Name.value = "FloatXBase" 39 41 40 42 self.Output.value = 0 … … 65 67 66 68 class FloatXSum(FloatXBase): 69 70 def __init__(self): 71 self.super(FloatXSum).__init__() 72 73 self.Name.value = "FloatXSum" 67 74 68 75 def on_calculate(self): … … 78 85 79 86 class FloatXMin(FloatXBase): 87 88 def __init__(self): 89 self.super(FloatXMin).__init__() 90 91 self.Name.value = "FloatXMin" 80 92 81 93 def on_calculate(self): … … 99 111 100 112 Output = avango.SFFloat() 113 114 def __init__(self): 115 self.super(Float2Add).__init__() 116 117 self.Name.value = "Float2Add" 101 118 102 119 def evaluate(self): … … 113 130 114 131 Output = avango.osg.SFVec2() 132 133 def __init__(self): 134 self.super(Float4AddVec2Converter).__init__() 135 136 self.Name.value = "Float4AddVec2Converter" 115 137 116 138 def evaluate(self): 117 139 self.Output.value = avango.osg.Vec2(self.Value00.value+self.Value01.value, self.Value10.value+self.Value11.value) 140 118 141 119 142 class SFNode2MFContainerConverter(avango.script.Script): … … 122 145 Input = avango.osg.SFNode() 123 146 Output = avango.MFContainer() 147 148 def __init__(self): 149 self.super(SFNode2MFContainerConverter).__init__() 150 151 self.Name.value = "SFNode2MFContainerConverter" 152 124 153 125 154 def evaluate(self): 126 155 self.Output.value = [ self.Input.value ] 156 127 157 128 158 class Float2Vec2Converter(avango.script.Script): … … 132 162 Value1 = avango.SFFloat() 133 163 Output = avango.osg.SFVec2() 164 165 def __init__(self): 166 self.super(Float2Vec2Converter).__init__() 167 168 self.Name.value = "Float2Vec2Converter" 169 134 170 135 171 def evaluate(self): 136 172 self.Output.value = avango.osg.Vec2(self.Value0.value, self.Value1.value) 173 137 174 138 175 class Vec3ToTransMatrix(avango.script.Script): … … 141 178 Matrix = avango.osg.SFMatrix() 142 179 180 def __init__(self): 181 self.super(Vec3ToTransMatrix).__init__() 182 183 self.Name.value = "Vec3ToTransMatrix" 184 185 143 186 def evaluate(self): 144 187 self.Matrix.value = avango.osg.make_trans_mat(self.TransVec.value + self.TransOffset.value) … … 157 200 MatrixTransDif = avango.osg.SFMatrix() 158 201 202 def __init__(self): 203 self.super(TranslationMatrixCalculator).__init__() 204 205 self.Name.value = "TranslationMatrixCalculator" 206 207 159 208 def evaluate(self): 160 209 if not self.MatrixFrom.value or not self.MatrixTo.value: … … 172 221 self.__alpha_changed = False 173 222 self.__color_in = avango.osg.Vec4(1,1,1,1) 223 self.Name.value = "FloatToAlphaConverter" 174 224 175 225 @field_has_changed(ColorIn)
Note: See TracChangeset
for help on using the changeset viewer.
