IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.

IG::Gr3d::VtkSurfacePlotBase Class Reference

Contains basic settings for various surface and contour plots. More...

Inheritance diagram for IG::Gr3d::VtkSurfacePlotBase:
Collaboration diagram for IG::Gr3d::VtkSurfacePlotBase:

List of all members.

Public Member Functions

 VtkSurfacePlotBase (VtkPlotter plotter)
 Constructor. Just calls base constructor with the same name.
void CreateCustomPlot ()
 Updates custom plots that have been accumulates since the last update (or since construction of the current plot object). For all primitives that have been added since the last update, actors are created and added to the plot. In this way, the current plotting settings (such as surface colors, line thickness, etc.) will take effect, and for primitives that are eventually added later, settings valid at that time will apply.
void CreateCustomPlotAndShow ()
void AddPoint (double x, double y, double z)
 Adds a point with specified coordinates to the set of graphic primitives that will be plotted when CreateCustomPlot is called. Current settings are used to define appearance of the added primitive.
void AddPoint (vec3 p)
 Adds a point with specified coordinates to the set of graphic primitives that will be plotted when CreateCustomPlot is called. Current settings are used to define appearance of the added primitive.
void AddPoints (params vec3[] points)
 Adds a set of points with specified coordinates to the set of graphic primitives that will be plotted when CreateCustomPlot is called. Current settings are used to define appearance of the added primitives.
void AddLine (double x1, double y1, double z1, double x2, double y2, double z2)
 Adds a line with specified endpoint coordinates to the set of graphic primitives that will be plotted when CreateCustomPlot is called. Current settings are used to define appearance of the added primitive.
void AddLine (vec3 p1, vec3 p2)
void AddLines (params vec3[] points)
void AddTriangle (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)
void AddTriangle (vec3 p1, vec3 p2, vec3 p3)
void AddTriangularStrip (params vec3[] points)
void AddQuadrilateral (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4)
void AddQuadrilateral (vec3 p1, vec3 p2, vec3 p3, vec3 p4)
void AddFilledTriangle (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)
void AddFilledTriangle (vec3 p1, vec3 p2, vec3 p3)
void AddFilledTriangularStrip (params vec3[] points)
void AddBorderedTriangle (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)
void AddBorderedTriangle (vec3 p1, vec3 p2, vec3 p3)
void AddBorderedTriangularStrip (params vec3[] points)
void AddFilledQuadrilateral (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4)
void AddFilledQuadrilateral (vec3 p1, vec3 p2, vec3 p3, vec3 p4)
void AddBorderedQuadrilateral (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4)
void AddBorderedQuadrilateral (vec3 p1, vec3 p2, vec3 p3, vec3 p4)

Public Attributes

double _pointColorOpacity = 1

Static Public Attributes

static string DefaultValuesFieldName = "values"
 Default name of the field that contains node values for plotted grids.
static bool DefaultLinesVisible = true
 Default value of the flag indicating whether lines and contours will be shown.
static double DefaultLineWidth = 2
 Default line thickness for new objects of this class.
static bool DefaultLineColorIsScaled = false
 Default value of the flag indicating whether lines are plotted in color scale, for new plot objects of this class. Value false means that constant color is used, true means that color scale is used.
static ColorScale DefaultLineColorScale = ColorScale.CreateGray(0,1)
 Default line color scale for new plot objects of this class.
static color DefaultLineColor = new color(0, 0, 1)
 Default line color for new objects of this class.
static bool DefaultSurfacesVisible = true
 Default value of the flag indicating whether surfaces will be shown.
static bool DefaultSurfaceColorIsScaled = true
 Default value of the flag indicated whether surfaces are plotted in color scale, for new plot objects of this class. Value false means that constant color is used, true means that color scale is used.
static ColorScale DefaultSurfaceColorScale
 Default surface color scale for new plot objects of this class.
static color DefaultSurfaceColor = new color(0.5, 0.75, 1.0)
 Default surface color for new objects of this class.
static bool DefaultPointsVisible = true
 Default value of the flag indicating whether points will be shown.
static double DefaultPointSize = 2
 Default point size for new objects of this class.
static bool DefaultPointColorIsScaled = false
 Default value of the flag indicated whether points are plotted in color scale, for new plot objects of this class. Value false means that constant color is used, true means that color scale is used.
static ColorScale DefaultPointColorScale = ColorScale.Create(-1, 1, new color(0.1, 0, 0.3), new color(1, 0.5, 0))
 Default point color scale for new plot objects of this class.
static color DefaultPointColor = new color(1, 0, 0)
 Default point color for new objects of this class.

Protected Member Functions

virtual void InvalidateSettingDependencies ()
 Invalidates things that are dependent on any settings. This function should be called anywhere seddings are changed.
void AddLineCell (double x1, double y1, double z1, double x2, double y2, double z2)
 Adds a line with specified endpoint coordinates to the array of line cells.
void AddSurfaceCell (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)
 Adds a triangular surface cell with specified vertex coordinates to the array of surface cells.
void AddSurfaceCell (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4)
 Adds a quadrilateral surface cell with specified vertex coordinates to the array of quadrilateral cells.
void AddPointCell (double x1, double y1, double z1)
 Adds a triangular point cell with specified point coordinates to the array of point cells. A triangular cell is added with coordinates of all three vertices being the same.

Properties

bool LinesVisible [get, set]
 Whether line objects are shown in plots or not.
double LineWidth [get, set]
 Line thickness used in plots.
bool LineColorIsScaled [get, set]
 Whether a color scale is used for coloring lines (value true) or a fixed color is used (value false).
ColorScale LineColorScale [get, set]
 Color scale used for plotting lines (when the flag LineColorIsScaled is true, otherwise fixed LineColor is uesd).
color LineColor [get, set]
 Color used for lines (when the flag LineColorIsScaled is false, otherwise LineColorScale is uesd that depends on values assigned to line endpoints).
double LineColorOpacity [get, set]
 Opacity of lines.
bool SurfacesVisible [get, set]
 Whether surface objects are shown in plots or not.
bool SurfaceColorIsScaled [get, set]
 Whether a color scale is used for coloring surfaces (value true) or a fixed color is used (value false).
ColorScale SurfaceColorScale [get, set]
 Color scale used for plotting surfaces (when the flag SurfaceColorIsScaled is true, otherwise fixed SurfaceColor is uesd).
color SurfaceColor [get, set]
 Color used for surfaces (when the flag SurfaceColorIsScaled is false, otherwise SurfaceColorScale is uesd that depends on values assigned to surface endpoints).
double SurfaceColorOpacity [get, set]
 Opacity of surfaces.
bool PointsVisible [get, set]
 Whether point objects are shown in plots or not.
double PointSize [get, set]
 Point size used in plots.
bool PointColorIsScaled [get, set]
 Whether a color scale is used for coloring points (value true) or a fixed color is used (value false).
ColorScale PointColorScale [get, set]
 Color scale used for plotting points (when the flag PointColorIsScaled is true, otherwise fixed PointColor is uesd).
color PointColor [get, set]
 Color used for points (when the flag PointColorIsScaled is false, otherwise PointColorScale is uesd that depends on values assigned to points).
double PointColorOpacity [get, set]
 Opacity of points.

Private Member Functions

int AddLinePoint (double x, double y, double z)
 Adds a point with specified coordinates to the array of line endpoints and returns its index. Current point index is increased by one.
int AddSurfacePoint (double x, double y, double z)
 Adds a point with specified coordinates to the array of surface cell vertices and returns its index. Current point index is increased by one.
int AddPointPoint (double x, double y, double z)
 Adds a point with specified coordinates to the array of surface cell vertices and returns its index. Current point index is increased by one.

Private Attributes

bool _linesVisible = DefaultLinesVisible
double _lineWidth = DefaultLineWidth
bool _lineColorIsScaled = DefaultLineColorIsScaled
ColorScale _lineColorScale = DefaultLineColorScale
color _lineColor = DefaultLineColor
double _lineColorOpacity = -1
bool _surfacesVisible = DefaultSurfacesVisible
bool _surfaceColorIsScaled = DefaultSurfaceColorIsScaled
ColorScale _surfaceColorScale = DefaultSurfaceColorScale
color _surfaceColor = DefaultSurfaceColor
double _surfaceColorOpacity = -1
bool _pointsVisible = DefaultPointsVisible
double _pointSize = DefaultPointSize
bool _pointColorIsScaled = DefaultPointColorIsScaled
ColorScale _pointColorScale = DefaultPointColorScale
color _pointColor = DefaultPointColor
int _linePointIndex
vtkPoints _linePoints
vtkCellArray _lineCells
int _surfacePointIndex
vtkPoints _surfacePoints
vtkCellArray _surfaceCells
int _pointPointIndex
vtkPoints _pointPoints
vtkCellArray _pointCells

Detailed Description

Contains basic settings for various surface and contour plots.

This is used as base class for surface and contour plots.

Beside its basic function, the class also contains methods for plotting basic graphic primitives (points, lines, triangular and quadrilateral surface or wireframe patches, etc.).

Plotting of basic primitives is added on this class for convenience, such that minor custom graphics can simply be added on surface plots and contour plots. Aleernative and somewhat cleaner approach would be to include methods for plotting simple primitives in a derived class, but it is considered that letting surface and contour plot classes access this functionality is beneficial.

$A Igor xx Oct11;


Constructor & Destructor Documentation

IG::Gr3d::VtkSurfacePlotBase::VtkSurfacePlotBase ( VtkPlotter  plotter) [inline]

Constructor. Just calls base constructor with the same name.

Parameters:
plotterVTK plotter that is used for rendering graphics produeced by the current plotting class.

Member Function Documentation

virtual void IG::Gr3d::VtkSurfacePlotBase::InvalidateSettingDependencies ( ) [inline, protected, virtual]

Invalidates things that are dependent on any settings. This function should be called anywhere seddings are changed.

void IG::Gr3d::VtkSurfacePlotBase::CreateCustomPlot ( ) [inline]

Updates custom plots that have been accumulates since the last update (or since construction of the current plot object). For all primitives that have been added since the last update, actors are created and added to the plot. In this way, the current plotting settings (such as surface colors, line thickness, etc.) will take effect, and for primitives that are eventually added later, settings valid at that time will apply.

void IG::Gr3d::VtkSurfacePlotBase::CreateCustomPlotAndShow ( ) [inline]
int IG::Gr3d::VtkSurfacePlotBase::AddLinePoint ( double  x,
double  y,
double  z 
) [inline, private]

Adds a point with specified coordinates to the array of line endpoints and returns its index. Current point index is increased by one.

Parameters:
xX coordinate of the added point.
yY coordinate of the added point.
zZ coordinate of the added point.
Returns:
Index of the added pont on the list of points, which should be used when addressing the point when assembling line cells.
void IG::Gr3d::VtkSurfacePlotBase::AddLineCell ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2 
) [inline, protected]

Adds a line with specified endpoint coordinates to the array of line cells.

Parameters:
x1X coordinate of the first point.
y1Y coordinate of the first point.
z1Z coordinate of the first point.
x2X coordinate of the second point.
y2Y coordinate of the second point.
z2Z coordinate of the second point.
int IG::Gr3d::VtkSurfacePlotBase::AddSurfacePoint ( double  x,
double  y,
double  z 
) [inline, private]

Adds a point with specified coordinates to the array of surface cell vertices and returns its index. Current point index is increased by one.

Parameters:
xX coordinate of the added point.
yY coordinate of the added point.
zZ coordinate of the added point.
Returns:
Index of the added pont on the array of points, which should be used when addressing the point when assembling surface cells.
void IG::Gr3d::VtkSurfacePlotBase::AddSurfaceCell ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2,
double  x3,
double  y3,
double  z3 
) [inline, protected]

Adds a triangular surface cell with specified vertex coordinates to the array of surface cells.

Parameters:
x1X coordinate of the first point.
y1Y coordinate of the first point.
z1Z coordinate of the first point.
x2X coordinate of the second point.
y2Y coordinate of the second point.
z2Z coordinate of the second point.
x3X coordinate of the third point.
y3Y coordinate of the third point.
z3Z coordinate of the third point.
void IG::Gr3d::VtkSurfacePlotBase::AddSurfaceCell ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2,
double  x3,
double  y3,
double  z3,
double  x4,
double  y4,
double  z4 
) [inline, protected]

Adds a quadrilateral surface cell with specified vertex coordinates to the array of quadrilateral cells.

Parameters:
x1X coordinate of the first point.
y1Y coordinate of the first point.
z1Z coordinate of the first point.
x2X coordinate of the second point.
y2Y coordinate of the second point.
z2Z coordinate of the second point.
x3X coordinate of the third point.
y3Y coordinate of the third point.
z3Z coordinate of the third point.
x4X coordinate of the third point.
y4Y coordinate of the third point.
z4Z coordinate of the third point.
int IG::Gr3d::VtkSurfacePlotBase::AddPointPoint ( double  x,
double  y,
double  z 
) [inline, private]

Adds a point with specified coordinates to the array of surface cell vertices and returns its index. Current point index is increased by one.

Parameters:
xX coordinate of the added point.
yY coordinate of the added point.
zZ coordinate of the added point.
Returns:
Index of the added pont on the array of points, which should be used when addressing the point when assembling surface cells.
void IG::Gr3d::VtkSurfacePlotBase::AddPointCell ( double  x1,
double  y1,
double  z1 
) [inline, protected]

Adds a triangular point cell with specified point coordinates to the array of point cells. A triangular cell is added with coordinates of all three vertices being the same.

Parameters:
x1X coordinate of the point.
y1Y coordinate of the point.
z1Z coordinate of the point.
void IG::Gr3d::VtkSurfacePlotBase::AddPoint ( double  x,
double  y,
double  z 
) [inline]

Adds a point with specified coordinates to the set of graphic primitives that will be plotted when CreateCustomPlot is called. Current settings are used to define appearance of the added primitive.

Parameters:
xX coordinate of the point.
yY coordinate of the point.
zZ coordinate of the point.
void IG::Gr3d::VtkSurfacePlotBase::AddPoint ( vec3  p) [inline]

Adds a point with specified coordinates to the set of graphic primitives that will be plotted when CreateCustomPlot is called. Current settings are used to define appearance of the added primitive.

Parameters:
p3D vector of point coordinates.
void IG::Gr3d::VtkSurfacePlotBase::AddPoints ( params vec3[]  points) [inline]

Adds a set of points with specified coordinates to the set of graphic primitives that will be plotted when CreateCustomPlot is called. Current settings are used to define appearance of the added primitives.

Parameters:
points3D vectors of coordinates of the individual points.
void IG::Gr3d::VtkSurfacePlotBase::AddLine ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2 
) [inline]

Adds a line with specified endpoint coordinates to the set of graphic primitives that will be plotted when CreateCustomPlot is called. Current settings are used to define appearance of the added primitive.

Parameters:
x1X coordinate of the first endpoint.
y1Y coordinate of the first endpoint.
z1Z coordinate of the first endpoint.
x2X coordinate of the second endpoint.
y2Y coordinate of the second endpoint.
z2Z coordinate of the second endpoint.
void IG::Gr3d::VtkSurfacePlotBase::AddLine ( vec3  p1,
vec3  p2 
) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddLines ( params vec3[]  points) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddTriangle ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2,
double  x3,
double  y3,
double  z3 
) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddTriangle ( vec3  p1,
vec3  p2,
vec3  p3 
) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddTriangularStrip ( params vec3[]  points) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddQuadrilateral ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2,
double  x3,
double  y3,
double  z3,
double  x4,
double  y4,
double  z4 
) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddQuadrilateral ( vec3  p1,
vec3  p2,
vec3  p3,
vec3  p4 
) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddFilledTriangle ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2,
double  x3,
double  y3,
double  z3 
) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddFilledTriangle ( vec3  p1,
vec3  p2,
vec3  p3 
) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddFilledTriangularStrip ( params vec3[]  points) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddBorderedTriangle ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2,
double  x3,
double  y3,
double  z3 
) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddBorderedTriangle ( vec3  p1,
vec3  p2,
vec3  p3 
) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddBorderedTriangularStrip ( params vec3[]  points) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddFilledQuadrilateral ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2,
double  x3,
double  y3,
double  z3,
double  x4,
double  y4,
double  z4 
) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddFilledQuadrilateral ( vec3  p1,
vec3  p2,
vec3  p3,
vec3  p4 
) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddBorderedQuadrilateral ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2,
double  x3,
double  y3,
double  z3,
double  x4,
double  y4,
double  z4 
) [inline]
void IG::Gr3d::VtkSurfacePlotBase::AddBorderedQuadrilateral ( vec3  p1,
vec3  p2,
vec3  p3,
vec3  p4 
) [inline]

Member Data Documentation

Default name of the field that contains node values for plotted grids.

Default value of the flag indicating whether lines and contours will be shown.

Default line thickness for new objects of this class.

Default value of the flag indicating whether lines are plotted in color scale, for new plot objects of this class. Value false means that constant color is used, true means that color scale is used.

ColorScale IG::Gr3d::VtkSurfacePlotBase::DefaultLineColorScale = ColorScale.CreateGray(0,1) [static]

Default line color scale for new plot objects of this class.

Default line color for new objects of this class.

Default value of the flag indicating whether surfaces will be shown.

Default value of the flag indicated whether surfaces are plotted in color scale, for new plot objects of this class. Value false means that constant color is used, true means that color scale is used.

Initial value:
 ColorScale.Create(0, 1,
            System.Drawing.Color.DarkBlue, System.Drawing.Color.Green, System.Drawing.Color.Red, System.Drawing.Color.Yellow)

Default surface color scale for new plot objects of this class.

Default surface color for new objects of this class.

Default value of the flag indicating whether points will be shown.

Default point size for new objects of this class.

Default value of the flag indicated whether points are plotted in color scale, for new plot objects of this class. Value false means that constant color is used, true means that color scale is used.

ColorScale IG::Gr3d::VtkSurfacePlotBase::DefaultPointColorScale = ColorScale.Create(-1, 1, new color(0.1, 0, 0.3), new color(1, 0.5, 0)) [static]

Default point color scale for new plot objects of this class.

Default point color for new objects of this class.


Property Documentation

bool IG::Gr3d::VtkSurfacePlotBase::LinesVisible [get, set]

Whether line objects are shown in plots or not.

double IG::Gr3d::VtkSurfacePlotBase::LineWidth [get, set]

Line thickness used in plots.

bool IG::Gr3d::VtkSurfacePlotBase::LineColorIsScaled [get, set]

Whether a color scale is used for coloring lines (value true) or a fixed color is used (value false).

ColorScale IG::Gr3d::VtkSurfacePlotBase::LineColorScale [get, set]

Color scale used for plotting lines (when the flag LineColorIsScaled is true, otherwise fixed LineColor is uesd).

color IG::Gr3d::VtkSurfacePlotBase::LineColor [get, set]

Color used for lines (when the flag LineColorIsScaled is false, otherwise LineColorScale is uesd that depends on values assigned to line endpoints).

double IG::Gr3d::VtkSurfacePlotBase::LineColorOpacity [get, set]

Opacity of lines.

If this property is not set separately then the opacity of LineColor is returned by getter.

Once this property is set, even when setitng a new value for LineColor property, the opacity on this property will be overridden by the value that has been set specially.

This property is unset by setting it to a negative value.

bool IG::Gr3d::VtkSurfacePlotBase::SurfacesVisible [get, set]

Whether surface objects are shown in plots or not.

bool IG::Gr3d::VtkSurfacePlotBase::SurfaceColorIsScaled [get, set]

Whether a color scale is used for coloring surfaces (value true) or a fixed color is used (value false).

ColorScale IG::Gr3d::VtkSurfacePlotBase::SurfaceColorScale [get, set]

Color scale used for plotting surfaces (when the flag SurfaceColorIsScaled is true, otherwise fixed SurfaceColor is uesd).

color IG::Gr3d::VtkSurfacePlotBase::SurfaceColor [get, set]

Color used for surfaces (when the flag SurfaceColorIsScaled is false, otherwise SurfaceColorScale is uesd that depends on values assigned to surface endpoints).

double IG::Gr3d::VtkSurfacePlotBase::SurfaceColorOpacity [get, set]

Opacity of surfaces.

If this property is not set separately then the opacity of SurfaceColor is returned by getter.

Once this property is set, even when setitng a new value for SurfaceColor property, the opacity on that property will be overridden by the value that has been set specially.

This property is unset by setting it to a negative value.

bool IG::Gr3d::VtkSurfacePlotBase::PointsVisible [get, set]

Whether point objects are shown in plots or not.

double IG::Gr3d::VtkSurfacePlotBase::PointSize [get, set]

Point size used in plots.

bool IG::Gr3d::VtkSurfacePlotBase::PointColorIsScaled [get, set]

Whether a color scale is used for coloring points (value true) or a fixed color is used (value false).

ColorScale IG::Gr3d::VtkSurfacePlotBase::PointColorScale [get, set]

Color scale used for plotting points (when the flag PointColorIsScaled is true, otherwise fixed PointColor is uesd).

color IG::Gr3d::VtkSurfacePlotBase::PointColor [get, set]

Color used for points (when the flag PointColorIsScaled is false, otherwise PointColorScale is uesd that depends on values assigned to points).

double IG::Gr3d::VtkSurfacePlotBase::PointColorOpacity [get, set]

Opacity of points.

If this property is not set separately then the opacity of PointColor is returned by getter.

Once this property is set, even when setitng a new value for PointColor property, the opacity on that property will be overridden by the value that has been set specially.

This property is unset by setting it to a negative value.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties Events