Ignore:
Timestamp:
Dec 22, 2014, 7:18:59 AM (5 years ago)
Author:
ldelgass
Message:

Merge serveral changes from trunk. Does not include threading, world space
changes, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nanovis/branches/1.1/FlowParticles.cpp

    r4893 r4904  
    2828    _sv.position.value = 0.0f;
    2929    _sv.position.flags = RELPOS;
    30     _sv.position.axis = 0; // X_AXIS
     30    _sv.position.axis = AXIS_Z;
    3131    _sv.color.r = _sv.color.g = _sv.color.b = _sv.color.a = 1.0f;
    3232    _sv.isHidden = false;
     
    5151          Flow::getRelativePosition(&_sv.position));
    5252
    53     _renderer->setPos(Flow::getRelativePosition(&_sv.position));
    54     _renderer->setAxis(_sv.position.axis);
     53    _renderer->setSlicePosition(Flow::getRelativePosition(&_sv.position));
     54    _renderer->setSliceAxis(_sv.position.axis);
    5555    assert(_renderer->active());
    5656    _renderer->render();
    5757}
    5858
    59 void
     59bool
    6060FlowParticles::configure()
    6161{
    62     _renderer->setPos(Flow::getRelativePosition(&_sv.position));
     62    bool needReset = false;
     63
    6364    _renderer->setColor(Color4f(_sv.color.r,
    6465                                _sv.color.g,
     
    6667                                _sv.color.a));
    6768    _renderer->particleSize(_sv.particleSize);
    68     _renderer->setAxis(_sv.position.axis);
     69    if (_renderer->getSliceAxis() != _sv.position.axis) {
     70        needReset = true;
     71        _renderer->setSliceAxis(_sv.position.axis);
     72    }
     73    float pos = Flow::getRelativePosition(&_sv.position);
     74    if (_renderer->getSlicePosition() != pos) {
     75        needReset = true;
     76        _renderer->setSlicePosition(pos);
     77    }
    6978    _renderer->active(!_sv.isHidden);
     79
     80    return needReset;
    7081}
Note: See TracChangeset for help on using the changeset viewer.