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 ViewsViews
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


Materials

Surfaces of real objects have different color and reflective properties. Metal is shiny, unpolished wood is not. To model different types of surfaces, every entity has Material property.

A material keeps three colors in RGB format and one float number - shininess. The three colors are 

Ambient color - component of ambient light, which the surface reflects. Ambient light is the light, which scattered in the environment.

Diffuse color - component of diffuse light, which the surface reflects. Diffuse color comes from particular direction, most often from a light source but scattered in all directions equally. Diffuse light reflects with most intensity when it comes squarely down on the surface. 

Specular color is the color which comes from particular direction and is reflected in a preferred direction, thus creating spotlights.

Each color is represented by three numbers of float type in range 0.0 to 1.0 for Red, Green and Blue components. 

Shininess of the material represented by single float number in range 0.0 to 128.0. The higher the value is, the smaller and brighter are highlights on the surface.

To model materials with a specific pattern on the surface like wood or brick textures can be used.    

In DGKernel Control properties of the material can be modified using IMaterial_DG interface.

LightingEnabled property of a material determines whether lighting of the scene will be taken into acount during rendering of the surface

Wire frame related properties

UseForWire is true, color of the material will be used for wires rendered in wireframe rendering mode.

WireFrameColor (black the default) property determines color of the wires rendered in wireframe rendering mode

UseGlobalWireColor is true, color of the wires is determined by the 'global' wire color maintained as the WireColor color (id = 4) property of the Component Context.