DGKC Control Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlDG Kernel Control
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Support
Skip Navigation Links Go to ActiveX docs Search Documentation


Light Sample

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 dialogue 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.

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 dialogue, which allows modification of menu items and adding / removing items.

The handler of MenuEvent demonstrates customisation of the default behaviour of a standalrd contest menu command.

See also: Sample list