Exemplo n.º 1
0
    def __init__(self,
                 name="GLDistantLight",
                 parent=None,
                 enabled=True,
                 intensity=1.0,
                 ambient=None,
                 diffuse=None,
                 specular=None,
                 cast_shadow = False,
                 auto_insert=True,
                 **params
                 ):
        _initWorldObject(self, baseClass=_core.GLDistantLight,
                         name=name, parent=parent,
                         auto_insert=auto_insert,
                         **params)

        self.enabled = enabled
        self.intensity = intensity
        if ambient!=None:
            self.ambient = vec3(ambient)
        if diffuse!=None:
            self.diffuse = vec3(diffuse)
        if specular!=None:
            self.specular = vec3(specular)

        self.cast_shadow = cast_shadow
Exemplo n.º 2
0
    def __init__(self,
                 name="GLPointLight",
                 enabled=True,
                 intensity=1.0,
                 ambient=None,
                 diffuse=None,
                 specular=None,
                 constant_attenuation=1.0,
                 linear_attenuation=0.0,
                 quadratic_attenuation=0.0,
                 cast_shadow = False,
                 parent = None,
                 auto_insert = True,
                 **params
                 ):
        exec _preInitWorldObject
        _core.GLPointLight.__init__(self, name)

        _initWorldObject(self, name=name, parent=parent,
                         auto_insert=auto_insert,
                         **params)

        self.enabled = enabled
        self.intensity = intensity
        if ambient!=None:
            self.ambient = vec3(ambient)
        if diffuse!=None:
            self.diffuse = vec3(diffuse)
        if specular!=None:
            self.specular = vec3(specular)
        self.constant_attenuation = constant_attenuation
        self.linear_attenuation = linear_attenuation
        self.quadratic_attenuation = quadratic_attenuation

        self.cast_shadow = cast_shadow
Exemplo n.º 3
0
    def __init__(self,
                 name="GLDistantLight",
                 parent=None,
                 enabled=True,
                 intensity=1.0,
                 ambient=None,
                 diffuse=None,
                 specular=None,
                 cast_shadow=False,
                 auto_insert=True,
                 **params):
        exec _preInitWorldObject
        _core.GLDistantLight.__init__(self, name)

        _initWorldObject(self,
                         name=name,
                         parent=parent,
                         auto_insert=auto_insert,
                         **params)

        self.enabled = enabled
        self.intensity = intensity
        if ambient != None:
            self.ambient = vec3(ambient)
        if diffuse != None:
            self.diffuse = vec3(diffuse)
        if specular != None:
            self.specular = vec3(specular)

        self.cast_shadow = cast_shadow
Exemplo n.º 4
0
    def __init__(self,
                 name="GLPointLight",
                 enabled=True,
                 intensity=1.0,
                 ambient=None,
                 diffuse=None,
                 specular=None,
                 constant_attenuation=1.0,
                 linear_attenuation=0.0,
                 quadratic_attenuation=0.0,
                 cast_shadow=False,
                 parent=None,
                 auto_insert=True,
                 **params):
        _initWorldObject(self,
                         baseClass=_core.GLPointLight,
                         name=name,
                         parent=parent,
                         auto_insert=auto_insert,
                         **params)

        self.enabled = enabled
        self.intensity = intensity
        if ambient != None:
            self.ambient = vec3(ambient)
        if diffuse != None:
            self.diffuse = vec3(diffuse)
        if specular != None:
            self.specular = vec3(specular)
        self.constant_attenuation = constant_attenuation
        self.linear_attenuation = linear_attenuation
        self.quadratic_attenuation = quadratic_attenuation

        self.cast_shadow = cast_shadow
Exemplo n.º 5
0
    def __init__(self,
                 name="LightSource",
                 parent = None,
                 auto_insert = True,
                 **params):

        _initWorldObject(self, baseClass=_core.LightSource,
                         name=name, auto_insert=auto_insert,
                         parent=parent, **params)
Exemplo n.º 6
0
    def __init__(self,
                 name="LightSource",
                 parent = None,
                 auto_insert = True,
                 **params):

        exec _preInitWorldObject
        _core.LightSource.__init__(self, name)

        _initWorldObject(self, name=name, auto_insert=auto_insert,
                         parent=parent, **params)
Exemplo n.º 7
0
    def __init__(self,
                 name="LightSource",
                 parent=None,
                 auto_insert=True,
                 **params):

        _initWorldObject(self,
                         baseClass=_core.LightSource,
                         name=name,
                         auto_insert=auto_insert,
                         parent=parent,
                         **params)
Exemplo n.º 8
0
    def __init__(self,
                 name="GLSpotLight",
                 parent=None,
                 enabled=True,
                 intensity=1.0,
                 ambient=None,
                 diffuse=None,
                 specular=None,
                 constant_attenuation=1.0,
                 linear_attenuation=0.0,
                 quadratic_attenuation=0.0,
                 exponent=0.0,
                 cutoff=45.0,
                 target=vec3(0, 0, 0),
                 cast_shadow=False,
                 auto_insert=True,
                 **params):

        _initWorldObject(self,
                         baseClass=_core.GLSpotLight,
                         name=name,
                         parent=parent,
                         auto_insert=auto_insert,
                         **params)

        target = vec3(target)

        # Target
        self.target_slot = Vec3Slot(target)
        self.addSlot("target", self.target_slot)

        self.enabled = enabled
        self.intensity = intensity
        if ambient != None:
            self.ambient = vec3(ambient)
        if diffuse != None:
            self.diffuse = vec3(diffuse)
        if specular != None:
            self.specular = vec3(specular)
        self.constant_attenuation = constant_attenuation
        self.linear_attenuation = linear_attenuation
        self.quadratic_attenuation = quadratic_attenuation
        self.exponent = exponent
        self.cutoff = cutoff

        self.cast_shadow = cast_shadow

        # Create the internal LookAt component
        self._lookat = lookat.LookAt()
        self._lookat.name = "GLTargetSpot_LookAt"
        self._lookat.output_slot.connect(self.rot_slot)
        self.pos_slot.connect(self._lookat.pos_slot)
        self.target_slot.connect(self._lookat.target_slot)
Exemplo n.º 9
0
    def __init__(self,
                 name="GLSpotLight",
                 parent=None,
                 enabled=True,
                 intensity=1.0,
                 ambient=None,
                 diffuse=None,
                 specular=None,
                 constant_attenuation=1.0,
                 linear_attenuation=0.0,
                 quadratic_attenuation=0.0,
                 exponent=0.0,
                 cutoff=45.0,
                 target=vec3(0,0,0),
                 cast_shadow = False,
                 auto_insert=True,
                 **params
                 ):
        exec _preInitWorldObject
        _core.GLSpotLight.__init__(self, name)

        _initWorldObject(self, name=name, parent=parent,
                         auto_insert=auto_insert,
                         **params)

        target = vec3(target)

        # Target
        self.target_slot = Vec3Slot(target)
        self.addSlot("target", self.target_slot)

        self.enabled = enabled
        self.intensity = intensity
        if ambient!=None:
            self.ambient = vec3(ambient)
        if diffuse!=None:
            self.diffuse = vec3(diffuse)
        if specular!=None:
            self.specular = vec3(specular)
        self.constant_attenuation = constant_attenuation
        self.linear_attenuation = linear_attenuation
        self.quadratic_attenuation = quadratic_attenuation
        self.exponent = exponent
        self.cutoff = cutoff

        self.cast_shadow = cast_shadow

        # Create the internal LookAt component
        self._lookat = lookat.LookAt()
        self._lookat.name = "GLTargetSpot_LookAt"
        self._lookat.output_slot.connect(self.rot_slot)
        self.pos_slot.connect(self._lookat.pos_slot)
        self.target_slot.connect(self._lookat.target_slot)
Exemplo n.º 10
0
    def __init__(self,
                 name="LightSource",
                 parent=None,
                 auto_insert=True,
                 **params):

        exec _preInitWorldObject
        _core.LightSource.__init__(self, name)

        _initWorldObject(self,
                         name=name,
                         auto_insert=auto_insert,
                         parent=parent,
                         **params)
Exemplo n.º 11
0
    def __init__(self,
                 name="GLDistantLight",
                 parent=None,
                 enabled=True,
                 intensity=1.0,
                 ambient=None,
                 diffuse=None,
                 specular=None,
                 target=vec3(0,0,0),
                 cast_shadow = False,
                 auto_insert=True,
                 **params
                 ):
        exec _preInitWorldObject
        _core.GLDistantLight.__init__(self, name)

        _initWorldObject(self, name=name, parent=parent,
                         auto_insert=auto_insert,
                         **params)

        target = vec3(target)

        # Target
        self.target_slot = Vec3Slot(target)
        self.addSlot("target", self.target_slot)

        self.enabled = enabled
        self.intensity = intensity
        if ambient!=None:
            self.ambient = vec3(ambient)
        if diffuse!=None:
            self.diffuse = vec3(diffuse)
        if specular!=None:
            self.specular = vec3(specular)

        self.cast_shadow = cast_shadow

        # Create the internal LookAt component
        self._lookat = lookat.LookAt()
        self._lookat.name = "GLTargetDistant_LookAt"
        self._lookat.output_slot.connect(self.rot_slot)
        self.pos_slot.connect(self._lookat.pos_slot)
        self.target_slot.connect(self._lookat.target_slot)
Exemplo n.º 12
0
    def __init__(self,
                 name="GLDistantLight",
                 parent=None,
                 enabled=True,
                 intensity=1.0,
                 ambient=None,
                 diffuse=None,
                 specular=None,
                 target=vec3(0,0,0),
                 cast_shadow = False,
                 auto_insert=True,
                 **params
                 ):

        _initWorldObject(self, baseClass=_core.GLDistantLight,
                         name=name, parent=parent,
                         auto_insert=auto_insert,
                         **params)

        target = vec3(target)

        # Target
        self.target_slot = Vec3Slot(target)
        self.addSlot("target", self.target_slot)

        self.enabled = enabled
        self.intensity = intensity
        if ambient!=None:
            self.ambient = vec3(ambient)
        if diffuse!=None:
            self.diffuse = vec3(diffuse)
        if specular!=None:
            self.specular = vec3(specular)

        self.cast_shadow = cast_shadow

        # Create the internal LookAt component
        self._lookat = lookat.LookAt()
        self._lookat.name = "GLTargetDistant_LookAt"
        self._lookat.output_slot.connect(self.rot_slot)
        self.pos_slot.connect(self._lookat.pos_slot)
        self.target_slot.connect(self._lookat.target_slot)
Exemplo n.º 13
0
    def __init__(self,
                 name="GLSpotLight",
                 parent=None,
                 enabled=True,
                 intensity=1.0,
                 ambient=None,
                 diffuse=None,
                 specular=None,
                 constant_attenuation=1.0,
                 linear_attenuation=0.0,
                 quadratic_attenuation=0.0,
                 exponent=0.0,
                 cutoff=45.0,
                 cast_shadow=False,
                 auto_insert=True,
                 **params):
        exec _preInitWorldObject
        _core.GLSpotLight.__init__(self, name)

        _initWorldObject(self,
                         name=name,
                         parent=parent,
                         auto_insert=auto_insert,
                         **params)

        self.enabled = enabled
        self.intensity = intensity
        if ambient != None:
            self.ambient = vec3(ambient)
        if diffuse != None:
            self.diffuse = vec3(diffuse)
        if specular != None:
            self.specular = vec3(specular)
        self.constant_attenuation = constant_attenuation
        self.linear_attenuation = linear_attenuation
        self.quadratic_attenuation = quadratic_attenuation
        self.exponent = exponent
        self.cutoff = cutoff
        self.cast_shadow = cast_shadow
Exemplo n.º 14
0
    def __init__(self,
                 name="GLSpotLight",
                 parent=None,
                 enabled=True,
                 intensity=1.0,
                 ambient=None,
                 diffuse=None,
                 specular=None,
                 constant_attenuation=1.0,
                 linear_attenuation=0.0,
                 quadratic_attenuation=0.0,
                 exponent=0.0,
                 cutoff=45.0,
                 cast_shadow = False,
                 auto_insert=True,
                 **params
                 ):
        _initWorldObject(self, baseClass=_core.GLSpotLight,
                         name=name, parent=parent,
                         auto_insert=auto_insert,
                         **params)

        self.enabled = enabled
        self.intensity = intensity
        if ambient!=None:
            self.ambient = vec3(ambient)
        if diffuse!=None:
            self.diffuse = vec3(diffuse)
        if specular!=None:
            self.specular = vec3(specular)
        self.constant_attenuation = constant_attenuation
        self.linear_attenuation = linear_attenuation
        self.quadratic_attenuation = quadratic_attenuation
        self.exponent = exponent
        self.cutoff = cutoff
        self.cast_shadow = cast_shadow