SO3Engine
Functions
Lights

Functions

int SO3LightCreate (mmachine m)
 main include
 
int SO3LightSetType (mmachine m)
 SO3LightSetType : Defines the type of light.
 
int SO3LightGetType (mmachine m)
 SO3LightGetType : Returns the type of light.
 
int SO3LightSetDiffuseColor (mmachine m)
 SO3LightSetDiffuseColor : defines diffuse color of a light.
 
int SO3LightGetDiffuseColor (mmachine m)
 SO3LightGetDiffuseColor : Get the diffuse color of a light.
 
int SO3LightSetPowerScale (mmachine m)
 SO3LightSetPowerScale : defines power scale of a light.
 
int SO3LightSetShadowFarDistance (mmachine m)
 SO3LightSetShadowFarDistance : defines shadows far distance of a light.
 
int SO3LightGetPowerScale (mmachine m)
 SO3LightGetPowerScale : Get the power scale of a light.
 
int SO3LightGetShadowFarDistance (mmachine m)
 SO3LightGetShadowFarDistance : Get the shadow far distance of a light.
 
int SO3LightSetVisible (mmachine m)
 SO3LightSetVisible : defines visibility state of a light.
 
int SO3LightGetVisible (mmachine m)
 SO3LightGetVisible : Get the visibility state of a light.
 
int SO3LightSetVolumetric (mmachine m)
 SO3LightSetVolumetric : defines if a light is displayed as a volumetric light.
 
int SO3LightGetVolumetric (mmachine m)
 SO3LightGetVolumetric : Get the volumetric state of a light.
 
int SO3LightSetAttenuation (mmachine m)
 SO3LightSetAttenuation : defines attenuation coefficients for a light.
 
int SO3LightSetAttenuationAuto (mmachine m)
 SO3LightSetAttenuationAuto : defines attenuation coefficients for a light automatically, from given range.
 
int SO3LightGetAttenuation (mmachine m)
 SO3LightGetAttenuation : Get the attenuation coefficients for a light.
 
int SO3LightSetSpecularColor (mmachine m)
 SO3LightSetSpecularColor : defines specular color of a light.
 
int SO3LightGetSpecularColor (mmachine m)
 SO3LightGetSpecularColor : Get the specular color of a light.
 
int SO3LightSetSpotFallOff (mmachine m)
 SO3LightSetSpotFallOff : defines spot fall off of a spot light.
 
int SO3LightGetSpotFallOff (mmachine m)
 SO3LightGetSpotFallOff : Get the spot fall off of a spot light.
 
int SO3LightSetSpotInnerAngle (mmachine m)
 SO3LightSetSpotInnerAngle : defines spot inner angle of a spot light.
 
int SO3LightSetSpotOuterAngle (mmachine m)
 SO3LightSetSpotOuterAngle : defines spot outer angle of a spot light.
 
int SO3LightSetSpotRange (mmachine m)
 SO3LightSetSpotRange : defines spot range of a spot light.
 
int SO3LightGetSpotInnerAngle (mmachine m)
 SO3LightGetSpotInnerAngle : Get the spot inner angle of a spot light.
 
int SO3LightGetSpotOuterAngle (mmachine m)
 SO3LightGetSpotOuterAngle : Get the spot outer angle of a spot light.
 
int SO3LightSetSourceSize (mmachine m)
 SO3LightSetSourceSize : defines the source size of a rect light.
 
int SO3LightGetSourceSize (mmachine m)
 SO3LightGetSourceSize : get the source size of a rect light.
 

Detailed Description

Scol functions definition

Function Documentation

◆ SO3LightCreate()

int SO3LightCreate ( mmachine  m)

main include

SO3LightCreate : Create a new material

Prototype: fun [SO3_SCENE S] SO3_OBJECT

Parameters
SO3_SCENE: current scene
S: given name for the new light
Returns
SO3_OBJECT : Created light if success , NIL otherwise

Definition at line 49 of file SCOLLight.cpp.

◆ SO3LightGetAttenuation()

int SO3LightGetAttenuation ( mmachine  m)

SO3LightGetAttenuation : Get the attenuation coefficients for a light.

Prototype: fun [SO3_OBJECT] [F F F F]

Parameters
SO3_OBJECT: current light
Returns
[F F F F] : Coefficient (range, constant, linear, quadratic) if success , NIL otherwise

Definition at line 743 of file SCOLLight.cpp.

◆ SO3LightGetDiffuseColor()

int SO3LightGetDiffuseColor ( mmachine  m)

SO3LightGetDiffuseColor : Get the diffuse color of a light.

Prototype: fun [SO3_OBJECT] I

Parameters
SO3_OBJECT: current light
Returns
I : Diffuse color (rgba) if success , NIL otherwise

Definition at line 244 of file SCOLLight.cpp.

◆ SO3LightGetPowerScale()

int SO3LightGetPowerScale ( mmachine  m)

SO3LightGetPowerScale : Get the power scale of a light.

Prototype: fun [SO3_OBJECT] F

Parameters
SO3_OBJECT: current light
Returns
F : The power scale if success , NIL otherwise

Definition at line 375 of file SCOLLight.cpp.

◆ SO3LightGetShadowFarDistance()

int SO3LightGetShadowFarDistance ( mmachine  m)

SO3LightGetShadowFarDistance : Get the shadow far distance of a light.

Prototype: fun [SO3_OBJECT] F

Parameters
SO3_OBJECT: current light
Returns
F : Distance if success , NIL otherwise

Definition at line 418 of file SCOLLight.cpp.

◆ SO3LightGetSourceSize()

int SO3LightGetSourceSize ( mmachine  m)

SO3LightGetSourceSize : get the source size of a rect light.

Prototype: fun [SO3_OBJECT] [F F]

Parameters
SO3_OBJECT: current light
Returns
[F F] : size x y if success , NIL otherwise

Definition at line 1257 of file SCOLLight.cpp.

◆ SO3LightGetSpecularColor()

int SO3LightGetSpecularColor ( mmachine  m)

SO3LightGetSpecularColor : Get the specular color of a light.

Prototype: fun [SO3_OBJECT] I

Parameters
SO3_OBJECT: current light
Returns
I : color (rgba) if success , NIL otherwise

Definition at line 844 of file SCOLLight.cpp.

◆ SO3LightGetSpotFallOff()

int SO3LightGetSpotFallOff ( mmachine  m)

SO3LightGetSpotFallOff : Get the spot fall off of a spot light.

Prototype: fun [SO3_OBJECT] F

Parameters
SO3_OBJECT: current light
Returns
F : fall off value if success , NIL otherwise

Definition at line 932 of file SCOLLight.cpp.

◆ SO3LightGetSpotInnerAngle()

int SO3LightGetSpotInnerAngle ( mmachine  m)

SO3LightGetSpotInnerAngle : Get the spot inner angle of a spot light.

Prototype: fun [SO3_OBJECT] F

Parameters
SO3_OBJECT: current light
Returns
F : inner angle value if success , NIL otherwise

Definition at line 1121 of file SCOLLight.cpp.

◆ SO3LightGetSpotOuterAngle()

int SO3LightGetSpotOuterAngle ( mmachine  m)

SO3LightGetSpotOuterAngle : Get the spot outer angle of a spot light.

Prototype: fun [SO3_OBJECT] F

Parameters
SO3_OBJECT: current light
Returns
F : outer angle value if success , NIL otherwise

Definition at line 1164 of file SCOLLight.cpp.

◆ SO3LightGetType()

int SO3LightGetType ( mmachine  m)

SO3LightGetType : Returns the type of light.

Prototype: fun [SO3_OBJECT] I

Parameters
SO3_OBJECT: current light
Returns
I : Type if success , NIL otherwise

For type, values are :

  • SO3_POINT_LIGHT
  • SO3_DIRECTIONAL_LIGHT
  • SO3_SPOT_LIGHT
  • SO3_RECT_LIGHT

Definition at line 157 of file SCOLLight.cpp.

◆ SO3LightGetVisible()

int SO3LightGetVisible ( mmachine  m)

SO3LightGetVisible : Get the visibility state of a light.

Prototype: fun [SO3_OBJECT] I

Parameters
SO3_OBJECT: current light
Returns
I : visibility state (1 enable, 0 disable) if success , NIL otherwise

Definition at line 509 of file SCOLLight.cpp.

◆ SO3LightGetVolumetric()

int SO3LightGetVolumetric ( mmachine  m)

SO3LightGetVolumetric : Get the volumetric state of a light.

Prototype: fun [SO3_OBJECT] I

Parameters
SO3_OBJECT: current light
Returns
I : volumetric state (1 enable, 0 disable) if success , NIL otherwise

Definition at line 604 of file SCOLLight.cpp.

◆ SO3LightSetAttenuation()

int SO3LightSetAttenuation ( mmachine  m)

SO3LightSetAttenuation : defines attenuation coefficients for a light.

Prototype: fun [SO3_OBJECT [F F F F]] I

Parameters
SO3_OBJECT: current light
[FF F F] : Coefficient (range, constant, linear, quadratic)
Returns
I : 1 if success , NIL otherwise

Definition at line 652 of file SCOLLight.cpp.

◆ SO3LightSetAttenuationAuto()

int SO3LightSetAttenuationAuto ( mmachine  m)

SO3LightSetAttenuationAuto : defines attenuation coefficients for a light automatically, from given range.

Prototype: fun [SO3_OBJECT F] I

Parameters
SO3_OBJECT: current light
F: Light propagation range
Returns
I : 1 if success , NIL otherwise

Definition at line 700 of file SCOLLight.cpp.

◆ SO3LightSetDiffuseColor()

int SO3LightSetDiffuseColor ( mmachine  m)

SO3LightSetDiffuseColor : defines diffuse color of a light.

Prototype: fun [SO3_OBJECT I] I

Parameters
SO3_OBJECT: current light
I: Color value (rgba)
Returns
I : 1 if success , NIL otherwise

Definition at line 201 of file SCOLLight.cpp.

◆ SO3LightSetPowerScale()

int SO3LightSetPowerScale ( mmachine  m)

SO3LightSetPowerScale : defines power scale of a light.

Prototype: fun [SO3_OBJECT F] I

Parameters
SO3_OBJECT: current light
F:Power scale value
Returns
I : 1 if success , NIL otherwise

Definition at line 286 of file SCOLLight.cpp.

◆ SO3LightSetShadowFarDistance()

int SO3LightSetShadowFarDistance ( mmachine  m)

SO3LightSetShadowFarDistance : defines shadows far distance of a light.

Prototype: fun [SO3_OBJECT F] I

Parameters
SO3_OBJECT: current light
F: Distance
Returns
I : 1 if success , NIL otherwise

Definition at line 331 of file SCOLLight.cpp.

◆ SO3LightSetSourceSize()

int SO3LightSetSourceSize ( mmachine  m)

SO3LightSetSourceSize : defines the source size of a rect light.

Prototype: fun [SO3_OBJECT [F F]] I

Parameters
SO3_OBJECT: current light
[FF] : size x y
Returns
I : 1 if success , NIL otherwise

Definition at line 1208 of file SCOLLight.cpp.

◆ SO3LightSetSpecularColor()

int SO3LightSetSpecularColor ( mmachine  m)

SO3LightSetSpecularColor : defines specular color of a light.

Prototype: fun [SO3_OBJECT I] I

Parameters
SO3_OBJECT: current light
I: Given color (rgba)
Returns
I : 1 if success , NIL otherwise

Definition at line 799 of file SCOLLight.cpp.

◆ SO3LightSetSpotFallOff()

int SO3LightSetSpotFallOff ( mmachine  m)

SO3LightSetSpotFallOff : defines spot fall off of a spot light.

Prototype: fun [SO3_OBJECT F] I

Parameters
SO3_OBJECT: current light
F: fall off value
Returns
I : 1 if success , NIL otherwise

Definition at line 888 of file SCOLLight.cpp.

◆ SO3LightSetSpotInnerAngle()

int SO3LightSetSpotInnerAngle ( mmachine  m)

SO3LightSetSpotInnerAngle : defines spot inner angle of a spot light.

Prototype: fun [SO3_OBJECT F] I

Parameters
SO3_OBJECT: current light
F: inner angle value
Returns
I : 1 if success , NIL otherwise

Definition at line 976 of file SCOLLight.cpp.

◆ SO3LightSetSpotOuterAngle()

int SO3LightSetSpotOuterAngle ( mmachine  m)

SO3LightSetSpotOuterAngle : defines spot outer angle of a spot light.

Prototype: fun [SO3_OBJECT F] I

Parameters
SO3_OBJECT: current light
F: outer angle value
Returns
I : 1 if success , NIL otherwise

Definition at line 1022 of file SCOLLight.cpp.

◆ SO3LightSetSpotRange()

int SO3LightSetSpotRange ( mmachine  m)

SO3LightSetSpotRange : defines spot range of a spot light.

Prototype: fun [SO3_OBJECT [F F F]] I

Parameters
SO3_OBJECT: current light
[FF F] : inner, outer angle and fallof
Returns
I : 1 if success , NIL otherwise

Definition at line 1068 of file SCOLLight.cpp.

◆ SO3LightSetType()

int SO3LightSetType ( mmachine  m)

SO3LightSetType : Defines the type of light.

Prototype: fun [SO3_OBJECT I] I

Parameters
SO3_OBJECT: current light
I: Type

For type, values are :

  • SO3_POINT_LIGHT
  • SO3_DIRECTIONAL_LIGHT
  • SO3_SPOT_LIGHT
Returns
I : 1 if success , NIL otherwise

Definition at line 105 of file SCOLLight.cpp.

◆ SO3LightSetVisible()

int SO3LightSetVisible ( mmachine  m)

SO3LightSetVisible : defines visibility state of a light.

Prototype: fun [SO3_OBJECT I] I

Parameters
SO3_OBJECT: current light
I: visibility state (1 enable, 0 disable)
Returns
I : 1 if success , NIL otherwise

Definition at line 462 of file SCOLLight.cpp.

◆ SO3LightSetVolumetric()

int SO3LightSetVolumetric ( mmachine  m)

SO3LightSetVolumetric : defines if a light is displayed as a volumetric light.

Prototype: fun [SO3_OBJECT I] I

Parameters
SO3_OBJECT: current light
I: state (1 enable, 0 disable)
Returns
I : 1 if success , NIL otherwise

Definition at line 557 of file SCOLLight.cpp.