![]() |
CNiPlots3D | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Class |
Declared in: NiPlots3d.h |
Overview
CNiPlots3D encapsulates the interface to the Plots property of a CNiGraph3D object, which allows you to access and remove plots associated with the 3D graph control.
- Use the CNiGraph3D::Plots property to obtain the plots collection for the graph.
- Use the Add function to create additional plots. Add returns a CNiPlot3D object, which represents the new plot.
- Use the Item function to access existing plots in the collection. This function can access plots by either name or index.
- Use the Remove function to remove existing plots from the collection. This function can access plots by either name or index.
- Use the RemoveAll function to remove all plots from the graph.
Base Classes
Data Items
![]() |
short | Count | Returns the number of plots in the collection. |
Constructors
![]() |
Default constructor. | ||
![]() |
CNiPlots3D( CWPlots3D_CI* pCustom, CNiInterface::ThreadAccess option ) |
Constructor that attaches to the specified CWPlots3D_CI pointer. | |
![]() |
CNiPlots3D( const CNiPlots3D& source ) |
Copy constructor. |
Destructors
Functions
![]() |
CNiPlot3D | Add() |
Adds a plot to the collection and returns the new plot. |
![]() |
static const IID & | GetIid() |
Returns the globally unique identifier (GUID) of the ActiveX interface to which this class connects. |
![]() |
CNiPlot3D | Item( long plotIndex ) |
Returns the specified plot from the collection. |
![]() |
CNiPlot3D | Returns the specified plot from the collection. | |
![]() |
const CNiPlots3D & | Assignment operator. | |
![]() |
void | Remove( long plotIndex ) |
Removes the specified plot from the collection. |
![]() |
void | Removes the specified plot from the collection. | |
![]() |
void | Removes all plots from the collection. |
Examples
1. Set the first plot in the graph to auto scale.
CNiGraph graph; CNiPlot3D plot = graph.Plots.Item(1); plot.AutoScale = true;
2. Set the point style on the first plot in the graph.
CNiGraph graph; graph.Plots.Item(1).PointStyle = CNiPlot3D::PointAsterisk;
3. Add a new plot to the graph.
CNiGraph graph; CNiPlot3D plot = graph.Plots.Add(); plot.FillToBase = true;
4. Remove all plots from the graph.
CNiGraph graph; graph.Plots.RemoveAll();
5. Change the name of the first plot to "Velocity".
CNiGraph graph; graph.Plots.Item(1).Name = "Velocity";
Subsequent accesses to the plot must now use "Velocity" as the item name. For example,
graph.Plots.Item("Velocity").Visible = true;