Drag[en]gine Script Module DragonScript Script API  1.0
Light Class Reference

Light. More...

Inheritance diagram for Light:

Public Member Functions

Constructors
Light new ()
 Create light. More...
 
Management
int getType ()
 Type. More...
 
void setType (int type)
 Set type. More...
 
DVector getPosition ()
 Position. More...
 
void setPosition (DVector position)
 position. More...
 
Quaternion getOrientation ()
 Orientation. More...
 
void setOrientation (Quaternion orientation)
 Set orientation. More...
 
bool getActivated ()
 Light is actived. More...
 
void setActivated (bool activated)
 Set if light is activated. More...
 
Color getColor ()
 Light color. More...
 
void setColor (Color color)
 Set light color. More...
 
float getIntensity ()
 Light intensity. More...
 
void setIntensity (float intensity)
 Set light intensity. More...
 
float getRange ()
 Range in meters. More...
 
void setRange (float range)
 Set range in meters. More...
 
float getHalfIntensityDistance ()
 Half intensity distance in meters. More...
 
void setHalfIntensityDistance (float halfIntDist)
 Set half intensity distance in meters. More...
 
float getAmbientRatio ()
 Ratio of ambient light in relation to the total intensity. More...
 
void setAmbientRatio (float ratio)
 Set ratio of ambient light in relation to the total intensity. More...
 
ShapeList getShape ()
 Light shape. More...
 
void setShape (ShapeList shape)
 Set light shape. More...
 
LayerMask getLayerMask ()
 Layer mask affecting lighting. More...
 
void setLayerMask (LayerMask layerMask)
 Set layer mask affecting lighting. More...
 
Spot and projector
float getSpotAngle ()
 Outer spot Angle. More...
 
void setSpotAngle (float angle)
 Set outer spot angle. More...
 
float getSpotRatio ()
 Spot ratio as height divided by width. More...
 
void setSpotRatio (float ratio)
 Set spot ratio as height divided by width. More...
 
float getSpotSmoothness ()
 Spot smoothness. More...
 
void setSpotSmoothness (float smoothness)
 Set spot smoothness. More...
 
float getSpotExponent ()
 Spot exponent. More...
 
void setSpotExponent (float exponent)
 Set spot exponent. More...
 
float getSpotExponent ()
 Spot exponent. More...
 
void setSpotExponent (float exponent)
 Set spot exponent. More...
 
Light source
Skin getLightSkin ()
 Light skin or NULL if not used. More...
 
void setLightSkin (Skin skin)
 Set light skin or NULL if not used. More...
 
CanvasView getLightCanvas ()
 Light canvas view or NULL if not used. More...
 
void setLightCanvas (CanvasView canvas)
 Set light canvas view or NULL if not used. More...
 
DynamicSkin getDynamicSkin ()
 Light dynamic skin or NULL if not used. More...
 
void setDynamicSkin (DynamicSkin dynamicSkin)
 Set light dynamic skin or NULL if not used. More...
 
TexMatrix2 getTransform ()
 Light texture coordinate transformation matrix. More...
 
void setTransform (TexMatrix2 matrix)
 Set light texture coordinate transformation matrix. More...
 
Shadow casting
bool getCastShadows ()
 Light is casting shadows. More...
 
void setCastShadows (bool castShadows)
 Set if light is casting shadows. More...
 
LayerMask getLayerMaskShadow ()
 Layer mask affecting shadow casting. More...
 
void setLayerMaskShadow (LayerMask layerMask)
 Set layer mask affecting shadow casting. More...
 
int getShadowIgnoreComponentCount ()
 Number of components to ignore for shadow casting. More...
 
Component getShadowIgnoreComponentAt (int index)
 Component to ignore for shadow casting at index. More...
 
bool hasShadowIgnoreComponent (Component component)
 Component to ignore for shadow casting is present. More...
 
void addShadowIgnoreComponent (Component component)
 Add component to ignore for shadow casting. More...
 
void removeShadowIgnoreComponent (Component component)
 Remove component to ignore for shadow casting. More...
 
void removeAllShadowIgnoreComponents ()
 Remove all components to ignore for shadow casting. More...
 
Hint
int getHintLightImportance ()
 Light importannce in the range from 0 (least important) to 100 (most important). More...
 
void setHintLightImportance (int type)
 Sets light importannce in the range from 0 (least important) to 100 (most important). More...
 
int getHintShadowImportance ()
 Shadow important in the range from 0 (least important) to 100 (most important). More...
 
void setHintShadowImportance (int type)
 Set shadow important in the range from 0 (least important) to 100 (most important). More...
 
int getHintMovement ()
 Movement hint. More...
 
void setHintMovement (int hint)
 Set movement hint. More...
 
int getHintParameters ()
 Parameter change hint. More...
 
void setHintParameter (int hint)
 Set parameter change hint. More...
 
ShapeList getCage ()
 Light cage. More...
 
void setCage (ShapeList cage)
 Set light cage. More...
 

Static Public Attributes

Light type
static final int POINT = 0
 Point light. More...
 
static final int SPOT = 1
 Spot light. More...
 
static final int PROJECTOR = 2
 Projector light. More...
 
Movement hints.
static final int MOVEMENT_STATIC = 0
 Light remains static for the entire lifetime. More...
 
static final int MOVEMENT_JITTERING = 1
 Light remains mostly static jittering in a small area. More...
 
static final int MOVEMENT_DYNAMIC = 2
 Light moves around freely. More...
 
Parameter change hints.
static final int PARAM_STATIC = 0
 Light parameters never change. More...
 
static final int PARAM_ACTIVATION = 1
 Light parameters never change except activation. More...
 
static final int PARAM_FLICKER = 2
 Geometric light parameters never change but others can. More...
 
static final int PARAM_DYNAMIC = 3
 All light parameters can change at will any time. More...
 

Detailed Description

Light.

This is a native class.

Member Function Documentation

◆ addShadowIgnoreComponent()

void addShadowIgnoreComponent ( Component  component)

Add component to ignore for shadow casting.

Exceptions
EInvalidParamcomponent is present.

◆ getActivated()

bool getActivated ( )

Light is actived.

◆ getAmbientRatio()

float getAmbientRatio ( )

Ratio of ambient light in relation to the total intensity.

◆ getCage()

ShapeList getCage ( )

Light cage.

◆ getCastShadows()

bool getCastShadows ( )

Light is casting shadows.

◆ getColor()

Color getColor ( )

Light color.

◆ getDynamicSkin()

DynamicSkin getDynamicSkin ( )

Light dynamic skin or NULL if not used.

◆ getHalfIntensityDistance()

float getHalfIntensityDistance ( )

Half intensity distance in meters.

◆ getHintLightImportance()

int getHintLightImportance ( )

Light importannce in the range from 0 (least important) to 100 (most important).

◆ getHintMovement()

int getHintMovement ( )

Movement hint.

◆ getHintParameters()

int getHintParameters ( )

Parameter change hint.

◆ getHintShadowImportance()

int getHintShadowImportance ( )

Shadow important in the range from 0 (least important) to 100 (most important).

◆ getIntensity()

float getIntensity ( )

Light intensity.

◆ getLayerMask()

LayerMask getLayerMask ( )

Layer mask affecting lighting.

◆ getLayerMaskShadow()

LayerMask getLayerMaskShadow ( )

Layer mask affecting shadow casting.

◆ getLightCanvas()

CanvasView getLightCanvas ( )

Light canvas view or NULL if not used.

◆ getLightSkin()

Skin getLightSkin ( )

Light skin or NULL if not used.

◆ getOrientation()

Quaternion getOrientation ( )

Orientation.

◆ getPosition()

DVector getPosition ( )

Position.

◆ getRange()

float getRange ( )

Range in meters.

◆ getShadowIgnoreComponentAt()

Component getShadowIgnoreComponentAt ( int  index)

Component to ignore for shadow casting at index.

Exceptions
EInvalidParamindex is less than 0.
EInvalidParamindex is greater or equal than getIgnoreComponentCount()-1.

◆ getShadowIgnoreComponentCount()

int getShadowIgnoreComponentCount ( )

Number of components to ignore for shadow casting.

◆ getShape()

ShapeList getShape ( )

Light shape.

◆ getSpotAngle()

float getSpotAngle ( )

Outer spot Angle.

◆ getSpotExponent() [1/2]

float getSpotExponent ( )

Spot exponent.

◆ getSpotExponent() [2/2]

float getSpotExponent ( )

Spot exponent.

◆ getSpotRatio()

float getSpotRatio ( )

Spot ratio as height divided by width.

◆ getSpotSmoothness()

float getSpotSmoothness ( )

Spot smoothness.

◆ getTransform()

TexMatrix2 getTransform ( )

Light texture coordinate transformation matrix.

◆ getType()

int getType ( )

Type.

◆ hasShadowIgnoreComponent()

bool hasShadowIgnoreComponent ( Component  component)

Component to ignore for shadow casting is present.

◆ new()

Light new ( )

Create light.

◆ removeAllShadowIgnoreComponents()

void removeAllShadowIgnoreComponents ( )

Remove all components to ignore for shadow casting.

◆ removeShadowIgnoreComponent()

void removeShadowIgnoreComponent ( Component  component)

Remove component to ignore for shadow casting.

Exceptions
EInvalidParamcomponent is absent.

◆ setActivated()

void setActivated ( bool  activated)

Set if light is activated.

◆ setAmbientRatio()

void setAmbientRatio ( float  ratio)

Set ratio of ambient light in relation to the total intensity.

◆ setCage()

void setCage ( ShapeList  cage)

Set light cage.

◆ setCastShadows()

void setCastShadows ( bool  castShadows)

Set if light is casting shadows.

◆ setColor()

void setColor ( Color  color)

Set light color.

◆ setDynamicSkin()

void setDynamicSkin ( DynamicSkin  dynamicSkin)

Set light dynamic skin or NULL if not used.

◆ setHalfIntensityDistance()

void setHalfIntensityDistance ( float  halfIntDist)

Set half intensity distance in meters.

◆ setHintLightImportance()

void setHintLightImportance ( int  type)

Sets light importannce in the range from 0 (least important) to 100 (most important).

◆ setHintMovement()

void setHintMovement ( int  hint)

Set movement hint.

◆ setHintParameter()

void setHintParameter ( int  hint)

Set parameter change hint.

◆ setHintShadowImportance()

void setHintShadowImportance ( int  type)

Set shadow important in the range from 0 (least important) to 100 (most important).

◆ setIntensity()

void setIntensity ( float  intensity)

Set light intensity.

◆ setLayerMask()

void setLayerMask ( LayerMask  layerMask)

Set layer mask affecting lighting.

◆ setLayerMaskShadow()

void setLayerMaskShadow ( LayerMask  layerMask)

Set layer mask affecting shadow casting.

◆ setLightCanvas()

void setLightCanvas ( CanvasView  canvas)

Set light canvas view or NULL if not used.

◆ setLightSkin()

void setLightSkin ( Skin  skin)

Set light skin or NULL if not used.

◆ setOrientation()

void setOrientation ( Quaternion  orientation)

Set orientation.

◆ setPosition()

void setPosition ( DVector  position)

position.

◆ setRange()

void setRange ( float  range)

Set range in meters.

◆ setShape()

void setShape ( ShapeList  shape)

Set light shape.

◆ setSpotAngle()

void setSpotAngle ( float  angle)

Set outer spot angle.

◆ setSpotExponent() [1/2]

void setSpotExponent ( float  exponent)

Set spot exponent.

◆ setSpotExponent() [2/2]

void setSpotExponent ( float  exponent)

Set spot exponent.

◆ setSpotRatio()

void setSpotRatio ( float  ratio)

Set spot ratio as height divided by width.

◆ setSpotSmoothness()

void setSpotSmoothness ( float  smoothness)

Set spot smoothness.

◆ setTransform()

void setTransform ( TexMatrix2  matrix)

Set light texture coordinate transformation matrix.

◆ setType()

void setType ( int  type)

Set type.

Member Data Documentation

◆ MOVEMENT_DYNAMIC

final int MOVEMENT_DYNAMIC = 2
static

Light moves around freely.

◆ MOVEMENT_JITTERING

final int MOVEMENT_JITTERING = 1
static

Light remains mostly static jittering in a small area.

◆ MOVEMENT_STATIC

final int MOVEMENT_STATIC = 0
static

Light remains static for the entire lifetime.

◆ PARAM_ACTIVATION

final int PARAM_ACTIVATION = 1
static

Light parameters never change except activation.

◆ PARAM_DYNAMIC

final int PARAM_DYNAMIC = 3
static

All light parameters can change at will any time.

◆ PARAM_FLICKER

final int PARAM_FLICKER = 2
static

Geometric light parameters never change but others can.

◆ PARAM_STATIC

final int PARAM_STATIC = 0
static

Light parameters never change.

◆ POINT

final int POINT = 0
static

Point light.

◆ PROJECTOR

final int PROJECTOR = 2
static

Projector light.

◆ SPOT

final int SPOT = 1
static

Spot light.


The documentation for this class was generated from the following file: