Ignore:
Timestamp:
Aug 25, 2011 1:09:15 PM (13 years ago)
Author:
gah
Message:

update from branch

File:
1 edited

Legend:

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

    r2322 r2409  
    1818#include <vtkPlaneCollection.h>
    1919
    20 #include "RpVtkDataSet.h"
     20#include "RpVtkGraphicsObject.h"
    2121#include "ColorMap.h"
    2222
     
    2626/**
    2727 * \brief Oriented and scaled 3D glyph shapes
     28 *
     29 * The DataSet must be a PolyData point set
     30 * with vectors and/or scalars
    2831 */
    29 class Glyphs {
     32class Glyphs : public VtkGraphicsObject {
    3033public:
    3134    enum GlyphShape {
     
    4043        TETRAHEDRON
    4144    };
     45    enum ScalingMode {
     46        SCALE_BY_SCALAR,
     47        SCALE_BY_VECTOR,
     48        SCALE_BY_VECTOR_COMPONENTS,
     49        SCALING_OFF
     50    };
     51    enum ColorMode {
     52        COLOR_BY_SCALE,
     53        COLOR_BY_SCALAR,
     54        COLOR_BY_VECTOR,
     55        COLOR_CONSTANT
     56    };
    4257
    4358    Glyphs();
    4459    virtual ~Glyphs();
    4560
    46     void setDataSet(DataSet *dataset);
     61    virtual const char *getClassName() const
     62    {
     63        return "Glyphs";
     64    }
    4765
    48     DataSet *getDataSet();
     66    virtual void setClippingPlanes(vtkPlaneCollection *planes);
    4967
    50     vtkProp *getProp();
     68    void setScalingMode(ScalingMode mode);
     69
     70    void setColorMode(ColorMode mode);
    5171
    5272    void setGlyphShape(GlyphShape shape);
     
    5878    vtkLookupTable *getLookupTable();
    5979
    60     void setOpacity(double opacity);
    61 
    62     double getOpacity();
    63 
    64     void setVisibility(bool state);
    65 
    66     bool getVisibility();
    67 
    68     void setClippingPlanes(vtkPlaneCollection *planes);
    69 
    70     void setLighting(bool state);
    71 
    7280private:
    73     void initProp();
    74     void update();
    75 
    76     DataSet *_dataSet;
    77 
    78     double _opacity;
    79     bool _lighting;
     81    virtual void update();
    8082
    8183    GlyphShape _glyphShape;
    8284    double _scaleFactor;
     85    ColorMode _colorMode;
    8386
    8487    vtkSmartPointer<vtkLookupTable> _lut;
    85     vtkSmartPointer<vtkActor> _prop;
    8688    vtkSmartPointer<vtkGlyph3D> _glyphGenerator;
    8789    vtkSmartPointer<vtkPolyDataAlgorithm> _glyphSource;
Note: See TracChangeset for help on using the changeset viewer.