Ignore:
Timestamp:
May 21, 2014, 12:44:28 AM (10 years ago)
Author:
ldelgass
Message:

Add midpoint/sharpness to color/opacity control points

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/vtkvis/ColorMap.h

    r4073 r4358  
    3434    struct ControlPoint {
    3535        ControlPoint() :
    36             value(0)
     36            value(0),
     37            midpoint(0.5),
     38            sharpness(0)
    3739        {
    3840            memset(color, 0, sizeof(double)*3);
    3941        }
    4042        ControlPoint(const ControlPoint& other) :
    41             value(other.value)
     43            value(other.value),
     44            midpoint(other.midpoint),
     45            sharpness(other.sharpness)
    4246        {
    4347            memcpy(color, other.color, sizeof(double)*3);
     
    4751            if (this != &other) {
    4852                value = other.value;
     53                midpoint = other.midpoint;
     54                sharpness = other.sharpness;
    4955                memcpy(color, other.color, sizeof(double)*3);
    5056            }
     
    5359
    5460        double value; ///< Normalized scalar data value [0,1]
     61        double midpoint, sharpness;
    5562        double color[3]; ///< RGB color
    5663    };
     
    6269        OpacityControlPoint() :
    6370            value(0),
     71            midpoint(0.5),
     72            sharpness(0),
    6473            alpha(1)
    6574        {
     
    6776        OpacityControlPoint(const OpacityControlPoint& other) :
    6877            value(other.value),
     78            midpoint(other.midpoint),
     79            sharpness(other.sharpness),
    6980            alpha(other.alpha)
    7081        {
     
    7485            if (this != &other) {
    7586                value = other.value;
     87                midpoint = other.midpoint;
     88                sharpness = other.sharpness;
    7689                alpha = other.alpha;
    7790            }
     
    8093
    8194        double value; ///< Normalized scalar data value [0,1]
     95        double midpoint, sharpness;
    8296        double alpha; ///< Opacity
    8397    };
Note: See TracChangeset for help on using the changeset viewer.