ContainsLight Objects - Lights 

Declaration:

FUNCTION   ContainsLight
( object:HANDLE ) :BOOLEAN ;

Description:

Function ContainsLight returns TRUE if the referenced object contains a light. This function works with container objects such as groups, symbols, layers, etc.

Parameters:

object Handle to object.



  CreateLight Objects - Lights 

Declaration:

FUNCTION   CreateLight
(   pXR :REAL;
    pYR :REAL;
    pZR :REAL;
    type :INTEGER;
    isOn :BOOLEAN;
    castShadow :BOOLEAN
) :HANDLE ;

Description:

CreateLight creates a new light object in the active VectorScript document.

A new light objects' color is defaulted to white, and brightness is defaulted to 75%.

Table - Light Types

Light Type Constant
Directional 0
Point 1
Spot 2


Parameters:

pXR X coordinate of new light.
pYR Y coordinate of new light.
pZR Z coordinate of new light.
type Light type.
isOn On-off status of light.
castShadow Specifies whether light will cast shadow.

Example:

CreateLight(2,3,8,1,TRUE,TRUE);



  GetBeamAngle Objects - Lights 

Declaration:

PROCEDURE   GetBeamAngle
(   h :HANDLE;
  VAR  beamAngleR :REAL
) ;

Description:

Procedure GetBeamAngle returns the spread angle of the referenced spot light.

Parameters:

h Handle to light.
beamAngleR Returns beam spread angle.



  GetLayerAmbientColor Objects - Lights 

Declaration:

PROCEDURE   GetLayerAmbientColor
(   layer :HANDLE;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Procedure GetLayerAmbientColor returns the color of the ambient light of the referenced layer.

Parameters:

layer Handle to layer.
red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.



  GetLayerAmbientInfo Objects - Lights 

Declaration:

PROCEDURE   GetLayerAmbientInfo
(   layer :HANDLE;
  VAR  isOn :BOOLEAN;
  VAR  brightness :INTEGER
) ;

Description:

Procedure GetLayerAmbientInfo returns the attribute values for the ambient light object of the referenced layer.

Parameters:

layer Handle to layer.
isOn On-off status of ambient light.
brightness Brightness of ambient light.



  GetLightColorRGB Objects - Lights 

Declaration:

PROCEDURE   GetLightColorRGB
(   light :HANDLE;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Procedure GetLightColorRGB returns the RGB color values for the referenced light object.

Parameters:

light Handle to light.
red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.



  GetLightDirection Objects - Lights 

Declaration:

PROCEDURE   GetLightDirection
(   h :HANDLE;
  VAR  panAngleR :REAL;
  VAR  tiltAngleR :REAL
) ;

Description:

Procedure GetLightDirection returns the direction angles of the referenced light object.

Parameters:

h Handle to light.
panAngleR Returns light pan angle.
tiltAngleR Returns light tilt angle.



  GetLightFalloff Objects - Lights 

Declaration:

PROCEDURE   GetLightFalloff
(   light :HANDLE;
  VAR  distFalloff :INTEGER;
  VAR  angFalloff :INTEGER
) ;

Description:

Procedure GetLightFalloff returns the fall off attributes for the referenced light object.

Table - Light Falloff Types

Falloff Type Constant
None 0
Normal 1
Smooth 2
Sharp 3

Parameters:

light Handle to light.
distFalloff Returns distance falloff value.
angFalloff Returns angular falloff value.



  GetLightInfo Objects - Lights 

Declaration:

PROCEDURE   GetLightInfo
(   h :HANDLE;
  VAR  type :INTEGER;
  VAR  brightness :INTEGER;
  VAR  isOn :BOOLEAN;
  VAR  castShadow :BOOLEAN
) ;

Description:

Procedure GetLightInfo returns the attributes of the referenced light object.

Table - Light Types

Light Type Constant
Directional 0
Point 1
Spot 2

Parameters:

h Handle to light.
type Returns light type.
brightness Returns light brightness.
isOn Returns on-off status of light.
castShadow Returns whether light casts shadows.

Example:





  GetLightLocation Objects - Lights 

Declaration:

PROCEDURE   GetLightLocation
(   h :HANDLE;
  VAR  pX :REAL;
  VAR  pY :REAL;
  VAR  pZ :REAL
) ;

Description:

Procedure GetLightLocation returns the position of the referenced light object.

Parameters:

h Handle to light.
p Returns coordinate location of light.



  GetSpreadAngle Objects - Lights 

Declaration:

PROCEDURE   GetSpreadAngle
(   h :HANDLE;
  VAR  spreadAngleR :REAL
) ;

Description:

Procedure GetSpreadAngle returns the spread angle of the referenced spot light.

Parameters:

h Handle to light.
spreadAngleR Returns spread angle of light.



  SetBeamAngle Objects - Lights 

Declaration:

PROCEDURE   SetBeamAngle
(   h :HANDLE;
    beamAngleR :REAL
) ;

Description:

Procedure SetBeamAngle sets the spread angle of the referenced spot light.

Parameters:

h Handle to light.
beamAngleR Beam angle of light.

Example:





  SetLayerAmbientColor Objects - Lights 

Declaration:

PROCEDURE   SetLayerAmbientColor
(   layer :HANDLE;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) ;

Description:

Procedure SetLayerAmbientColor sets the color for the ambient light of the referenced layer.

Parameters:

layer Handle to layer.
red RGB color component value.
green RGB color component value.
blue RGB color component value.



  SetLayerAmbientInfo Objects - Lights 

Declaration:

PROCEDURE   SetLayerAmbientInfo
(   layer :HANDLE;
    isOn :BOOLEAN;
    brightness :INTEGER
) ;

Description:

Procedure SetLayerAmbientInfo sets the attribute values for the ambient light object of the referenced layer.

Parameters:

layer Handle to layer.
isOn On-off status of ambient light
brightness Brightness of ambient light.



  SetLightColorRGB Objects - Lights 

Declaration:

PROCEDURE   SetLightColorRGB
(   light :HANDLE;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) ;

Description:

Procedure SetLightColorRGB sets the RGB color values for the referenced light object.

Parameters:

light Handle to light.
red RGB color component value.
green RGB color component value.
blue RGB color component value.



  SetLightDirection Objects - Lights 

Declaration:

PROCEDURE   SetLightDirection
(   h :HANDLE;
    panAngleR :REAL;
    tiltAngleR :REAL
) ;

Description:

Procedure SetLightDirection sets the direction angles of the referenced light object.

Parameters:

h Handle to light.
panAngleR Pan angle of light.
tiltAngleR Tilt angle of light.



  SetLightFalloff Objects - Lights 

Declaration:

PROCEDURE   SetLightFalloff
(   light :HANDLE;
    distFalloff :INTEGER;
    angFalloff :INTEGER
) ;

Description:

Procedure SetLightFalloff sets the fall off attributes for the referenced light object.

Table - Light Falloff Types

Falloff Type Constant
None 0
Normal 1
Smooth 2
Sharp 3

Parameters:

light Handle to light.
distFalloff Distance falloff value.
angFalloff Angular falloff value.



  SetLightInfo Objects - Lights 

Declaration:

PROCEDURE   SetLightInfo
(   h :HANDLE;
    type :INTEGER;
    brightness :INTEGER;
    isOn :BOOLEAN;
    castShadow :BOOLEAN
) ;

Description:

Sets the attributes of the referenced light object.

Parameters:

h Handle to light.
type Light type.
brightness Brightness of light.
isOn On-off status of light.
castShadow Shadow casting status of light.

Example:





  SetLightLocation Objects - Lights 

Declaration:

PROCEDURE   SetLightLocation
(   h :HANDLE;
    pX :REAL;
    pY :REAL;
    zValue :REAL
) ;

Description:

Procedure SetLightLocation sets the location of the referenced light object.

Parameters:

h Handle to light.
p X-Y coordinate location of light.
zValue Elevation of light.

Example:





  SetSpreadAngle Objects - Lights 

Declaration:

PROCEDURE   SetSpreadAngle
(   h :HANDLE;
    spreadAngleR :REAL
) ;

Description:

Procedure SetSpreadAngle sets the spread angle of the light object. If the light type is not a spot light, the procedure has no effect on the light.

Parameters:

h Handle to light.
spreadAngleR Beam spread angle of light.