Last change
on this file since 5304 was
4904,
checked in by ldelgass, 10 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
|
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_ADVECTION_SHADER_H |
---|
7 | #define NV_PARTICLE_ADVECTION_SHADER_H |
---|
8 | |
---|
9 | #include <vrmath/Vector3f.h> |
---|
10 | |
---|
11 | #include "Shader.h" |
---|
12 | |
---|
13 | namespace nv { |
---|
14 | |
---|
15 | class ParticleAdvectionShader : public Shader |
---|
16 | { |
---|
17 | public: |
---|
18 | ParticleAdvectionShader(); |
---|
19 | |
---|
20 | virtual ~ParticleAdvectionShader(); |
---|
21 | |
---|
22 | virtual void bind(unsigned int texID, unsigned int initPosTexID); |
---|
23 | |
---|
24 | virtual void unbind(); |
---|
25 | |
---|
26 | void setScale(const vrmath::Vector3f& scale) |
---|
27 | { |
---|
28 | _scale = scale; |
---|
29 | } |
---|
30 | |
---|
31 | void setVelocityVolume(unsigned int texID, float max) |
---|
32 | { |
---|
33 | _velocityVolumeID = texID; |
---|
34 | _max = max; |
---|
35 | // FIXME: Is this needed? |
---|
36 | if (_max > 100.f) |
---|
37 | _max = 100.0f; |
---|
38 | } |
---|
39 | |
---|
40 | void setTimeStep(float timeStep) |
---|
41 | { |
---|
42 | _timeStep = timeStep; |
---|
43 | } |
---|
44 | |
---|
45 | private: |
---|
46 | void init(); |
---|
47 | |
---|
48 | unsigned int _velocityVolumeID; |
---|
49 | vrmath::Vector3f _scale; |
---|
50 | float _max; |
---|
51 | float _timeStep; |
---|
52 | }; |
---|
53 | |
---|
54 | } |
---|
55 | |
---|
56 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.