~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/gameengine/PyDoc/KX_Light.py

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $Id: KX_Light.py,v 1.3 2004/06/07 11:01:30 kester Exp $
 
2
# Documentation for Light game objects.
 
3
from KX_GameObject import *
 
4
 
 
5
class KX_Light(KX_GameObject):
 
6
        """
 
7
        A Light object.
 
8
 
 
9
        Example:
 
10
        
 
11
        # Turn on a red alert light.
 
12
        import GameLogic
 
13
        
 
14
        co = GameLogic.getCurrentController()
 
15
        light = co.getOwner()
 
16
        
 
17
        light.energy = 1.0
 
18
        light.colour = [1.0, 0.0, 0.0]
 
19
        
 
20
        @group Constants: NORMAL, SPOT, SUN
 
21
        @ivar SPOT:   A spot light source. See attribute 'type'
 
22
        @ivar SUN:    A point light source with no attenuation. See attribute 'type'
 
23
        @ivar NORMAL: A point light source. See attribute 'type'
 
24
        
 
25
        @ivar type:            The type of light - must be SPOT, SUN or NORMAL
 
26
        @ivar layer:           The layer mask that this light affects object on.
 
27
        @type layer:           bitfield
 
28
        @ivar energy:          The brightness of this light. 
 
29
        @type energy:          float
 
30
        @ivar distance:        The maximum distance this light can illuminate. (SPOT and NORMAL lights only)
 
31
        @type distance:        float
 
32
        @ivar colour:          The colour of this light. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0]
 
33
        @type colour:          list [r, g, b]
 
34
        @ivar color:           Synonym for colour.
 
35
        @ivar lin_attenuation: The linear component of this light's attenuation. (SPOT and NORMAL lights only)
 
36
        @type lin_attenuation: float
 
37
        @ivar quad_attenuation: The quadratic component of this light's attenuation (SPOT and NORMAL lights only)
 
38
        @type quad_attenuation: float
 
39
        @ivar spotsize:        The cone angle of the spot light, in degrees. (float) (SPOT lights only)
 
40
                               0.0 <= spotsize <= 180.0. Spotsize = 360.0 is also accepted. 
 
41
        @ivar spotblend:       Specifies the intensity distribution of the spot light. (float) (SPOT lights only)
 
42
                               Higher values result in a more focused light source.
 
43
                               0.0 <= spotblend <= 1.0.
 
44
        
 
45
        """