awScene.Light Class Reference


Detailed Description

Light represents a light in the scene.

#include <classaw_scene_1_1_light.h>

List of all members.

Public Member Functions

  __init__ ()
  __init__ (Light nodeToCopy)
Light  operator= (Light)
  setLightPosition (awLinear.Point value)
  The position is specified in world space.
awLinear Point  getLightPosition ()
  setLightDirection (awLinear.Normal value)
  The direction is specified in world space.
awLinear Normal  getLightDirection ()
str  getValueAsString (str name)
  You can access the position, direction and type through this interface as well.
bool  setValueAsString (str name, awSupport.Parameter.Type type, str valueString)
awSupport ParameterRef  getParameterByName (str name)
  You can get to all parameters this way.
  setIsVisible (bool isVisible)
  setIsAlternateVisible (bool isVisible)
  setDirty (int, bool dirty, bool propagate=True, Node dirtySource=None)
bool  isLeafNode ()
  accept (NodeVisitor visitor)
str  getTemplateGeomId ()
  Returns an id of the root node of its template geometry.
  setLightType (LightType type)
  kPoint is the initialized default.
LightType  getLightType ()
  setLightTypeByName (str)
  The names for the light types are defined in ParameterConstants and are case independent.
str  getLightTypeName ()
  updateMatrixFromAttributes ()
LightingRef  attributes ()
bool  setAttributes (LightingRef lighting)
LightingRef  overriddenAttributes ()
  Get attributes whose parameters take higher priority than the original ones.
LightingRef  effectiveAttributes ()
  Get the final attributes for rendering, including all parameters in overriddenAttributes and parameters in original attributes that haven't been overridden.
aw unordered_set  getShadowCasters ()
  resetShadowCasters ()
  addShadowCaster (ShadowCasterRef)
  removeShadowCaster (ShadowCasterRef)
bool  isIllumination ()
bool  isClipping ()
  setIsLightOn (bool isOn)
bool  isLightOn ()
  setDefaultAttributes (LightingRef lighting)
  Sets the default attributes.
LightingRef  getDefaultAttributes (bool overriddenOnly=False)
  Returns the default attributes if overriddenOnly is false, otherwise only returns the overridden ones of the default attributes.
str  getGripId (LightType type)
  Returns a nodeId of the root of the geometry for this light type light grip.

Protected Member Functions

  __del__ ()
  parentTransformDirty ()

Protected Attributes

str  thePointGripId
str  theDirectGripId
str  theSpotGripId
str  theLinearGripId
str  theClipPlaneGridId
str  theClipBoxGridId

Member Function Documentation

awScene.Light.__init__ ( )
awScene.Light.__init__ ( Light  nodeToCopy )
Light awScene.Light.operator= ( Light  )
awScene.Light.setLightPosition ( awLinear.Point  value )

The position is specified in world space.

Since this node is derived from the transform, we will take this value and adjust the transform to reflect the new world space position.

awLinear Point awScene.Light.getLightPosition ( )
awScene.Light.setLightDirection ( awLinear.Normal  value )

The direction is specified in world space.

Since this node is derived from the transform, we will take this value and adjust the transform to reflect the new world space direction.

awLinear Normal awScene.Light.getLightDirection ( )
str awScene.Light.getValueAsString ( str  name )

You can access the position, direction and type through this interface as well.

setValueAsString() will return true if we created the parameter. If the parameter already exists set... will return false, and type will be ignored.

bool awScene.Light.setValueAsString ( str  name,
awSupport.Parameter.Type  type,
str  valueString 
)
awSupport ParameterRef awScene.Light.getParameterByName ( str  name )

You can get to all parameters this way.

However, setting the position, direction or type using this interface will mess things up as the other values will not be updated, and neither will the correct dirty flag.

awScene.Light.setIsVisible ( bool  isVisible )
awScene.Light.setIsAlternateVisible ( bool  isVisible )
awScene.Light.setDirty ( int  ,
bool  dirty,
bool  propagate = True,
Node  dirtySource = None 
)
bool awScene.Light.isLeafNode ( )
awScene.Light.accept ( NodeVisitor  visitor )
str awScene.Light.getTemplateGeomId ( )

Returns an id of the root node of its template geometry.

awScene.Light.setLightType ( LightType  type )

kPoint is the initialized default.

LightType awScene.Light.getLightType ( )
awScene.Light.setLightTypeByName ( str  )

The names for the light types are defined in ParameterConstants and are case independent.

str awScene.Light.getLightTypeName ( )
awScene.Light.updateMatrixFromAttributes ( )
LightingRef awScene.Light.attributes ( )
bool awScene.Light.setAttributes ( LightingRef  lighting )
LightingRef awScene.Light.overriddenAttributes ( )

Get attributes whose parameters take higher priority than the original ones.

LightingRef awScene.Light.effectiveAttributes ( )

Get the final attributes for rendering, including all parameters in overriddenAttributes and parameters in original attributes that haven't been overridden.

aw unordered_set awScene.Light.getShadowCasters ( )
awScene.Light.resetShadowCasters ( )
awScene.Light.addShadowCaster ( ShadowCasterRef  )
awScene.Light.removeShadowCaster ( ShadowCasterRef  )
bool awScene.Light.isIllumination ( )
bool awScene.Light.isClipping ( )
awScene.Light.setIsLightOn ( bool  isOn )
bool awScene.Light.isLightOn ( )
awScene.Light.setDefaultAttributes ( LightingRef  lighting )

Sets the default attributes.

LightingRef awScene.Light.getDefaultAttributes ( bool  overriddenOnly = False )

Returns the default attributes if overriddenOnly is false, otherwise only returns the overridden ones of the default attributes.

str awScene.Light.getGripId ( LightType  type )

Returns a nodeId of the root of the geometry for this light type light grip.

awScene.Light.__del__ ( ) [protected]
awScene.Light.parentTransformDirty ( ) [protected]

Member Data Documentation


awScene.Light awScene.Light awScene.Light awScene.Light awScene.Light awScene.Light awScene.Light awScene.Light awScene.Light awScene.Light
awScene.Light awScene.Light awScene.Light awScene.Light awScene.Light awScene.Light awScene.Light awScene.Light awScene.Light awScene.Light