Ignore:
Timestamp:
Sep 21, 2011 2:27:44 PM (13 years ago)
Author:
gah
Message:

update from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/packages/vizservers/vtkvis/RpVtkDataSet.h

    r2409 r2542  
    1212#include <vtkDataSet.h>
    1313#include <vtkDataSetReader.h>
     14#include <vtkProp.h>
     15#include <vtkActor.h>
     16#include <vtkOutlineFilter.h>
     17#include <vtkPolyDataMapper.h>
    1418
    1519#include <string>
     
    2428class DataSet {
    2529public:
     30    enum PrincipalPlane {
     31        PLANE_XY,
     32        PLANE_ZY,
     33        PLANE_XZ
     34    };
    2635    DataSet(const std::string& name);
    2736    virtual ~DataSet();
     
    3746    vtkDataSet *copyData(vtkDataSet *ds);
    3847
    39     bool is2D() const;
     48    bool isXY() const;
     49
     50    int numDimensions() const;
     51
     52    bool is2D(PrincipalPlane *plane = NULL, double *offset = NULL) const;
     53
     54    PrincipalPlane principalPlane() const;
    4055
    4156    const std::string& getName() const;
     
    4762    bool setActiveScalars(const char *name);
    4863
     64    const char *getActiveScalarsName();
     65
    4966    bool setActiveVectors(const char *name);
    5067
    51     void getDataRange(double minmax[2]) const;
     68    const char *getActiveVectorsName();
    5269
    53     void getDataRange(double minmax[2], const char *fieldName) const;
     70    void getScalarRange(double minmax[2]) const;
    5471
    55     void getVectorMagnitudeRange(double minmax[2]) const;
     72    void getDataRange(double minmax[2], const char *fieldName, int component = -1) const;
    5673
    57     void getVectorComponentRange(double minmax[2], int component) const;
     74    void getVectorRange(double minmax[2], int component = -1) const;
    5875
    5976    void getBounds(double bounds[6]) const;
    6077
    61     double getDataValue(double x, double y, double z) const;
     78    void getCellSizeRange(double minmax[2], double *average);
     79
     80    bool getScalarValue(double x, double y, double z, double *value) const;
     81
     82    bool getVectorValue(double x, double y, double z, double vector[3]) const;
     83
     84    void setOpacity(double opacity);
     85
     86    /**
     87     * \brief Get the opacity setting for the DataSet
     88     *
     89     * This method is used for record-keeping.  The renderer controls
     90     * the visibility of related graphics objects.
     91     */
     92    inline double getOpacity()
     93    {
     94        return _opacity;
     95    }
    6296
    6397    void setVisibility(bool state);
     
    6599    bool getVisibility() const;
    66100
     101    void showOutline(bool state);
     102
     103    void setOutlineColor(float color[3]);
     104
     105    /**
     106     * \brief Return the VTK prop object for the outline
     107     */
     108    inline vtkProp *getProp()
     109    {
     110        return _prop;
     111    }
     112
    67113private:
    68114    DataSet();
     115
     116    void setDefaultArrays();
     117    void print() const;
     118
     119    void initProp();
    69120
    70121    std::string _name;
    71122    vtkSmartPointer<vtkDataSet> _dataSet;
    72123    bool _visible;
     124    double _opacity;
     125    double _cellSizeRange[2];
     126    double _cellSizeAverage;
     127    vtkSmartPointer<vtkOutlineFilter> _outlineFilter;
     128    vtkSmartPointer<vtkActor> _prop;
     129    vtkSmartPointer<vtkPolyDataMapper> _outlineMapper;
    73130};
    74131
Note: See TracChangeset for help on using the changeset viewer.