Plot3D Object Metaclass


Overview

Plot3D is the base class for all the 3D plot objects that can be created by a Chart object. This class is a metaclass and it will never be instantiated. Its only purpose is to define the set of resources common to all 3D plot objects.

Rotation, Translation and Scaling

Objects based on the Plot3D class can be rotation, scaled and translated interactively. The EditObject widget class supports a set of three actions, Transform3DStart, Transform3D and Transform3DEnd that are used to specify how to interact with 3D objects. The default translation associated with those actions is as followed:

Event SequenceActionDescription
Ctrl <Btn3Down>Transform3DStart(scale)Start scaling 3D object.
Shift <Btn3Down>Transform3DStart(shift)Start translating 3D object.
None <Btn3Down>Transform3DStart(rotate)Start rotating 3D object.
<Btn3Motion>Transform3D()Execute transformation while mouse is moving.
<Btn3Up>Transform3DEnd()End transformation and redraw object.

See the EditObject Widget Class reference section for a complete description of those actions.


Inherited Behavior and Resources

The Plot3D object class inherits behavior and resources from the Xt Object, Graphic and Group.

The following resources are defined by the Plot3D object class:
NameTypeDefaultAccess
XmN3dPerspectiveDepthint0CSG
XmN3dRotationXint3DRotation *{45., 0., 45.}CS
XmN3dScaleXint3DScale{1., 1., 1.}CSG
XmNannotationStrokeFontintXintSIMPLEX_ROMANCSG
XmNannotationStrokeFontSizeint40CSG
XmNlabelStrokeFontintXintCOMPLEX_ROMANCSG
XmNlabelStrokeFontSizeint50CSG
XmNviewScaleint100CSG
XmNxAnnotationBooleanTrueCSG
XmNyAnnotationBooleanTrueCSG
XmNzAnnotationBooleanTrueCSG
XmNxAnnotationFormatchar *"%.0f"CSG
XmNyAnnotationFormatchar *"%.0f"CSG
XmNzAnnotationFormatchar *"%.0f"CSG
XmNxAxisOffsetint0CSG
XmNyAxisOffsetint0CSG
XmNzAxisOffsetint0CSG
XmNxGridLinesintXintXY_PLANE+
XintXZ_PLANE
CSG
XmNyGridLinesintXintXY_PLANE+
XintYZ_PLANE
CSG
XmNzGridLinesintXintXZ_PLANE+
XintYZ_PLANE
CSG
XmNxIncrementsXintIncrements *NULLCSG
XmNyIncrementsXintIncrements *NULLCSG
XmNzIncrementsXintIncrements *NULLCSG
XmNxLabelStringNULLCSG
XmNyLabelStringNULLCSG
XmNzLabelStringNULLCSG
XmNxLimitsXintLimits *NULLCSG
XmNyLimitsXintLimits *NULLCSG
XmNzLimitsXintLimits *NULLCSG
XmNxTranslationint0CSG
XmNyTranslationint0CSG
XmNwallColorPixel"light grey"CSG


XmN3dPerspectiveDepth

Specifies the distance from the eye to the object as a percentage of the object size. The distance must be a positive integer greater or equal to 200, which corresponds to a distance equal to twice the object size. You can also specify 0 to obtain a parallel projection (distance from object is infinite).

XmN3dRotation

Specifies the clockwise rotation in degrees along the X, Y and Z directions. This resource is specified as a pointer to a data structure of type Xint3DRotation which takes the following form:

   typedef struct {
                   float x_angle;
                   float y_angle;
                   float z_angle;
   } Xint3DRotation;


XmN3dScale

Specifies the scale to apply along the X, Y and Z directions. This resource is specified as a pointer to a data structure of type Xint3DScale which takes the following form:

   typedef struct {
                   float x_scale;
                   float y_scale;
                   float z_scale;
   } Xint3DScale;


XmNannotationStrokeFont

Specifies the font used to draw the annotation. You can specify one of the following constants:

Resource ValueDescription
XintSIMPLEX_ROMAN (default)Use a simplex stroke font.
XintCOMPLEX_ROMANUse a complex stroke font.
XintTRIPLEX_ROMANUse a triplex stroke font.
XintCOMPLEX_GREEKUse a complex greek stroke font.


XmNannotationStrokeFontSize

Specifies the size of the font used to draw the axis annotation. The size is measured in thousandths of the unit cube size.

XmNlabelStrokeFont

Specifies the font used to draw the axis labels. You can specify one of the following constants:

Resource ValueDescription
XintSIMPLEX_ROMANUse a simplex stroke font.
XintCOMPLEX_ROMAN (default)Use a complex stroke font.
XintTRIPLEX_ROMANUse a triplex stroke font.
XintCOMPLEX_GREEKUse a complex greek stroke font.


XmNlabelStrokeFontSize

Specifies the size of the font used to draw the axis labels. The size is measured in thousandths of the unit cube size.

XmNviewScale

Specifies the scale to apply to the 3D plot as a percentage of the initial size. You must specify a positive integer value.

XmN[xyz]Annotation

Specifies whether or not to display the axis annotation.

XmN[xyz]AnnotationFormat

Specifies the format used to draw the annotation. Use any C format descriptor (e.g. "%2.5f") suitable for displaying floating point data. Resource XmNzAnnotationFormat is also used to specify the legend annotation format for the Surface3D subclass.

XmN[xyz]AxisOffset

Specifies an offset corresponding to a space to leave on either side of the axis in the specified direction. The offset size is measured in thousandths of the unit cube size.

XmN[xyz]GridLines

Specifies which grid lines to draw. You can specify one or a combination of 2 (by adding them together) of the following constants:

Resource ValueDescription
XintXY_PLANEDraw grid lines in the XY plane.
XintXZ_PLANEDraw grid lines in the XZ plane.
XintYZ_PLANEDraw grid lines in the YZ plane.

For example, to have all X grid lines drawn, specify XintXY_PLANE+XintXZ_PLANE for resource XmNxGridLines.


XmN[xyz]Increments

Specifies the major and minor increment for the axis along the X (Y or Z) direction. If you don't specify this resource, the axis major and minor increment are calculated automatically based on the range of the data.

These resources are specified as a pointer to a data structure of type XintIncrements which takes the following form:

   typedef struct {
                   float major_increment;
                   float minor_increment;
   } XintIncrements;


XmN[xyz]Label

Specifies the X (Y or Z) label displayed next to the corresponding axis. Specify NULL to have no label displayed.

XmN[xyz]Limits

Specifies the axis range along the specified direction. If you don't specify anything for this value, the axis range will be set to the minimum and maximum in the specified direction. This resource is specified as a pointer to a data structure of type XintLimits which takes the following form:

   typedef struct {
                   float minimum;
                   float maximum;
   } XintLimits;


XmN[xy]Translation

Specifies the translation in the X (Y) direction in pixel units.

XmNwallColor

Specifies the color, as a pixel value, used to draw the wall behind 3D plots such as Surface or Bar3D.