コード例 #1
0
    def __init__(self, parent=None, name='SpotLight'):
        LightNodeWrapper.__init__(self, parent, name,
                                  SPOTLIGHT_WRAPPER_DUMMYOBJECT, Spotlight)
        self.lens = PerspectiveLens()
        self.light.setLens(self.lens)

        self.mutableParameters['attenuation'] = [
            Vec3, self.light.getAttenuation, self.light.setAttenuation, None,
            None, True
        ]
        self.mutableParameters['specularColor'] = [
            Vec4, self.light.getSpecularColor, self.light.setSpecularColor,
            None, None, True
        ]
        self.mutableParameters['fov'] = [
            Vec2, self.lens.getFov, self.lens.setFov, None, None, True
        ]
        self.mutableParameters['near'] = [
            float, self.lens.getNear, self.lens.setNear, None, None, True
        ]
        self.mutableParameters['far'] = [
            float, self.lens.getFar, self.lens.setFar, None, None, True
        ]
        self.mutableParameters['exponent'] = [
            float, self.light.getExponent, self.setExponent, None, None, True
        ]
コード例 #2
0
    def __init__(self, parent=None, name='DirectionalLight'):
        # define the name of this object
        name = 'DirectionalLight'
        LightNodeWrapper.__init__(self, parent, name,
                                  DIRECTIONALLIGHT_WRAPPER_DUMMYOBJECT,
                                  DirectionalLight)

        self.mutableParameters['specularColor'] = [
            Vec4, self.light.getSpecularColor, self.light.setSpecularColor,
            None, None, True
        ]
コード例 #3
0
 def __init__(self, parent=None, name='DirectionalLight'):
   # define the name of this object
   name = 'DirectionalLight'
   LightNodeWrapper.__init__(self, parent, name, DIRECTIONALLIGHT_WRAPPER_DUMMYOBJECT, DirectionalLight)
   
   self.mutableParameters['specularColor'] = [ Vec4,
       self.light.getSpecularColor,
       self.light.setSpecularColor,
       None,
       None,
       True ]
コード例 #4
0
 def __init__(self, parent=None, name='PointLight'):
   # define the name of this object
   name = 'PointLight'
   LightNodeWrapper.__init__(self, parent, name, POINTLIGHT_WRAPPER_DUMMYOBJECT, PointLight)
   
   self.mutableParameters['attenuation'] = [ Vec3,
       self.light.getAttenuation,
       self.light.setAttenuation,
       None,
       None,
       True ]
   self.mutableParameters['specularColor'] = [ Vec4,
       self.light.getSpecularColor,
       self.light.setSpecularColor,
       None,
       None,
       True ]
コード例 #5
0
 def __init__(self, parent=None, name='SpotLight'):
   LightNodeWrapper.__init__(self, parent, name, SPOTLIGHT_WRAPPER_DUMMYOBJECT, Spotlight)
   self.lens = PerspectiveLens()
   self.light.setLens(self.lens)
   
   self.mutableParameters['attenuation'] = [ Vec3,
       self.light.getAttenuation,
       self.light.setAttenuation,
       None,
       None,
       True ]
   self.mutableParameters['specularColor'] = [ Vec4,
       self.light.getSpecularColor,
       self.light.setSpecularColor,
       None,
       None,
       True ]
   self.mutableParameters['fov'] = [ Vec2,
       self.lens.getFov,
       self.lens.setFov,
       None,
       None,
       True ]
   self.mutableParameters['near'] = [ float,
       self.lens.getNear,
       self.lens.setNear,
       None,
       None,
       True ]
   self.mutableParameters['far'] = [ float,
       self.lens.getFar,
       self.lens.setFar,
       None,
       None,
       True ]
   self.mutableParameters['exponent'] = [ float,
       self.light.getExponent,
       self.setExponent,
       None,
       None,
       True ]
コード例 #6
0
 def stopEdit(self):
   # the object is deselected from being edited
   if self.isEditmodeEnabled():
     self.light.hideFrustum()
   LightNodeWrapper.stopEdit(self)
コード例 #7
0
 def startEdit(self):
   # the object is selected to be edited
   # creates a directFrame to edit this object
   LightNodeWrapper.startEdit(self)
   if self.isEditmodeEnabled():
     self.light.showFrustum()
コード例 #8
0
 def destroy(self):
   # delete the lens?
   #self.lensNode.removeNode()
   LightNodeWrapper.destroy(self)
コード例 #9
0
 def __init__(self, parent=None, name='AmbientLight'):
     # define the name of this object
     LightNodeWrapper.__init__(self, parent, name,
                               AMBIENTLIGHT_WRAPPER_DUMMYOBJECT,
                               AmbientLight)
コード例 #10
0
 def __init__(self, parent=None, name='AmbientLight'):
   # define the name of this object
   LightNodeWrapper.__init__(self, parent, name, AMBIENTLIGHT_WRAPPER_DUMMYOBJECT, AmbientLight)
コード例 #11
0
 def stopEdit(self):
     # the object is deselected from being edited
     if self.isEditmodeEnabled():
         self.light.hideFrustum()
     LightNodeWrapper.stopEdit(self)
コード例 #12
0
 def startEdit(self):
     # the object is selected to be edited
     # creates a directFrame to edit this object
     LightNodeWrapper.startEdit(self)
     if self.isEditmodeEnabled():
         self.light.showFrustum()
コード例 #13
0
 def destroy(self):
     # delete the lens?
     #self.lensNode.removeNode()
     LightNodeWrapper.destroy(self)