Transform class
The Transform class provides its subclasses with
the ability to handle coordinate transformations.
Synopsis
Header file: ncarg/hlu/Transform.h
Class name: transformClass
Class pointer: <Not referenceable>
Fortran class function: <Not referenceable>
Superclass: View
Composite classes: <None>
Resources
Local resources
+---------------------------------------------------------------+
| Transform Resource Set |
|---------------------------------------------------------------|
| NAME TYPE ACCESS |
| CLASS DEFAULT |
|===============================================================|
| tfDoNDCOverlay NhlTBoolean RCSG |
| TfDoNDCOverlay False |
|---------------------------------------------------------------|
| tfPlotManagerOn NhlTBoolean RCG |
| TfPlotManagerOn True |
+---------------------------------------------------------------+
Composite resources
The Transform object class has no composite class resources.
Superclass resources
For any Transform class object, you can set all
resources defined by the Transform class's
superclasses, including:
Description
Objects that belong to the Transform class are viewable
objects that support transformations between data
coordinate space and NDC space. A
Transform object may be called simply a transform.
Most Transform subclasses have their own specialized plot
elements that you can render by calling the object's Draw
method.
All subclasses of Transform include as a composite
class member at least one subclass of the Transformation class
to perform the forward and reverse transformations. There are
currently three Transformation classes available to the
subclasses of Transform:
- The LogLinTransformation provides transformations to and
from a linear or logarithmic coordinate space. Either or both coordinate
axes may be logarithmic.
- The IrregularTransformation provides
transformations to and from rectangular coordinate spaces where each
coordinate axis may be either irregularly spaced, linear, or logarithmic.
- The MapTransformation provides transformations to and from
any of 10 different standard map projections.
Subclasses of the Transform class may contain the PlotManager class as
a composite
class member. The PlotManager manages
annotations and data space overlays on behalf of the
transform. A transform instantiated
with an active PlotManager is is known as a plot object.
In addition to their specialized plot elements, objects belonging
to the Transform class have the ability to act as a
"canvas" for drawing arbitrary graphics primitives. You may specify
these primitives in data space using the NhlDataPolyline,
NhlDataPolygon,
and NhlDataPolymarker
routines or in NDC space using the routines NhlNDCPolyline,
NhlNDCPolygon,
and NhlNDCPolymarker.
When drawing in data space, lines between the points supplied as
parameters to the NhlDataPolyline and
NhlDataPolygon routines are rendered in the data
space: if the space is curved, these lines will be curved as
well.
These graphics primitive functions all operate in immediate
mode: they appear as part of the Workstation
output as soon as the functions execute. They are not part of
the object in the same sense as the object's plot elements since they
do not appear as a result of calling the object's
Draw method. Currently, there is no way to save these
primitives for later manipulation or reproduction.
Transform defines the following support functions:
-
NhlNDCToData
-
Given arrays containing the X and Y coordinates of points in NDC space,
the NhlNDCToData function returns arrays containing the
X and Y coordinates of the same points in data coordinate space.
-
NhlDataToNDC
-
Given arrays containing the X and Y coordinates of points in data
coordinate space, the NhlDataToNDC function returns
arrays containing the X and Y coordinates of the same points in NDC space.
-
NhlDataPolyline
-
Given arrays containing the X and Y coordinates of points in data
coordinate space, the NhlDataPolyine function outputs
an immediate-mode polyline connecting each of the points. Intermediate
points between the given points along the path of the line segments in
data space are sampled in order that the output polyline represents the path
of "straight" line segments in data space. The resulting polyline may therefore
appear curved in NDC space.
-
NhlNDCPolyline
-
Given arrays containing the X and Y coordinates of points in NDC space,
the NhlNDCPolyine function outputs an immediate-mode
polyline connecting each of the points.
-
NhlDataPolygon
-
Given arrays containing the X and Y coordinates of points in data
coordinate space, the NhlDataPolygon function outputs
an immediate-mode polygon consisting of a filled area and an optional edge
with the points at the vertices. Intermediate
points between the given points along the path of the line segments in
data space are sampled in order that the edges of the output polygon
represent the path
of "straight" line segments in data space. The resulting polygon may therefore
appear curved in NDC space.
-
NhlNDCPolygon
-
Given arrays containing the X and Y coordinates of points in NDC space,
the NhlNDCPolygon function outputs
an immediate-mode polygon consisting of a filled area and an optional edge
with the points at the vertices.
-
NhlDataPolymarker
-
Given arrays containing the X and Y coordinates of points in data
coordinate space, the NhlDataPolymarker function outputs
immediate-mode markers at each of the points.
-
NhlNDCPolymarker
-
Given arrays containing the X and Y coordinates of points in NDC space,
the NhlNDCPolymarker function outputs immediate-mode
markers at each of the points.
-
NhlIsTransform
-
This function just determines if a given object id identifies a
Transform class object.
The following support functions are used to add overlays
and annotations to plot objects, and also to remove them.
-
NhlAddOverlay
-
The NhlAddOverlay function adds transform as an
overlay of a base plot.
-
NhlRemoveOverlay
-
The NhlRemoveOverlay function removes an overlay
from a base plot.
-
NhlAddAnnotation
-
The NhlAddAnnotation function adds an arbitrary
user-created View object to a plot object as an
annotation, returning the id of a controlling
AnnoManager object.
-
NhlRemoveAnnotation
-
The NhlRemoveAnnotation function removes the association
between a user-created View object and the
plot object to which it belongs as an annotation.
It destroys the controlling AnnoManager object.
Status
See also
Copyright
Copyright 1987-1999 University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
NCAR Graphics is a registered trademark of the University
Corporation for Atmospheric Research.
Reference Manual Control Panel
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?
$Revision: 1.26 $ $Date: 1998/08/18 08:15:22 $