KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
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

Implementation

Select your language:

C#

Visual Basic .NET

C++

Visual Basic