CNiGraph3D

3D Graph

Class CNiGraph3D Base ClassesData ItemsConstructorsDestructorsFunctionsGo to hierarchy chart    Prev page: ValidateControlNext page: AmbientLightColor    
Class Declared in:
NiGraph3d.h

'Overview' icon -- Shortcut to top of page. Overview

CNiGraph3D encapsulates the interface to the Measurement Studio ActiveX 3D graph control, which allows you to plot three-dimensional data.

CNiGraph3D is capable of responding to events that are generated by the control. For a list of the events that can be generated by this control and details on how to respond to the events in your program, refer to the Graph3D Events page.

Features

  • Multiple plot styles: point-line, line-point, hidden-line, contour, surface, surface-line, surface-contour, and surface-normal.
  • Multiple plots with individual properties such as name, line and point style, width, and base value.
  • Configurable axes, including customizable ticks, labels, value pairs, and captions.
  • Legends
  • Cartesian, cylindrical, and spherical coordinate systems.
  • Color maps.
  • Transparency
  • Plane projections.
  • Orthographic and perspective viewing.
  • Lighting
  • Built-in format styles for labels including scientific, symbolic engineering, scaling, time, and date.
  • Rotation, panning and zooming at runtime. Panning is useful when the graph displays only a subset of the data that has been plotted. You can scroll through all data plotted on the graph, essentially shifting the graph's display to different portions of the plot.

Note: To specify a date/time value, you must convert your date or time value to a double. A date is implemented as a floating-point value with the integer part of the number measuring days from midnight, 30 December 1899, and the fractional part representing the time of day. The absolute value of the fractional part of the number represents the time as a fraction of a day. Thus, 1 second equals 1 / 24 hours / 60 minutes, which is 1/86400 or approximately 1.157407e-5. So, midnight, 31 December 1899, is represented by 1.0. Similarly, 6 AM, 1 January 1900, is represented by 2.25, and midnight, 29 December 1899, is -1.0. However, 6 AM, 29 December 1899, is -1.25.

Hierarchy Chart Hierarchy Chart

'Base Classes' icon -- Shortcut to top of page. Base Classes

'Data Items' icon -- Shortcut to top of page. Data Items

Public data CNiColor AmbientLightColor Specifies the ambient light color for the graph when lighting is enabled.
Public data CNiAxes3D Axes Gets a collection of axis objects associated with the control.
Public data CNiColor BackColor Specifies the color for the background of the caption.
Public data CString Caption Specifies the caption to be drawn on the graph.
Public data CNiColor CaptionColor Specifies the color of the caption.
Public data bool ClipData Specifies if the function should clip the displayed data.
Public data CNiCursors3D Cursors Gets a collection of 3D cursor objects associated with the control.
Public data bool Dither Specifies the dither mode of the graph.
Public data bool Enabled Specifies if the graph generates any events.
Public data bool FastDraw Specifies how the system draws the graph during interactive operations such as rotating, zooming, and panning.
Public data CNiFont Font Specifies the font for the caption.
Public data CNiColor GraphFrameColor Specifies the color for the graph frame.
Public data bool GraphFrameVisible Specifies if the graph frame is visible.
Public data CNiColor GridFrameColor Specifies the color of the grid frame.
Public data bool GridSmoothing Specifies the smoothing mode for grid lines.
Public data bool GridXY Draws the X-Y grid plane when true.
Public data bool GridXZ Draws the X-Z grid plane when true.
Public data bool GridYZ Draws the Y-Z grid plane when true.
Public data bool ImmediateUpdates Specifies if the graph draws new data as soon as it is available, or if the form refreshes the graph when it draws other controls.
Public data KeyboardModes KeyboardMode Specifies how the control handles keyboard input from the user.
Public data bool Lighting Enables graph lighting when true.
Public data CNiLights Lights Gets a collection of light objects associated with the control.
Public data CNiColor PlotAreaColor Specifies the background color of the plot area.
Public data CNiPlots3D Plots Gets a collection of 3D plot objects associated with the control.
Public data CNiPlot3D PlotTemplate Returns the 3D plot object to use as a template for new plots.
Public data ProjectionStyles ProjectionStyle Specifies the projection style of the graph.
Public data long ReadyState Returns the ready state.
Public data TrackModes TrackMode Determines the type of events generated and other automatic processing (for example, how the mouse interacts with the graph during run time).
Public data bool Use3DHardwareAcceleration Determines if the 3D graph control renders directly to the display adapter.
Public data bool ViewAutoDistance Specifies how the viewing distance is set.
Public data double ViewDistance Specifies the distance of the viewing position from the center of the view.
Public data double ViewLatitude Specifies the latitude of the viewing position.
Public data double ViewLongitude Specifies the longitude of the viewing position.
Public data ViewModes ViewMode Specifies the viewing position of the graph.
Public data double ViewXCenter Specify the X coordinates of the center of the view.
Public data double ViewYCenter Specify the Y coordinates of the center of the view.
Public data double ViewZCenter Specify the Z coordinates of the center of the view.
Public data bool Windowless Specifies if the control has a window.

'Constructors' icon -- Shortcut to top of page. Constructors

Protected constructor

CNiGraph3D( CNiInterface::ThreadAccess option = CNiInterface::MultipleThreadsWithCaching )

'Destructors' icon -- Shortcut to top of page. Destructors

Protected destructor

~CNiGraph3D()

'Functions' icon -- Shortcut to top of page. Functions

Public function void

AboutBox()

Displays the About Box for the control.
Public function void

ClearData()

Clears data in all plots.
Public function CNiPicture

ControlImage()

Returns an image of the entire control.
Protected function virtual BOOL

Create( LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL )

Creates the ActiveX control that is represented in the MFC program by this object.
Protected function BOOL

Create( LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL )

Creates the ActiveX control that is represented in the MFC program by this object.
Protected function BOOL

CreateControl( LPCTSTR lpszClass, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL )

Creates the ActiveX control that is represented in the MFC program by this object.
Protected function BOOL

CreateControl( REFCLSID clsid, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL )

Creates the ActiveX control that is represented in the MFC program by this object.
Public function void

ExportStyle( LPCTSTR FileName )

Exports the style of the control to a file.
Protected function static const CLSID &

GetClsid()

Returns the globally unique identifier (GUID) of the ActiveX control to which this class connects.
Protected function static const IID &

GetIid()

Returns the globally unique identifier (GUID) of the ActiveX interface to which this class connects.
Public function void

ImportStyle( LPCTSTR FileName )

Imports a previously exported style.
Public function void

Plot3DCurve( const CNiVector& x, const CNiVector& y, const CNiVector& z, const CNiVector& w )

Plots a set of vectors as a parametric curve plot.
Public function void

Plot3DCurve( const CNiVector& x, const CNiVector& y, const CNiVector& z )

Plots a set of vectors as a parametric curve plot.
Public function void

Plot3DMesh( const CNiVector& x, const CNiVector& y, const CNiVector& z, const CNiVector& w )

Plots three (or four) 1D arrays of data as a triangulated surface.
Public function void

Plot3DMesh( const CNiVector& x, const CNiVector& y, const CNiVector& z )

Plots three (or four) 1D arrays of data as a triangulated surface.
Public function void

Plot3DParametricSurface( const CNiMatrix& X, const CNiMatrix& Y, const CNiMatrix& Z, const CNiMatrix& W )

Plots a set of matrices as a parametric surface plot.
Public function void

Plot3DParametricSurface( const CNiMatrix& X, const CNiMatrix& Y, const CNiMatrix& Z )

Plots a set of matrices as a parametric surface plot.
Public function void

Plot3DSimpleSurface( const CNiMatrix& Z, const CNiMatrix& W )

Plots a matrix of data as a simple surface plot.
Public function void

Plot3DSimpleSurface( const CNiMatrix& Z )

Plots a matrix of data as a simple surface plot.
Public function void

Plot3DSurface( const CNiVector& x, const CNiVector& y, const CNiMatrix& Z, const CNiMatrix& W )

Plots a matrix of data as a surface plot.
Public function void

Plot3DSurface( const CNiVector& x, const CNiVector& y, const CNiMatrix& Z )

Plots a matrix of data as a surface plot.
Public function void

SetDefaultView()

Restores the default viewing parameters.
Protected function void

ValidateControl()

Validates the current state of the control.