source:
nanovis/trunk/ParticleAdvectionShader.h
@
5036
Last change on this file since 5036 was 4895, checked in by ldelgass, 9 years ago | |
---|---|
|
|
File size: 1.0 KB |
Rev | Line | |
---|---|---|
[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] | 13 | namespace nv { |
14 | ||
[3612] | 15 | class ParticleAdvectionShader : public Shader |
[2837] | 16 | { |
[2953] | 17 | public: |
[3612] | 18 | ParticleAdvectionShader(); |
[1478] | 19 | |
[3612] | 20 | virtual ~ParticleAdvectionShader(); |
[2837] | 21 | |
[3630] | 22 | virtual void bind(unsigned int texID, unsigned int initPosTexID, bool init); |
[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] | 45 | private: |
[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.