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


Clip C++ Sample

Source code for Clip sample is available in Samples\VC folder of the installation directory.

Clip is a simple application, which demonstrates programming of Clipping Planes.

The application  

Description

Implementation

All DG Kernel related code is contained in the ClipDlg class. Location and orientation of the plane are controlled via IAxis interface queried form ISection of the Cone.

The only non-trivial part is the implementation of sharing. It is implemented in ClipDlg::OnCheckShare().handler. Call to IClipPlane::Share makes the plane global and available for use by any other object in the model. IClipPlane::UseShared called for clipping planes of both Cylinder and Box objects force the shared plane to be used as the first plane of the objects.

See also: All samples