1 | <html> |
---|
2 | <head> |
---|
3 | <title>OgreTechnique.h Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
4 | <link type="text/css" rel="stylesheet" href="style.css"> |
---|
5 | </head> |
---|
6 | |
---|
7 | <body> |
---|
8 | <!-- Generated by Doxygen 1.3.6 --> |
---|
9 | <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> |
---|
10 | <h1>OgreTechnique.h</h1><a href="OgreTechnique_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span> |
---|
11 | 00002 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
12 | 00003 <span class="comment">This source file is part of OGRE</span> |
---|
13 | 00004 <span class="comment">(Object-oriented Graphics Rendering Engine)</span> |
---|
14 | 00005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span> |
---|
15 | 00006 <span class="comment"></span> |
---|
16 | 00007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span> |
---|
17 | 00008 <span class="comment">Also see acknowledgements in Readme.html</span> |
---|
18 | 00009 <span class="comment"></span> |
---|
19 | 00010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span> |
---|
20 | 00011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span> |
---|
21 | 00012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span> |
---|
22 | 00013 <span class="comment">version.</span> |
---|
23 | 00014 <span class="comment"></span> |
---|
24 | 00015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span> |
---|
25 | 00016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span> |
---|
26 | 00017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span> |
---|
27 | 00018 <span class="comment"></span> |
---|
28 | 00019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span> |
---|
29 | 00020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span> |
---|
30 | 00021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span> |
---|
31 | 00022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span> |
---|
32 | 00023 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
33 | 00024 <span class="comment">*/</span> |
---|
34 | 00025 <span class="preprocessor">#ifndef __Technique_H__</span> |
---|
35 | 00026 <span class="preprocessor"></span><span class="preprocessor">#define __Technique_H__</span> |
---|
36 | 00027 <span class="preprocessor"></span> |
---|
37 | 00028 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span> |
---|
38 | 00029 <span class="preprocessor">#include "<a class="code" href="OgreIteratorWrappers_8h.html">OgreIteratorWrappers.h</a>"</span> |
---|
39 | 00030 <span class="preprocessor">#include "<a class="code" href="OgreBlendMode_8h.html">OgreBlendMode.h</a>"</span> |
---|
40 | 00031 <span class="preprocessor">#include "<a class="code" href="OgreCommon_8h.html">OgreCommon.h</a>"</span> |
---|
41 | 00032 <span class="preprocessor">#include "<a class="code" href="OgrePass_8h.html">OgrePass.h</a>"</span> |
---|
42 | 00033 |
---|
43 | 00034 <span class="keyword">namespace </span>Ogre { |
---|
44 | <a name="l00041"></a><a class="code" href="classOgre_1_1Technique.html">00041</a> <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> Technique |
---|
45 | 00042 { |
---|
46 | 00043 <span class="keyword">protected</span>: |
---|
47 | 00044 <span class="comment">// illumination pass state type</span> |
---|
48 | <a name="l00045"></a><a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquex4">00045</a> <span class="keyword">enum</span> IlluminationPassesState |
---|
49 | 00046 { |
---|
50 | 00047 IPS_COMPILE_DISABLED = -1, |
---|
51 | 00048 IPS_NOT_COMPILED = 0, |
---|
52 | 00049 IPS_COMPILED = 1 |
---|
53 | 00050 }; |
---|
54 | 00051 |
---|
55 | <a name="l00052"></a><a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquex0">00052</a> <span class="keyword">typedef</span> std::vector<Pass*> <a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquex0">Passes</a>; |
---|
56 | <a name="l00054"></a><a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquep0">00054</a> <a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquex0">Passes</a> mPasses; |
---|
57 | <a name="l00056"></a><a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquep1">00056</a> <a class="code" href="namespaceOgre.html#a358">IlluminationPassList</a> mIlluminationPasses; |
---|
58 | <a name="l00057"></a><a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquep2">00057</a> <a class="code" href="classOgre_1_1Material.html">Material</a>* mParent; <span class="comment">// raw pointer since we don't want child to stop parent's destruction</span> |
---|
59 | <a name="l00058"></a><a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquep3">00058</a> <span class="keywordtype">bool</span> mIsSupported; |
---|
60 | <a name="l00059"></a><a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquep4">00059</a> IlluminationPassesState mIlluminationPassesCompilationPhase; |
---|
61 | <a name="l00060"></a><a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquep5">00060</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> mLodIndex; |
---|
62 | 00061 |
---|
63 | 00063 <span class="keywordtype">void</span> clearIlluminationPasses(<span class="keywordtype">void</span>); |
---|
64 | 00064 <span class="keyword">public</span>: |
---|
65 | 00066 Technique(<a class="code" href="classOgre_1_1Material.html">Material</a>* parent); |
---|
66 | 00068 Technique(<a class="code" href="classOgre_1_1Material.html">Material</a>* parent, <span class="keyword">const</span> Technique& oth); |
---|
67 | 00069 ~Technique(); |
---|
68 | 00075 <span class="keywordtype">bool</span> isSupported(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
69 | 00077 <span class="keywordtype">void</span> _compile(<span class="keywordtype">bool</span> autoManageTextureUnits); |
---|
70 | 00079 <span class="keywordtype">void</span> _compileIlluminationPasses(<span class="keywordtype">void</span>); |
---|
71 | 00080 |
---|
72 | 00081 |
---|
73 | 00092 <a class="code" href="classOgre_1_1Pass.html">Pass</a>* createPass(<span class="keywordtype">void</span>); |
---|
74 | 00094 <a class="code" href="classOgre_1_1Pass.html">Pass</a>* getPass(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index); |
---|
75 | 00096 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getNumPasses(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
76 | 00098 <span class="keywordtype">void</span> removePass(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index); |
---|
77 | 00100 <span class="keywordtype">void</span> removeAllPasses(<span class="keywordtype">void</span>); |
---|
78 | <a name="l00101"></a><a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquew0">00101</a> <span class="keyword">typedef</span> <a class="code" href="classOgre_1_1VectorIterator.html">VectorIterator<Passes></a> <a class="code" href="classOgre_1_1VectorIterator.html">PassIterator</a>; |
---|
79 | 00103 <span class="keyword">const</span> <a class="code" href="classOgre_1_1VectorIterator.html">PassIterator</a> getPassIterator(<span class="keywordtype">void</span>); |
---|
80 | <a name="l00104"></a><a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquew1">00104</a> <span class="keyword">typedef</span> <a class="code" href="classOgre_1_1VectorIterator.html">VectorIterator<IlluminationPassList></a> <a class="code" href="classOgre_1_1VectorIterator.html">IlluminationPassIterator</a>; |
---|
81 | 00106 <span class="keyword">const</span> <a class="code" href="classOgre_1_1VectorIterator.html">IlluminationPassIterator</a> getIlluminationPassIterator(<span class="keywordtype">void</span>); |
---|
82 | <a name="l00108"></a><a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquea13">00108</a> <a class="code" href="classOgre_1_1Material.html">Material</a>* getParent(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mParent; } |
---|
83 | 00109 |
---|
84 | 00111 Technique& operator=(<span class="keyword">const</span> Technique& rhs); |
---|
85 | 00112 |
---|
86 | 00114 <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& getResourceGroup(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
87 | 00115 |
---|
88 | 00124 <span class="keywordtype">bool</span> isTransparent(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
89 | 00125 |
---|
90 | 00127 <span class="keywordtype">void</span> _load(<span class="keywordtype">void</span>); |
---|
91 | 00129 <span class="keywordtype">void</span> _unload(<span class="keywordtype">void</span>); |
---|
92 | 00130 |
---|
93 | 00131 <span class="comment">// Is this loaded?</span> |
---|
94 | 00132 <span class="keywordtype">bool</span> isLoaded(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
95 | 00133 |
---|
96 | 00135 <span class="keywordtype">void</span> _notifyNeedsRecompile(<span class="keywordtype">void</span>); |
---|
97 | 00136 |
---|
98 | 00137 |
---|
99 | 00138 <span class="comment">// -------------------------------------------------------------------------------</span> |
---|
100 | 00139 <span class="comment">// The following methods are to make migration from previous versions simpler</span> |
---|
101 | 00140 <span class="comment">// and to make code easier to write when dealing with simple materials</span> |
---|
102 | 00141 <span class="comment">// They set the properties which have been moved to Pass for all Techniques and all Passes</span> |
---|
103 | 00142 |
---|
104 | 00151 <span class="keywordtype">void</span> setAmbient(<a class="code" href="namespaceOgre.html#a420">Real</a> red, <a class="code" href="namespaceOgre.html#a420">Real</a> green, <a class="code" href="namespaceOgre.html#a420">Real</a> blue); |
---|
105 | 00152 |
---|
106 | 00161 <span class="keywordtype">void</span> setAmbient(<span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& ambient); |
---|
107 | 00162 |
---|
108 | 00171 <span class="keywordtype">void</span> setDiffuse(<a class="code" href="namespaceOgre.html#a420">Real</a> red, <a class="code" href="namespaceOgre.html#a420">Real</a> green, <a class="code" href="namespaceOgre.html#a420">Real</a> blue, <a class="code" href="namespaceOgre.html#a420">Real</a> alpha); |
---|
109 | 00172 |
---|
110 | 00181 <span class="keywordtype">void</span> setDiffuse(<span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& diffuse); |
---|
111 | 00182 |
---|
112 | 00191 <span class="keywordtype">void</span> setSpecular(<a class="code" href="namespaceOgre.html#a420">Real</a> red, <a class="code" href="namespaceOgre.html#a420">Real</a> green, <a class="code" href="namespaceOgre.html#a420">Real</a> blue, <a class="code" href="namespaceOgre.html#a420">Real</a> alpha); |
---|
113 | 00192 |
---|
114 | 00201 <span class="keywordtype">void</span> setSpecular(<span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& specular); |
---|
115 | 00202 |
---|
116 | 00211 <span class="keywordtype">void</span> setShininess(<a class="code" href="namespaceOgre.html#a420">Real</a> val); |
---|
117 | 00212 |
---|
118 | 00221 <span class="keywordtype">void</span> setSelfIllumination(<a class="code" href="namespaceOgre.html#a420">Real</a> red, <a class="code" href="namespaceOgre.html#a420">Real</a> green, <a class="code" href="namespaceOgre.html#a420">Real</a> blue); |
---|
119 | 00222 |
---|
120 | 00231 <span class="keywordtype">void</span> setSelfIllumination(<span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& selfIllum); |
---|
121 | 00232 |
---|
122 | 00241 <span class="keywordtype">void</span> setDepthCheckEnabled(<span class="keywordtype">bool</span> enabled); |
---|
123 | 00242 |
---|
124 | 00251 <span class="keywordtype">void</span> setDepthWriteEnabled(<span class="keywordtype">bool</span> enabled); |
---|
125 | 00252 |
---|
126 | 00261 <span class="keywordtype">void</span> setDepthFunction( CompareFunction func ); |
---|
127 | 00262 |
---|
128 | 00271 <span class="keywordtype">void</span> setColourWriteEnabled(<span class="keywordtype">bool</span> enabled); |
---|
129 | 00272 |
---|
130 | 00281 <span class="keywordtype">void</span> setCullingMode( CullingMode mode ); |
---|
131 | 00282 |
---|
132 | 00291 <span class="keywordtype">void</span> setManualCullingMode( ManualCullingMode mode ); |
---|
133 | 00292 |
---|
134 | 00301 <span class="keywordtype">void</span> setLightingEnabled(<span class="keywordtype">bool</span> enabled); |
---|
135 | 00302 |
---|
136 | 00311 <span class="keywordtype">void</span> setShadingMode( ShadeOptions mode ); |
---|
137 | 00312 |
---|
138 | 00321 <span class="keywordtype">void</span> setFog( |
---|
139 | 00322 <span class="keywordtype">bool</span> overrideScene, |
---|
140 | 00323 FogMode mode = FOG_NONE, |
---|
141 | 00324 <span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& colour = ColourValue::White, |
---|
142 | 00325 <a class="code" href="namespaceOgre.html#a420">Real</a> expDensity = 0.001, <a class="code" href="namespaceOgre.html#a420">Real</a> linearStart = 0.0, <a class="code" href="namespaceOgre.html#a420">Real</a> linearEnd = 1.0 ); |
---|
143 | 00326 |
---|
144 | 00335 <span class="keywordtype">void</span> setDepthBias(<a class="code" href="namespaceOgre.html#a422">ushort</a> bias); |
---|
145 | 00336 |
---|
146 | 00345 <span class="keywordtype">void</span> setTextureFiltering(TextureFilterOptions filterType); |
---|
147 | 00354 <span class="keywordtype">void</span> setTextureAnisotropy(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> maxAniso); |
---|
148 | 00355 |
---|
149 | 00364 <span class="keywordtype">void</span> setSceneBlending( <span class="keyword">const</span> SceneBlendType sbt ); |
---|
150 | 00365 |
---|
151 | 00374 <span class="keywordtype">void</span> setSceneBlending( <span class="keyword">const</span> SceneBlendFactor sourceFactor, <span class="keyword">const</span> SceneBlendFactor destFactor); |
---|
152 | 00375 |
---|
153 | 00392 <span class="keywordtype">void</span> setLodIndex(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index); |
---|
154 | <a name="l00394"></a><a class="code" href="classOgre_1_1Technique.html#Ogre_1_1Techniquea45">00394</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getLodIndex(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mLodIndex; } |
---|
155 | 00395 |
---|
156 | 00397 <span class="keywordtype">bool</span> isDepthWriteEnabled(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
157 | 00398 |
---|
158 | 00400 <span class="keywordtype">bool</span> isDepthCheckEnabled(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
159 | 00401 |
---|
160 | 00402 }; |
---|
161 | 00403 |
---|
162 | 00404 |
---|
163 | 00405 } |
---|
164 | 00406 <span class="preprocessor">#endif</span> |
---|
165 | </pre></div><hr> |
---|
166 | <p> |
---|
167 | Copyright © 2000-2005 by The OGRE Team<br /> |
---|
168 | <!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><br/> |
---|
169 | This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.<br/> |
---|
170 | <!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> |
---|
171 | <Work rdf:about=""> |
---|
172 | <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> |
---|
173 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> |
---|
174 | </Work> |
---|
175 | <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> --> |
---|
176 | |
---|
177 | Last modified Sun Feb 12 12:59:53 2006 |
---|
178 | </p> |
---|
179 | </body> |
---|
180 | </html> |
---|