RenderWare V2.1

Previous Page Index Next Page

RwLight *

RwCreateLight(RwLightType type, RwReal x, RwReal y, RwReal z,
RwReal intensity);

Description

Creates a new light. The light is added to the default scene.

Arguments

type Type of light.

x X component of the light’s position in world space coordinates (for point and conical lights), or vector (for directional lights).

y Y component of the light’s position in world space coordinates (for point and conical lights), or vector (for directional lights).

z Z component of the light’s position in world space coordinates (for point and conical lights), or vector (for directional lights).

intensity Intensity of the light in the range CREAL(0.0) to CREAL(1.0).

Return Value

A pointer to the new light if successful, and NULL otherwise.

Comments

The default light state is rwON.

For conical lights, the default direction vector is down the negative Y axis, and the default cone angle is CREAL(30.0) degrees.

See Also

RwAddLightToScene()

RwDestroyLight()

RwDuplicateLight()