ChartDirector 7.1 (C++ Edition)

SurfaceChart.setLighting


Usage

void setLighting(double ambientIntensity, double diffuseIntensity, double specularIntensity, double shininess);

Description

Sets the Phong lighting parameters for the front side of the surface.

The surface of a surface chart has two sides. The side that is facing the positive z direction of the plot region is the front side. The side that is facing the negative z direction of the plot region is the back side.

ChartDirector uses the Phong lighting model to adjust the brightness of the surface to make it look realistic. The light source is assumed to be from the direction of the viewer and is far away. The default lighting parameters for the front side are 0.5 for both ambient and diffuse reflections, 1 for specular reflection and 8 for shininess.

Arguments

ArgumentDefaultDescription
ambientIntensity(Mandatory)The ambient reflection coefficient of the Phong lighting model.
diffuseIntensity(Mandatory)The diffuse reflection coefficient of the Phong lighting model.
specularIntensity(Mandatory)The specular reflection coefficient of the Phong lighting model.
shininess(Mandatory)The shininess coefficient of the Phong lighting model.

Return Value

None