source: trunk/packages/vizservers/nanovis/NvParticleAdvectionShader.h @ 3502

Last change on this file since 3502 was 3502, checked in by ldelgass, 7 years ago

Add basic VTK structured points reader to nanovis, update copyright dates.

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