Home | Trees | Index | Help |
|
---|
Module KX_Light :: Class KX_Light |
|
KX_GameObject
--+
|
KX_Light
A Light object.
Example:
# Turn on a red alert light. import GameLogic
co = GameLogic.getCurrentController() light = co.getOwner()
light.energy = 1.0 light.colour = [1.0, 0.0, 0.0]Method Summary | |
---|---|
Inherited from KX_GameObject | |
Applies an impulse to the game object. | |
Disables rigid body physics for this object. | |
Enables rigid body physics for this object. | |
float |
Returns the distance to another object or point. |
list [vx, vy, vz] |
Gets the game object's linear velocity. |
float |
Gets the game object's mass. |
KX_MeshProxy
|
Gets the mesh object for this object. |
3x3 rotation matrix |
Gets the game object's orientation. |
KX_GameObject
|
Gets this object's parent. |
Returns the user data object associated with this game object's physics controller. | |
list [x, y, z] |
Gets the game object's position. |
list [fx, fy, fz] |
Gets the game object's reaction force. |
list [vx, vy, vz] |
Gets the game object's velocity at the specified point. |
Resumes physics for this object. | |
Sets the game object's orientation. | |
Sets the game object's position. | |
Sets the game object's visible flag. | |
Suspends physics for this object. |
Instance Variable Summary | |
---|---|
color : Synonym for colour. | |
list [r, g, b] | colour : The colour of this light. |
float | distance : The maximum distance this light can illuminate. |
float | energy : The brightness of this light. |
bitfield | layer : The layer mask that this light affects object on. |
float | lin_attenuation : The linear component of this light's attenuation. |
float | quad_attenuation : The quadratic component of this light's attenuation (SPOT and NORMAL
lights only) |
spotblend : Specifies the intensity distribution of the spot light. | |
spotsize : The cone angle of the spot light, in degrees. | |
type : The type of light - must be SPOT, SUN or NORMAL | |
Constants | |
NORMAL : A point light source. | |
SPOT : A spot light source. | |
SUN : A point light source with no attenuation. | |
Inherited from KX_GameObject | |
float | mass : The object's mass (provided the object has a physics controller). |
string. | name : The object's name. |
3x3 Matrix [[float]] | orientation : The object's orientation. |
KX_GameObject |
parent : The object's parent object. |
list [x, y, z] | position : The object's position. |
list [sx, sy, sz] | scaling : The object's scaling factor. |
boolean | visible : visibility flag. |
Instance Variable Details |
---|
NORMALA point light source. See attribute 'type' |
SPOTA spot light source. See attribute 'type' |
SUNA point light source with no attenuation. See attribute 'type' |
colorSynonym for colour. |
colourThe colour of this light. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0]
|
distanceThe maximum distance this light can illuminate. (SPOT and NORMAL lights only)
|
energyThe brightness of this light.
|
layerThe layer mask that this light affects object on.
|
lin_attenuationThe linear component of this light's attenuation. (SPOT and NORMAL lights only)
|
quad_attenuationThe quadratic component of this light's attenuation (SPOT and NORMAL lights only)
|
spotblendSpecifies the intensity distribution of the spot light. (float) (SPOT lights only) Higher values result in a more focused light source. 0.0 <= spotblend <= 1.0. |
spotsizeThe cone angle of the spot light, in degrees. (float) (SPOT lights only) 0.0 <= spotsize <= 180.0. Spotsize = 360.0 is also accepted. |
typeThe type of light - must be SPOT, SUN or NORMAL |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Feb 1 00:12:33 2007 | http://epydoc.sf.net |