Plugins/PointSprite/ParaViewPlugin/Qvis/VolumeAttributes.cpp
void
VolumeAttributes::SetDefaultColorControlPoints()
{
    const float positions[] = {0., 0.25, 0.5, 0.75, 1.};
    const unsigned char colors[5][4] = {
        {0,   0,   255, 255},
        {0,   255, 255, 255},
        {0,   255, 0,   255},
        {255, 255, 0,   255},
        {255, 0,   0,   255}};

    // Clear the color control point list.
    colorControlPoints.ClearControlPoints();

    // Set the default control points in the color control point list.
    for(int i = 0; i < 5; ++i)
    {
        ColorControlPoint cpt;
        cpt.SetPosition(positions[i]);
        cpt.SetColors(colors[i]);
        colorControlPoints.AddControlPoints(cpt);
    }
    SelectColorControlPoints();
}
// ****************************************************************************
// Method: VolumeAttributes::SetDefaultColorControlPoints
//
// Purpose: 
//   This method replaces all of the color control points in the list with the
//   default color control points.
//
// Programmer: Brad Whitlock
// Creation:   Tue Aug 21 15:44:34 PST 2001
//
// Modifications:
//   
// ****************************************************************************
:SetDefaultColorControlPoints
Purpose:
This method replaces all of the color control points in the list with the
default color control points.

Brad Whitlock
Creation:   Tue Aug 21 15:44:34 PST 2001


: SetDefaultColorControlPoints Purpose : This method replaces all of the color control points in the list with the default color control points . Brad Whitlock Creation : Tue Aug 21 15 : 44 : 34 PST 2001
void
VolumeAttributes::SetDefaultColorControlPoints()
{
    const float positions[] = {0., 0.25, 0.5, 0.75, 1.};
    const unsigned char colors[5][4] = {
        {0,   0,   255, 255},
        {0,   255, 255, 255},
        {0,   255, 0,   255},
        {255, 255, 0,   255},
        {255, 0,   0,   255}};
    colorControlPoints.ClearControlPoints();
    for(int i = 0; i < 5; ++i)
    {
        ColorControlPoint cpt;
        cpt.SetPosition(positions[i]);
        cpt.SetColors(colors[i]);
        colorControlPoints.AddControlPoints(cpt);
    }
    SelectColorControlPoints();
}
void VolumeAttributes :: SetDefaultColorControlPoints ( ) { const float positions [ ] = { 0. , 0.25 , 0.5 , 0.75 , 1. } ; const unsigned char colors [ 5 ] [ 4 ] = { { 0 , 0 , 255 , 255 } , { 0 , 255 , 255 , 255 } , { 0 , 255 , 0 , 255 } , { 255 , 255 , 0 , 255 } , { 255 , 0 , 0 , 255 } } ; colorControlPoints . ClearControlPoints ( ) ; for ( int i = 0 ; i < 5 ; ++ i ) { ColorControlPoint cpt ; cpt . SetPosition ( positions [ i ] ) ; cpt . SetColors ( colors [ i ] ) ; colorControlPoints . AddControlPoints ( cpt ) ; } SelectColorControlPoints ( ) ; }
Method: VolumeAttributes::SetDefaultColorControlPoints
Purpose:
This method replaces all of the color control points in the list with the
default color control points.
Method : VolumeAttributes :: SetDefaultColorControlPoints Purpose : This method replaces all of the color control points in the list with the default color control points .
// Clear the color control point list. // Set the default control points in the color control point list.