Changeset 2760


Ignore:
Timestamp:
Jan 9, 2012, 2:43:53 PM (13 years ago)
Author:
ldelgass
Message:

Constant color of cutplane should only change border color

Location:
trunk/packages/vizservers/vtkvis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/vtkvis/RpCutplane.cpp

    r2759 r2760  
    124124            getAssembly()->AddPart(_borderActor[i]);
    125125            getAssembly()->AddPart(_actor[i]);
     126        }
     127    }
     128}
     129
     130/**
     131 * \brief Set the material color (sets ambient, diffuse, and specular)
     132 */
     133void Cutplane::setColor(float color[3])
     134{
     135    for (int i = 0; i < 3; i++)
     136        _color[i] = color[i];
     137
     138    for (int i = 0; i < 3; i++) {
     139        if (_borderActor[i] != NULL) {
     140            _borderActor[i]->GetProperty()->SetColor(color[0], color[1], color[2]);
    126141        }
    127142    }
  • trunk/packages/vizservers/vtkvis/RpCutplane.h

    r2752 r2760  
    5050    virtual void setDataSet(DataSet *dataSet,
    5151                            Renderer *renderer);
     52
     53    virtual void setColor(float color[3]);
    5254
    5355    virtual void setLighting(bool state);
Note: See TracChangeset for help on using the changeset viewer.