source: GTP/trunk/App/Demos/Illum/Hierarchical Systems Demo [OpenGL]/src/doc/html/class_advanced_particle_system.html @ 852

Revision 852, 13.9 KB checked in by szirmay, 18 years ago (diff)
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>Hierarchical ParticleSystems: AdvancedParticleSystem Class Reference</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.4.6-NO -->
8<div class="tabs">
9  <ul>
10    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
12  </ul></div>
13<div class="tabs">
14  <ul>
15    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
16    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
17    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
18  </ul></div>
19<h1>AdvancedParticleSystem Class Reference</h1><!-- doxytag: class="AdvancedParticleSystem" -->Implements a hierarchical particle system. 
20<a href="#_details">More...</a>
21<p>
22<a href="class_advanced_particle_system-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
23<tr><td></td></tr>
24<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
25<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e4fd790262987743f6c434125132589"></a><!-- doxytag: member="AdvancedParticleSystem::Display" ref="0e4fd790262987743f6c434125132589" args="(Camera *cam, Vector LightPos)" -->
26void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#0e4fd790262987743f6c434125132589">Display</a> (Camera *cam, Vector LightPos)</td></tr>
27
28<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">renders the particle system from the given camera using the given light position <br></td></tr>
29<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d64a360727ea35812bbf12660f743594"></a><!-- doxytag: member="AdvancedParticleSystem::Refresh" ref="d64a360727ea35812bbf12660f743594" args="(Camera *cam, Vector LightPos, unsigned int Dt, unsigned int TimefromSecond)" -->
30void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#d64a360727ea35812bbf12660f743594">Refresh</a> (Camera *cam, Vector LightPos, unsigned int Dt, unsigned int TimefromSecond)</td></tr>
31
32<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">refreshes the particle system <br></td></tr>
33<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6985de3a06be2d757b5aab2756063fa1"></a><!-- doxytag: member="AdvancedParticleSystem::RefreshDepths" ref="6985de3a06be2d757b5aab2756063fa1" args="(Camera *cam)" -->
34void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#6985de3a06be2d757b5aab2756063fa1">RefreshDepths</a> (Camera *cam)</td></tr>
35
36<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">generates front and back depth textures od the smaller particle system <br></td></tr>
37<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6dc27b6f557be5b1c6d4b93ae6c8c4b"></a><!-- doxytag: member="AdvancedParticleSystem::Initialize" ref="f6dc27b6f557be5b1c6d4b93ae6c8c4b" args="()" -->
38void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#f6dc27b6f557be5b1c6d4b93ae6c8c4b">Initialize</a> ()</td></tr>
39
40<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">initialize textures and gpu programs <br></td></tr>
41<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4259e131a586d0a241f895ab1a7fcf7d"></a><!-- doxytag: member="AdvancedParticleSystem::InitSystems" ref="4259e131a586d0a241f895ab1a7fcf7d" args="()" -->
42void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#4259e131a586d0a241f895ab1a7fcf7d">InitSystems</a> ()</td></tr>
43
44<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">initialize the two particle systems <br></td></tr>
45<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2f5ff17329241657c545b16db8e18671"></a><!-- doxytag: member="AdvancedParticleSystem::RenderObjectDepths" ref="2f5ff17329241657c545b16db8e18671" args="(Camera *cam)" -->
46void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#2f5ff17329241657c545b16db8e18671">RenderObjectDepths</a> (Camera *cam)</td></tr>
47
48<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">generates scene depth texture <br></td></tr>
49<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#5a0a862da54f6fe112da00f3b1cc306d">RefreshIllumTextures</a> (Vector LightPos)</td></tr>
50
51<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">refreshes the illumination texture  <a href="#5a0a862da54f6fe112da00f3b1cc306d"></a><br></td></tr>
52<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
53<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6cb58f4970257ef7a9fa055f98d7042b"></a><!-- doxytag: member="AdvancedParticleSystem::albedo" ref="6cb58f4970257ef7a9fa055f98d7042b" args="" -->
54float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#6cb58f4970257ef7a9fa055f98d7042b">albedo</a></td></tr>
55
56<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">albedo of the particles <br></td></tr>
57<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e00c2cc484fcb95294c4dd074e6713b2"></a><!-- doxytag: member="AdvancedParticleSystem::symmetry" ref="e00c2cc484fcb95294c4dd074e6713b2" args="" -->
58float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#e00c2cc484fcb95294c4dd074e6713b2">symmetry</a></td></tr>
59
60<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">scattering symmetry of the scattering (used in phase function calculation) <br></td></tr>
61<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="03712c8b66e8637adf396d63cb0c4ea9"></a><!-- doxytag: member="AdvancedParticleSystem::transparency" ref="03712c8b66e8637adf396d63cb0c4ea9" args="" -->
62float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#03712c8b66e8637adf396d63cb0c4ea9">transparency</a></td></tr>
63
64<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">transparency of the particles <br></td></tr>
65<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3ee84703f894b947652effeaee596837"></a><!-- doxytag: member="AdvancedParticleSystem::m_ParticleSystem" ref="3ee84703f894b947652effeaee596837" args="" -->
66ParticleSystem&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#3ee84703f894b947652effeaee596837">m_ParticleSystem</a></td></tr>
67
68<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">particle system made ot of a smaller system <br></td></tr>
69<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8a8a10b6292d72a49f0b4acc2f5a05be"></a><!-- doxytag: member="AdvancedParticleSystem::m_LittleParticleSystem" ref="8a8a10b6292d72a49f0b4acc2f5a05be" args="" -->
70ParticleSystem&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#8a8a10b6292d72a49f0b4acc2f5a05be">m_LittleParticleSystem</a></td></tr>
71
72<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">smaller particle system <br></td></tr>
73<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
74<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3352cf2b2f1d9e551c1b14fab101dd85"></a><!-- doxytag: member="AdvancedParticleSystem::m_DisplayImpostor" ref="3352cf2b2f1d9e551c1b14fab101dd85" args="" -->
75Impostor&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#3352cf2b2f1d9e551c1b14fab101dd85">m_DisplayImpostor</a></td></tr>
76
77<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Impostor to display. <br></td></tr>
78<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b763206ef777bddf379c3ec75564b408"></a><!-- doxytag: member="AdvancedParticleSystem::m_IllumImpostor" ref="b763206ef777bddf379c3ec75564b408" args="" -->
79Impostor&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#b763206ef777bddf379c3ec75564b408">m_IllumImpostor</a></td></tr>
80
81<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Impostor for illumination calculation. <br></td></tr>
82<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c397746c78adfde70147f6e0bd79fd0a"></a><!-- doxytag: member="AdvancedParticleSystem::m_IllumTexture" ref="c397746c78adfde70147f6e0bd79fd0a" args="" -->
83RenderTexture&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#c397746c78adfde70147f6e0bd79fd0a">m_IllumTexture</a></td></tr>
84
85<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Illumination texture. <br></td></tr>
86<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="33d253ba9d490ffaed0ff33f86e5a51b"></a><!-- doxytag: member="AdvancedParticleSystem::m_FrontDepthTexture" ref="33d253ba9d490ffaed0ff33f86e5a51b" args="" -->
87RenderTexture&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#33d253ba9d490ffaed0ff33f86e5a51b">m_FrontDepthTexture</a></td></tr>
88
89<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stores nearest and furthest distances of the particles from the camera and also the opacity. <br></td></tr>
90<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3a8502d98273c9fdea6f9990e32f51e6"></a><!-- doxytag: member="AdvancedParticleSystem::m_ObjectsTexture" ref="3a8502d98273c9fdea6f9990e32f51e6" args="" -->
91RenderTexture&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#3a8502d98273c9fdea6f9990e32f51e6">m_ObjectsTexture</a></td></tr>
92
93<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stores nearest distances of the scene objects from the camera. <br></td></tr>
94<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7630fcd0919a9e5bcaa8107843267d93"></a><!-- doxytag: member="AdvancedParticleSystem::m_ScatteredIlumTexture" ref="7630fcd0919a9e5bcaa8107843267d93" args="" -->
95RenderTexture&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_advanced_particle_system.html#7630fcd0919a9e5bcaa8107843267d93">m_ScatteredIlumTexture</a></td></tr>
96
97<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A motion blurred version of the illumination texture to avoid abrupt changes. <br></td></tr>
98</table>
99<hr><a name="_details"></a><h2>Detailed Description</h2>
100Implements a hierarchical particle system.
101<p>
102A hierarchical particle system is a particle system made out of a smaller particle systems. First an image of the smaller particle system should be rendered, than this image can be multiplied and be used as sprite images to form the bigger system.<p>
103To avoid incorrect depth culling caused by the simplifications made by considering a group of particles as a single quad we have to take into acount some additional depth information too. We also render the the closest and the furthest depth values of the smaller system in the view camera's space. During display this depth information can be used to estimate the length of the light ray segment travelled in the medium and alter the opacity of the particles respectively.<p>
104This particle system implementation also deals with light scattering inside the medium. It builds a layered light absorption texture which stores the amount of absorped light in different depths from lightsource. With the use of the illumination texture we can approximate self shadowing of the medium. This implementation uses four layers and stores it in the four channels of a texture. This way no 3D textures are needed, and the light absorption (illumination) texture can be generated in a single render pass.<p>
105During rendering a mie scattering model is used to compute the amount of scattered light. To speed up calculations phase function values are read back from a 2D look-up texture (phase texture).
106<p>
107<hr><h2>Member Function Documentation</h2>
108<a class="anchor" name="5a0a862da54f6fe112da00f3b1cc306d"></a><!-- doxytag: member="AdvancedParticleSystem::RefreshIllumTextures" ref="5a0a862da54f6fe112da00f3b1cc306d" args="(Vector LightPos)" --><p>
109<table class="mdTable" cellpadding="2" cellspacing="0">
110  <tr>
111    <td class="mdRow">
112      <table cellpadding="0" cellspacing="0" border="0">
113        <tr>
114          <td class="md" nowrap valign="top">void AdvancedParticleSystem::RefreshIllumTextures           </td>
115          <td class="md" valign="top">(&nbsp;</td>
116          <td class="md" nowrap valign="top">Vector&nbsp;</td>
117          <td class="mdname1" valign="top" nowrap> <em>LightPos</em>          </td>
118          <td class="md" valign="top">&nbsp;)&nbsp;</td>
119          <td class="md" nowrap></td>
120        </tr>
121      </table>
122    </td>
123  </tr>
124</table>
125<table cellspacing="5" cellpadding="0" border="0">
126  <tr>
127    <td>
128      &nbsp;
129    </td>
130    <td>
131
132<p>
133refreshes the illumination texture
134<p>
135The illumination texture is a four layered texture, each layer stored in the separate color channels.     </td>
136  </tr>
137</table>
138<hr size="1"><address style="align: right;"><small>Generated on Thu Apr 27 23:27:41 2006 for Hierarchical ParticleSystems by&nbsp;
139<a href="http://www.doxygen.org/index.html">
140<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6-NO </small></address>
141</body>
142</html>
Note: See TracBrowser for help on using the repository browser.