00001 /*
00002 File: Plot2D.h
00003
00004 Function: Defines a scene object which provides a 2D plot of a given
00005 function. Currently only over a rectangular domain.
00006
00007 Author(s): Andrew Willmott
00008
00009 Copyright: (c) 1995-2000, Andrew Willmott
00010 */
00011
00012 #ifndef __Plot2D__
00013 #define __Plot2D__
00014
00015 #include "gcl/SceneObjects.h"
00016
00017 enum PlotType
00018 {
00019 plotStep, // sample in the middle of each cell
00020 plotSmoothed, // sample in the middle of each cell, and interpolate
00021 plotVertex // samples are at the vertices of cells
00022 };
00023
00024 class scPlot2D : public scPrimitive
00025 {
00026 public:
00027
00028 scPlot2D();
00029
00030 Void Draw(Renderer &r, SLContext *context);
00031 StrConst Label() const;
00032
00033 Object *Clone() const { return new scPlot2D(*this); };
00034
00035 GCLMat samples;
00036 PlotType plotType;
00037 };
00038
00039
00040 #endif
00041