Design notes

Coordinating geometries

You have three choices in dealing with the coordinate view. First, all coordinates can be expressed in the global coordinate system which alleviates the need for a coordinate view entirely. It's important for you to note that coordinates are rarely expressed naturally in the global screen coordinate system. Typically, both the caller and the derived class (MSelectionMapping) would have to do conversions.

A second approach is to use a coordinate system specified as a parameter to each call to the MSelectionMapping object. This would force the derived class of MSelectionMapping to do internal coordinate conversions on every call.

A third approach is to have the MSelectionMapping object specify the coordinate system. This puts the burden on the caller because it has to use the MSelectionMapping's coordinate system. Because clients generally derive from MSelectionMapping many times and there is only one caller (the tool), Taligent Selection Tool uses the third approach and MSelectionMapping to determine its own coordinate system.

Single view for MSelectionMapping

To ease the burden on the caller, MSelectionMapping is given a view at creation time that can never be changed. The caller often makes consecutive calls to the mapping--its work would substantially increase if the coordinate view changed between calls. The nonvirtual GetMappingView function, and the lack of a function to set the variable, enforces the static view.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker