Ignore:
Timestamp:
Apr 9, 2012, 10:18:09 AM (12 years ago)
Author:
ldelgass
Message:

Remove unused global origin, make default transfer function a bit more
sensible (used to have full opacity at 0). Fix HeightMap? dtor to use delete[]
instead of free() on array allocated with new[]. Document data response in
protocol.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/Axis.h

    r2923 r2953  
    22#ifndef AXIS_H
    33#define AXIS_H
     4
     5#include <stdlib.h>
    46
    57#include <cmath>
     
    4547};
    4648
    47 /*
    48  * ----------------------------------------------------------------------
    49  *
    50  * Ticks --
    51  *
    52  *         Structure containing information where the ticks (major or
    53  *        minor) will be displayed on the graph.
    54  *
    55  * ----------------------------------------------------------------------
     49/**
     50 * Class containing information where the ticks (major or
     51 * minor) will be displayed on the graph.
    5652 */
    5753class Ticks
     
    182178
    183179/**
    184  * Structure contains options controlling how the axis will be
     180 * Class contains options controlling how the axis will be
    185181 * displayed.
    186182 */
     
    212208    }
    213209
     210    bool firstMajor(TickIter& iter)
     211    {
     212        return _major.firstTick(iter);
     213    }
     214
     215    bool firstMinor(TickIter& iter)
     216    {
     217        return _minor.firstTick(iter);
     218    }
     219
    214220    void resetRange();
    215221
     
    218224    void setScale(double min, double max);
    219225
    220     double scale()
     226    double scale() const
    221227    {
    222228        return _scale;
    223229    }
    224230
    225     double range()
     231    double range() const
    226232    {
    227233        return _range;
    228234    }
    229235
    230     bool firstMajor(TickIter& iter)
    231     {
    232         return _major.firstTick(iter);
    233     }
    234 
    235     bool firstMinor(TickIter& iter)
    236     {
    237         return _minor.firstTick(iter);
    238     }
    239 
    240236    void getDataLimits(double& min, double& max)
    241237    {
    242238        min = _valueMin, max = _valueMax;
     239    }
     240
     241    double min() const
     242    {
     243        return _min;
     244    }
     245
     246    void min(double min)
     247    {
     248        _reqMin = min;
     249    }
     250
     251    double max() const
     252    {
     253        return _max;
     254    }
     255
     256    void max(double max)
     257    {
     258        _reqMax = max;
     259    }
     260
     261    void setLimits(double min, double max)
     262    {
     263        _reqMin = min, _reqMax = max;
     264    }
     265
     266    void unsetLimits()
     267    {
     268        min(NAN), max(NAN);
    243269    }
    244270
     
    284310        }
    285311        _title = strdup(title);
    286     }
    287 
    288     double min()
    289     {
    290         return _min;
    291     }
    292 
    293     void min(double min)
    294     {
    295         _reqMin = min;
    296     }
    297 
    298     double max()
    299     {
    300         return _max;
    301     }
    302 
    303     void max(double max)
    304     {
    305         _reqMax = max;
    306     }
    307 
    308     void setLimits(double min, double max)
    309     {
    310         _reqMin = min, _reqMax = max;
    311     }
    312 
    313     void unsetLimits()
    314     {
    315         min(NAN), max(NAN);
    316312    }
    317313
Note: See TracChangeset for help on using the changeset viewer.