Changeset 3618 for trunk/packages/vizservers
- Timestamp:
- Apr 3, 2013 2:31:10 AM (11 years ago)
- Location:
- trunk/packages/vizservers/nanovis
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/Makefile.in
r3612 r3618 2 2 USE_THREADS = yes 3 3 USE_POINTSET_RENDERER = #yes 4 USE_PARTICLE_SYSTEM = #yes 4 5 5 6 SHELL = /bin/sh … … 180 181 $(srcdir)/shaders/zincblende_volume.cg 181 182 182 ifdef NOTDEF183 ifdef USE_PARTICLE_SYSTEM 183 184 OBJS += ParticleEmitter.o \ 184 185 ParticleSystem.o \ … … 298 299 ParticleEmitter.o: ParticleEmitter.cpp ParticleEmitter.h 299 300 ParticleRenderer.o: ParticleRenderer.cpp ParticleRenderer.h 300 ParticleSystem.o: ParticleSystem.cpp ParticleSystem.h DataLoader.h301 ParticleSystem.o: ParticleSystem.cpp ParticleSystem.h 301 302 ParticleSystemFactory.o: ParticleSystemFactory.cpp ParticleSystemFactory.h 302 303 PCASplit.o: PCASplit.cpp PCASplit.h -
trunk/packages/vizservers/nanovis/ParticleEmitter.cpp
r3502 r3618 5 5 */ 6 6 #include "ParticleEmitter.h" 7 8 using namespace nv; 7 9 8 10 ParticleEmitter::ParticleEmitter() : -
trunk/packages/vizservers/nanovis/ParticleEmitter.h
r3613 r3618 16 16 { 17 17 public: 18 ParticleEmitter();18 ParticleEmitter(); 19 19 20 20 void setName(const std::string& name); -
trunk/packages/vizservers/nanovis/ParticleSystem.cpp
r3612 r3618 27 27 #include "ParticleSystem.h" 28 28 #include "ParticleEmitter.h" 29 #include "DataLoader.h"30 29 #include "Texture2D.h" 31 30 #include "Texture3D.h" … … 33 32 #include "Trace.h" 34 33 34 using namespace nv; 35 35 using namespace nv::util; 36 36 … … 987 987 988 988 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, _atlas_fbo); 989 _streamVertices-> Read(_atlasWidth, _atlasHeight);989 _streamVertices->read(_atlasWidth, _atlasHeight); 990 990 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); 991 991 _currentStreamlineIndex++; … … 1096 1096 1097 1097 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, psys_fbo[_destPosIndex]); 1098 _vertices-> Read(_width, _height);1098 _vertices->read(_width, _height); 1099 1099 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); 1100 1100 } else { 1101 1101 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, psys_fbo[_currentPosIndex]); 1102 _vertices-> Read(_width, _height);1102 _vertices->read(_width, _height); 1103 1103 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); 1104 1104 } … … 1110 1110 for (unsigned int k = 0; k < numOfNewParticles; ++k) { 1111 1111 vrmath::Vector3f position = _emitters[i]->_position; 1112 position += _emitters[i]->_maxPositionOffset * 1113 vrmath::Vector3f(randomRange(-1.0f, 1.0f), randomRange(-1.0f, 1.0f), randomRange(-1.0f, 1.0f)); 1114 1112 position += 1113 _emitters[i]->_maxPositionOffset.scale(vrmath::Vector3f(randomRange(-1.0f, 1.0f), 1114 randomRange(-1.0f, 1.0f), 1115 randomRange(-1.0f, 1.0f))); 1115 1116 float lifetime = randomRange(_emitters[i]->_minLifeTime, _emitters[i]->_maxLifeTime); 1116 1117 … … 1581 1582 //glEnableClientState(GL_COLOR_ARRAY); 1582 1583 1583 _streamVertices-> SetPointer(0);1584 _streamVertices->setPointer(0); 1584 1585 //glColorPointer(4, GL_FLOAT, 0, 0); 1585 1586 … … 1653 1654 glEnableClientState(GL_VERTEX_ARRAY); 1654 1655 //glEnableClientState(GL_COLOR_ARRAY); 1655 _vertices-> SetPointer(0);1656 _vertices->setPointer(0); 1656 1657 //glBindBufferARB(GL_ARRAY_BUFFER, _colorBufferID); 1657 1658 //glColorPointer(4, GL_FLOAT, 0, 0); … … 1691 1692 glEnableClientState(GL_VERTEX_ARRAY); 1692 1693 //glEnableClientState(GL_COLOR_ARRAY); 1693 _vertices-> SetPointer(0);1694 _vertices->setPointer(0); 1694 1695 //glBindBufferARB(GL_ARRAY_BUFFER, _colorBufferID); 1695 1696 //glColorPointer(4, GL_FLOAT, 0, 0); … … 1718 1719 //glEnableClientState(GL_COLOR_ARRAY); 1719 1720 glPointSize(10); 1720 _vertices-> SetPointer(0);1721 _vertices->setPointer(0); 1721 1722 //glBindBufferARB(GL_ARRAY_BUFFER, _colorBufferID); 1722 1723 //glColorPointer(4, GL_FLOAT, 0, 0); … … 1725 1726 1726 1727 glPointSize(1); 1727 _vertices-> SetPointer(0);1728 _vertices->setPointer(0); 1728 1729 //glBindBufferARB(GL_ARRAY_BUFFER, _colorBufferID); 1729 1730 //glColorPointer(4, GL_FLOAT, 0, 0); -
trunk/packages/vizservers/nanovis/ParticleSystem.h
r3613 r3618 49 49 }; 50 50 51 namespace std 52 { 53 template <> 54 struct greater<ActiveParticle> { 55 bool operator() (const ActiveParticle& left, const ActiveParticle& right) 56 { 57 return left.timeOfDeath > right.timeOfDeath; 58 } 59 }; 60 } 51 struct particle_greater { 52 bool operator() (const ActiveParticle& left, const ActiveParticle& right) 53 { 54 return (left.timeOfDeath > right.timeOfDeath); 55 } 56 }; 61 57 62 58 struct color4 { … … 173 169 174 170 priority_queue_vector<int, std::greater<int> > _availableIndices; 175 priority_queue_vector<ActiveParticle, std::greater<ActiveParticle>> _activeParticles;171 priority_queue_vector<ActiveParticle, particle_greater > _activeParticles; 176 172 std::vector<NewParticle> _newParticles; 177 173 -
trunk/packages/vizservers/nanovis/ParticleSystemFactory.cpp
r3502 r3618 15 15 #include "Trace.h" 16 16 17 using namespace nv; 17 18 using namespace nv::util; 18 19 -
trunk/packages/vizservers/nanovis/vrmath/include/vrmath/Vector3f.h
r3567 r3618 48 48 Vector3f normalize() const; 49 49 50 Vector3f scale( Vector3f& sc) const;50 Vector3f scale(const Vector3f& sc) const; 51 51 52 52 Vector3f scale(float scale) const; … … 236 236 } 237 237 238 inline Vector3f Vector3f::scale( Vector3f& sc) const238 inline Vector3f Vector3f::scale(const Vector3f& sc) const 239 239 { 240 240 return Vector3f(x * sc.x, y * sc.y, z * sc.z);
Note: See TracChangeset
for help on using the changeset viewer.