KernelCAD Documentation

DInsight Home
Skip Navigation Links. Skip Navigation LinksHome Page > Programming Samples and Tutorials > Overview > Light
Light Sample Overview

Light Sample

The Light sample demonstrates manipulation of light source array and manipulation of properties of a light source.

The sample also demonstrates customization of context menu and handling of its events.

Running the application 

Number of lights edit box dynamically adds or removes light sources. Current Light control allows selection of a source in the array of light sources for display and modification.

Source type radio buttons allow changing between directional (infinitely remote) source and a local one. 

Direction/Location edit group displays coordinates of the light source or direction where the light comes from.

Color dialog allows changing color of ambient and diffuse components of the current light source.

Enable Prospective View check box gives choice between Orthographic (default) and perspective view modes. In perspective mode objects, which are further from the viewer appear smaller on the screen, which makes relatively sparse or large scenes more realistic. See also IView2.Enable

On start the application disables changes to wireframe rendering. To synchronize this with the context menu the application also disables the relevant options in the menu.

Clearing "Enable Context Menu" check box stops the popup menu appearing on right mouse button clicks

Tools > "Modify Popup Menu" menu option displays a dialog, which allows modification of menu items and adding / removing items


Select your language:


Visual Basic .NET


Visual Basic