intrinsic-171 Set3DLights

Top  Previous  Next

171: Set3DLights(Index, Enable, Mode, X, Y, Z, Color);

 

This intrinsic controls the lighting for the 3D Viewer. The 3D Viewer has a total of eight light sources, each of which can be configured according to mode, color, and position.

 

Arguments:

 

Index. This argument is an integer that specifies which of the lights the intrinsic call is operating on. The value should be 0 through 7.

 

Mode. This argument is an integer that sets the mode for the light. The following modes are available:

 

0 = Point. This mode creates a point source that radiates light in all directions.

1 = Spot. This mode creates a directional light source that radiates a beam that diverges at a 15 degree angle.

2 = Directional. This mode creates a directional source that radiates parallel light throughout the scene.

 

X,Y,Z. These arguments are real numbers that specify a 3D vector whose meaning changes depending on the mode. If the light is in Point-Mode, the values represent the position of the point. If the light is Spot-mode or Directional-mode, the values represent a vector that is the direction of the light beam.

 

 

Color: This is an integer value that specifies the RGB Color of the light.