Changeset 498
- Timestamp:
- 07/20/10 16:06:33 (19 months ago)
- Location:
- trunk/avango-utils
- Files:
-
- 17 edited
-
python/_MFMerger.py (modified) (1 diff)
-
python/_bool_scripts.py (modified) (3 diffs)
-
python/_converter.py (modified) (10 diffs)
-
python/_field_dump.py (modified) (1 diff)
-
python/_interpolators.py (modified) (2 diffs)
-
python/_node_scalers.py (modified) (1 diff)
-
python/_normalization.py (modified) (2 diffs)
-
python/_property_modifier.py (modified) (1 diff)
-
python/_task_scheduler.py (modified) (2 diffs)
-
python/_triggers.py (modified) (5 diffs)
-
python/_utils.cpp (modified) (2 diffs)
-
src/Bool2And.cpp (modified) (1 diff)
-
src/Bool2Or.cpp (modified) (1 diff)
-
src/Bool3And.cpp (modified) (1 diff)
-
src/Bool3Or.cpp (modified) (1 diff)
-
src/ProximitySensor.cpp (modified) (1 diff)
-
src/Trackball.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/avango-utils/python/_MFMerger.py
r363 r498 29 29 self.super(MFMerger).__init__() 30 30 self._initialized = False 31 32 self.Name.value = "MFMerger" 31 33 32 34 def init(self, sftype, mftype): -
trunk/avango-utils/python/_bool_scripts.py
r448 r498 43 43 44 44 self._actual_id = 0 45 46 self.Name.value = "BoolXBase" 45 47 46 48 def add_and_connect_bool_field(self,field): … … 67 69 68 70 class BoolXOr(BoolXBase): 71 72 def __init__(self): 73 self.super(BoolXOr).__init__() 74 75 self.Name.value = "BoolXOr" 69 76 70 77 def on_calculate(self): … … 84 91 85 92 class BoolXAnd(BoolXBase): 93 94 def __init__(self): 95 self.super(BoolXAnd).__init__() 96 97 self.Name.value = "BoolXAnd" 86 98 87 99 def on_calculate(self): -
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) -
trunk/avango-utils/python/_field_dump.py
r448 r498 47 47 self.super(ScriptFieldPrinter).__init__() 48 48 self.always_evaluate(True) 49 50 self.Name.value = "ScriptFieldPrinter" 49 51 50 52 def evaluate(self): -
trunk/avango-utils/python/_interpolators.py
r488 r498 43 43 44 44 self.__time_sensor = avango.nodes.TimeSensor() 45 46 self.Name.value = "Interpolator" 45 47 46 48 # def __del__(self): … … 139 141 self.RawInterpolatedValue.connect_weak_from(self.__interpolator.Value) 140 142 143 self.Name.value = "ColorFader" 141 144 142 145 @field_has_changed(StartFade) -
trunk/avango-utils/python/_node_scalers.py
r452 r498 40 40 self.Radius.value = 1.0 41 41 self.__file_loaded = False 42 43 self.Name.value = "LoadFileScaler" 42 44 43 45 @field_has_changed(LoadFileFinished) -
trunk/avango-utils/python/_normalization.py
r490 r498 47 47 def __init__(self): 48 48 self.super(FloatNormalization).__init__() 49 49 50 50 self.MinIn.value = -1.0 51 51 self.MaxIn.value = 1.0 … … 53 53 self.MinOut.value = 0.0 54 54 self.MaxOut.value = 1.0 55 56 self.Name.value = "FloatNormalization" 55 57 56 58 def evaluate(self): -
trunk/avango-utils/python/_property_modifier.py
r448 r498 59 59 60 60 self.always_evaluate(True) 61 62 self.Name.value = "PropertyModifierInt" 61 63 62 64 def evaluate(self): -
trunk/avango-utils/python/_task_scheduler.py
r448 r498 32 32 33 33 self.TimeDelta.value = 1.0 34 35 self.Name.value = "TaskSchedulerTask" 34 36 35 37 def on_active(self): … … 44 46 self.__tasks = [] 45 47 self.TimeIn.value = 0 48 49 self.Name.value = "TaskScheduler" 46 50 47 51 def evaluate(self): -
trunk/avango-utils/python/_triggers.py
r483 r498 40 40 41 41 self._last_trigger = False 42 43 self.Name.value = "ImmediateEdgeTrigger" 42 44 43 45 @field_has_changed(Trigger) … … 68 70 69 71 self._last_trigger = False 72 73 self.Name.value = "EdgeTrigger" 70 74 71 75 def evaluate(self): … … 102 106 self.super(KeyMonitorTrigger).__init__() 103 107 108 self.Name.value = "KeyMonitorTrigger" 109 104 110 def on_up_transition(self): 105 111 self.Pressed.value = False … … 123 129 self.super(KeyToggleTriggerAlternate).__init__() 124 130 131 self.Name.value = "KeyToggleTriggerAlternate" 132 125 133 def init(self,initial_state): 126 134 self.Toggle.value = initial_state … … 141 149 self.super(KeyToggleTrigger).__init__() 142 150 151 self.Name.value = "KeyToggleTrigger" 152 143 153 def on_up_transition(self): 144 154 self.Toggle.value = True -
trunk/avango-utils/python/_utils.cpp
r497 r498 99 99 { 100 100 std::string type = ::av::ContainerPool::getNameByInstance(iter->second); 101 // std::string type = iter->second->Name.getValue(); 102 101 103 int l = type.length(); 102 104 if(l>maxLength) … … 123 125 ss<< i->first << std::endl; 124 126 } 125 ss << "Total number of containers: " << av::ContainerPool::getNumberOfContainers() << std::endl; 127 for(int n=0;n<maxLength+2;++n) 128 ss << " "; 129 ss << "-------"<<std::endl; 130 std::string total_desc = "Total number of containers:"; 131 int l = maxLength - total_desc.length(); 132 ss <<"\""<< total_desc << "\" "; 133 for(int n=0;n<l;++n) 134 ss << " "; 135 ss<< av::ContainerPool::getNumberOfContainers() << std::endl; 136 126 137 127 138 std::cout << ss.str(); -
trunk/avango-utils/src/Bool2And.cpp
r380 r498 36 36 AV_FC_ADD_FIELD(Input2,false); 37 37 AV_FC_ADD_FIELD(Output,false); 38 39 Name.setValue("Bool2And"); 38 40 } 39 41 -
trunk/avango-utils/src/Bool2Or.cpp
r380 r498 36 36 AV_FC_ADD_FIELD(Input2,false); 37 37 AV_FC_ADD_FIELD(Output,false); 38 39 Name.setValue("Bool2Or"); 38 40 } 39 41 -
trunk/avango-utils/src/Bool3And.cpp
r380 r498 37 37 AV_FC_ADD_FIELD(Input3,false); 38 38 AV_FC_ADD_FIELD(Output,false); 39 40 Name.setValue("Bool3And"); 39 41 } 40 42 -
trunk/avango-utils/src/Bool3Or.cpp
r380 r498 37 37 AV_FC_ADD_FIELD(Input3,false); 38 38 AV_FC_ADD_FIELD(Output,false); 39 40 Name.setValue("Bool3Or"); 39 41 } 40 42 -
trunk/avango-utils/src/ProximitySensor.cpp
r363 r498 41 41 AV_FC_ADD_FIELD(Proximity, 0.); 42 42 AV_FC_ADD_FIELD(Switch, 0); 43 44 Name.setValue("ProximitySensor"); 43 45 } 44 46 -
trunk/avango-utils/src/Trackball.cpp
r483 r498 83 83 mCenterTransInv = ::osg::Matrix::inverse(CenterTransform.getValue()); 84 84 85 Name.setValue("Trackball"); 85 86 } 86 87
Note: See TracChangeset
for help on using the changeset viewer.
