source: nanovis/branches/1.1/ParticleAdvectionShader.h @ 5722

Last change on this file since 5722 was 4904, checked in by ldelgass, 5 years ago

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

  • Property svn:eol-style set to native
File size: 1.0 KB
RevLine 
[2798]1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
[3502]2/*
3 * Copyright (c) 2004-2013  HUBzero Foundation, LLC
4 *
5 */
[3613]6#ifndef NV_PARTICLE_ADVECTION_SHADER_H
7#define NV_PARTICLE_ADVECTION_SHADER_H
[585]8
[3492]9#include <vrmath/Vector3f.h>
10
[3612]11#include "Shader.h"
[585]12
[3611]13namespace nv {
14
[3612]15class ParticleAdvectionShader : public Shader
[2837]16{
[2953]17public:
[3612]18    ParticleAdvectionShader();
[1478]19
[3612]20    virtual ~ParticleAdvectionShader();
[2837]21
[2916]22    virtual void bind(unsigned int texID, unsigned int initPosTexID);
[2837]23
[2916]24    virtual void unbind();
[2837]25
[3492]26    void setScale(const vrmath::Vector3f& scale)
[2837]27    {
28        _scale = scale;
29    }
30
31    void setVelocityVolume(unsigned int texID, float max)
32    {
33        _velocityVolumeID = texID;
34        _max = max;
[2916]35        // FIXME: Is this needed?
[2950]36        if (_max > 100.f)
37            _max = 100.0f;
[2837]38    }
39
40    void setTimeStep(float timeStep)
41    {
42        _timeStep = timeStep;
43    }
44
[2932]45private:
[2837]46    void init();
47
[850]48    unsigned int _velocityVolumeID;
[3492]49    vrmath::Vector3f _scale;
[850]50    float _max;
51    float _timeStep;
[585]52};
53
[3611]54}
55
[2837]56#endif
Note: See TracBrowser for help on using the repository browser.