DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ComponentsDG Kernel Components
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
Open Source
Support
Skip Navigation Links Search Documentation


LowDim C# Sample

LowDim Sample demonstrates programming Point Set objects

See also C# .NET Samples, All samples

The application

By default the application loads LowDim.mdg with three points and per vertex colors. The form displays all properties of the set.

Changing the point count edit box and pressing Tab key adds or removes points to the set. Zoom ou tto see the new points. New points are created at the default location (0,0,0) and with default color.

Implementation

LowDimForm.Init() method obtains ISectionPointSet interface from the first ISection in the model and gets access to its Point Array by quirking it from the ISectionPointSet. and storing it in m_iArray2 variable. To retrieve coordinates of the points IMatrixData is obtained with a call to ISectionPointSet.GetPoints. IMatrixData implemented by the Color Array is obtained via ISectionPointSet.GetColors and stored into the m_iMatrixColor member.

LowDimForm::OnPointCountChanged() handles changes in size of the point array by adding or removing last points via m_iArray2.

All other operations are comparatively straightforward.