Example #1
0
 def setFactory(self, type):
     if (self.factoryType == type):
         return None
     if (self.factory):
         self.factory = None
     self.factoryType = type
     if (type == "PointParticleFactory"):
         self.factory = PointParticleFactory()
     elif (type == "ZSpinParticleFactory"):
         self.factory = ZSpinParticleFactory()
     elif (type == "OrientedParticleFactory"):
         self.factory = OrientedParticleFactory()
     else:
         print "unknown factory type: %s" % type
         return None
     self.factory.setLifespanBase(0.5)
     ParticleSystem.setFactory(self, self.factory)
 def setFactory(self, type):
     if (self.factoryType == type):
         return None
     if (self.factory):
         self.factory = None
     self.factoryType = type
     if (type == "PointParticleFactory"):
         self.factory = PointParticleFactory()
     elif (type == "ZSpinParticleFactory"):
         self.factory = ZSpinParticleFactory()
     elif (type == "OrientedParticleFactory"):
         self.factory = OrientedParticleFactory()
     else:
         print "unknown factory type: %s" % type
         return None
     self.factory.setLifespanBase(0.5)
     ParticleSystem.setFactory(self, self.factory)
Example #3
0
 def setFactory(self, type):
     if self.factoryType == type:
         return
     if self.factory:
         self.factory = None
     self.factoryType = type
     if type == 'PointParticleFactory':
         self.factory = PointParticleFactory()
     elif type == 'ZSpinParticleFactory':
         self.factory = ZSpinParticleFactory()
     elif type == 'OrientedParticleFactory':
         self.factory = OrientedParticleFactory()
     else:
         print 'unknown factory type: %s' % type
         return
     self.factory.setLifespanBase(0.5)
     ParticleSystem.setFactory(self, self.factory)
     return