1 | <html> |
---|
2 | <head> |
---|
3 | <title>OgreExternalTextureSource.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>OgreExternalTextureSource.h</h1><a href="OgreExternalTextureSource_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 _OgreExternalTextureSource_H</span> |
---|
35 | 00026 <span class="preprocessor"></span><span class="preprocessor">#define _OgreExternalTextureSource_H</span> |
---|
36 | 00027 <span class="preprocessor"></span> |
---|
37 | 00028 <span class="comment">/***************************************************************************</span> |
---|
38 | 00029 <span class="comment">OgreExternalTextureSource.h - </span> |
---|
39 | 00030 <span class="comment"> Base class that texture plugins need to derive from. This provides the hooks</span> |
---|
40 | 00031 <span class="comment"> neccessary for a plugin developer to easily extend the functionality of dynamic textures.</span> |
---|
41 | 00032 <span class="comment"> It makes creation/destruction of dynamic textures more streamlined. While the plugin</span> |
---|
42 | 00033 <span class="comment"> will need to talk with Ogre for the actual modification of textures, this class allows</span> |
---|
43 | 00034 <span class="comment"> easy integration with Ogre apps. Material script files can be used to aid in the </span> |
---|
44 | 00035 <span class="comment"> creation of dynamic textures. Functionality can be added that is not defined here</span> |
---|
45 | 00036 <span class="comment"> through the use of the base dictionary. For an exmaple of how to use this class and the</span> |
---|
46 | 00037 <span class="comment"> string interface see ffmpegVideoPlugIn.</span> |
---|
47 | 00038 <span class="comment"></span> |
---|
48 | 00039 <span class="comment">-------------------</span> |
---|
49 | 00040 <span class="comment">date : Jan 1 2004</span> |
---|
50 | 00041 <span class="comment">email : pjcast@yahoo.com</span> |
---|
51 | 00042 <span class="comment">***************************************************************************/</span> |
---|
52 | 00043 |
---|
53 | 00044 <span class="preprocessor">#include "<a class="code" href="OgreStringInterface_8h.html">OgreStringInterface.h</a>"</span> |
---|
54 | 00045 <span class="preprocessor">#include "<a class="code" href="OgreResourceGroupManager_8h.html">OgreResourceGroupManager.h</a>"</span> |
---|
55 | 00046 |
---|
56 | 00047 <span class="keyword">namespace </span>Ogre |
---|
57 | 00048 { |
---|
58 | <a name="l00050"></a><a class="code" href="namespaceOgre.html#a649">00050</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a649">eTexturePlayMode</a> |
---|
59 | 00051 { |
---|
60 | 00052 <a class="code" href="namespaceOgre.html#a649a122">TextureEffectPause</a> = 0, |
---|
61 | 00053 <a class="code" href="namespaceOgre.html#a649a123">TextureEffectPlay_ASAP</a> = 1, |
---|
62 | 00054 <a class="code" href="namespaceOgre.html#a649a124">TextureEffectPlay_Looping</a> = 2 |
---|
63 | 00055 }; |
---|
64 | 00056 |
---|
65 | <a name="l00064"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html">00064</a> <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> ExternalTextureSource : <span class="keyword">public</span> <a class="code" href="classOgre_1_1StringInterface.html">StringInterface</a> |
---|
66 | 00065 { |
---|
67 | 00066 <span class="keyword">public</span>: |
---|
68 | 00068 ExternalTextureSource(); |
---|
69 | <a name="l00070"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcea1">00070</a> <span class="keyword">virtual</span> ~ExternalTextureSource() {} |
---|
70 | 00071 |
---|
71 | 00072 <span class="comment">//------------------------------------------------------------------------------//</span> |
---|
72 | 00073 <span class="comment">/* Command objects for specifying some base features */</span> |
---|
73 | 00074 <span class="comment">/* Any PlugIns wishing to add more specific params to "ExternalTextureSourcePlugins"*/</span> |
---|
74 | 00075 <span class="comment">/* dictionary, feel free to do so, that's why this is here */</span> |
---|
75 | <a name="l00076"></a><a class="code" href="classOgre_1_1ExternalTextureSource_1_1CmdInputFileName.html">00076</a> <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a17">_OgrePrivate</a> CmdInputFileName : <span class="keyword">public</span> <a class="code" href="classOgre_1_1ParamCommand.html">ParamCommand</a> |
---|
76 | 00077 { |
---|
77 | 00078 <span class="keyword">public</span>: |
---|
78 | 00079 <a class="code" href="namespaceOgre.html#a426">String</a> doGet(<span class="keyword">const</span> <span class="keywordtype">void</span>* target) <span class="keyword">const</span>; |
---|
79 | 00080 <span class="keywordtype">void</span> doSet(<span class="keywordtype">void</span>* target, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& val); |
---|
80 | 00081 }; |
---|
81 | <a name="l00082"></a><a class="code" href="classOgre_1_1ExternalTextureSource_1_1CmdFPS.html">00082</a> <span class="keyword">class </span><a class="code" href="class__OgrePrivate.html">_OgrePrivate</a> CmdFPS : <span class="keyword">public</span> <a class="code" href="classOgre_1_1ParamCommand.html">ParamCommand</a> |
---|
82 | 00083 { |
---|
83 | 00084 <span class="keyword">public</span>: |
---|
84 | 00085 <a class="code" href="namespaceOgre.html#a426">String</a> doGet(<span class="keyword">const</span> <span class="keywordtype">void</span>* target) <span class="keyword">const</span>; |
---|
85 | 00086 <span class="keywordtype">void</span> doSet(<span class="keywordtype">void</span>* target, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& val); |
---|
86 | 00087 }; |
---|
87 | <a name="l00088"></a><a class="code" href="classOgre_1_1ExternalTextureSource_1_1CmdPlayMode.html">00088</a> <span class="keyword">class </span><a class="code" href="class__OgrePrivate.html">_OgrePrivate</a> CmdPlayMode : <span class="keyword">public</span> <a class="code" href="classOgre_1_1ParamCommand.html">ParamCommand</a> |
---|
88 | 00089 { |
---|
89 | 00090 <span class="keyword">public</span>: |
---|
90 | 00091 <a class="code" href="namespaceOgre.html#a426">String</a> doGet(<span class="keyword">const</span> <span class="keywordtype">void</span>* target) <span class="keyword">const</span>; |
---|
91 | 00092 <span class="keywordtype">void</span> doSet(<span class="keywordtype">void</span>* target, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& val); |
---|
92 | 00093 }; |
---|
93 | <a name="l00094"></a><a class="code" href="classOgre_1_1ExternalTextureSource_1_1CmdTecPassState.html">00094</a> <span class="keyword">class </span><a class="code" href="class__OgrePrivate.html">_OgrePrivate</a> CmdTecPassState : <span class="keyword">public</span> <a class="code" href="classOgre_1_1ParamCommand.html">ParamCommand</a> |
---|
94 | 00095 { |
---|
95 | 00096 <span class="keyword">public</span>: |
---|
96 | 00097 <a class="code" href="namespaceOgre.html#a426">String</a> doGet(<span class="keyword">const</span> <span class="keywordtype">void</span>* target) <span class="keyword">const</span>; |
---|
97 | 00098 <span class="keywordtype">void</span> doSet(<span class="keywordtype">void</span>* target, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& val); |
---|
98 | 00099 }; |
---|
99 | 00100 <span class="comment">//--------------------------------------------------------//</span> |
---|
100 | 00101 <span class="comment">//Base Functions that work with Command String Interface... Or can be called</span> |
---|
101 | 00102 <span class="comment">//manually to create video through code </span> |
---|
102 | 00103 |
---|
103 | <a name="l00105"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcea2">00105</a> <span class="keywordtype">void</span> setInputName( <a class="code" href="namespaceOgre.html#a426">String</a> sIN ) { mInputFileName = sIN; } |
---|
104 | <a name="l00107"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcea3">00107</a> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& getInputName( )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mInputFileName; } |
---|
105 | <a name="l00109"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcea4">00109</a> <span class="keywordtype">void</span> setFPS( <span class="keywordtype">int</span> iFPS ) { mFramesPerSecond = iFPS; } |
---|
106 | <a name="l00111"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcea5">00111</a> <span class="keyword">const</span> <span class="keywordtype">int</span> getFPS( )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mFramesPerSecond; } |
---|
107 | <a name="l00113"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcea6">00113</a> <span class="keywordtype">void</span> setPlayMode( eTexturePlayMode eMode ) { mMode = eMode; } |
---|
108 | <a name="l00115"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcea7">00115</a> <a class="code" href="namespaceOgre.html#a649">eTexturePlayMode</a> getPlayMode()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mMode; } |
---|
109 | 00116 |
---|
110 | <a name="l00118"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcea8">00118</a> <span class="keywordtype">void</span> setTextureTecPassStateLevel( <span class="keywordtype">int</span> t, <span class="keywordtype">int</span> p, <span class="keywordtype">int</span> s ) |
---|
111 | 00119 { mTechniqueLevel = t;mPassLevel = p;mStateLevel = s; } |
---|
112 | <a name="l00121"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcea9">00121</a> <span class="keywordtype">void</span> getTextureTecPassStateLevel( <span class="keywordtype">int</span>& t, <span class="keywordtype">int</span>& p, <span class="keywordtype">int</span>& s )<span class="keyword"> const</span> |
---|
113 | 00122 <span class="keyword"> </span>{t = mTechniqueLevel; p = mPassLevel; s = mStateLevel;} |
---|
114 | 00123 |
---|
115 | 00125 <span class="keywordtype">void</span> addBaseParams(); |
---|
116 | 00126 |
---|
117 | <a name="l00128"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcea11">00128</a> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& getPlugInStringName( ) { <span class="keywordflow">return</span> mPlugInName; } |
---|
118 | <a name="l00130"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcea12">00130</a> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& getDictionaryStringName( ) { <span class="keywordflow">return</span> mDictionaryName; } |
---|
119 | 00131 |
---|
120 | 00132 <span class="comment">//Pure virtual functions that plugins must Override</span> |
---|
121 | 00134 <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> initialise() = 0; |
---|
122 | 00136 <span class="keyword">virtual</span> <span class="keywordtype">void</span> shutDown() = 0; |
---|
123 | 00137 |
---|
124 | 00142 <span class="keyword">virtual</span> <span class="keywordtype">void</span> createDefinedTexture( <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& sMaterialName, |
---|
125 | 00143 <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) = 0; |
---|
126 | 00147 <span class="keyword">virtual</span> <span class="keywordtype">void</span> destroyAdvancedTexture( <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& sTextureName, |
---|
127 | 00148 <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) = 0; |
---|
128 | 00149 |
---|
129 | 00150 <span class="keyword">protected</span>: |
---|
130 | <a name="l00151"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcet0">00151</a> <span class="keyword">static</span> CmdInputFileName msCmdInputFile; |
---|
131 | <a name="l00152"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcet1">00152</a> <span class="keyword">static</span> CmdFPS msCmdFramesPerSecond; |
---|
132 | <a name="l00153"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcet2">00153</a> <span class="keyword">static</span> CmdPlayMode msCmdPlayMode; |
---|
133 | <a name="l00154"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcet3">00154</a> <span class="keyword">static</span> CmdTecPassState msCmdTecPassState; |
---|
134 | 00155 |
---|
135 | 00156 |
---|
136 | <a name="l00158"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcep0">00158</a> <a class="code" href="namespaceOgre.html#a426">String</a> mPlugInName; |
---|
137 | 00159 |
---|
138 | 00160 <span class="comment">//------ Vars used for setting/getting dictionary stuff -----------//</span> |
---|
139 | <a name="l00161"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcep1">00161</a> <a class="code" href="namespaceOgre.html#a649">eTexturePlayMode</a> mMode; |
---|
140 | 00162 |
---|
141 | <a name="l00163"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcep2">00163</a> <a class="code" href="namespaceOgre.html#a426">String</a> mInputFileName; |
---|
142 | 00164 |
---|
143 | <a name="l00165"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcep3">00165</a> <span class="keywordtype">bool</span> mUpdateEveryFrame; |
---|
144 | 00166 |
---|
145 | <a name="l00167"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcep5">00167</a> <span class="keywordtype">int</span> mFramesPerSecond, |
---|
146 | 00168 mTechniqueLevel, |
---|
147 | 00169 mPassLevel, |
---|
148 | 00170 mStateLevel; |
---|
149 | 00171 <span class="comment">//------------------------------------------------------------------//</span> |
---|
150 | 00172 |
---|
151 | 00173 <span class="keyword">protected</span>: |
---|
152 | <a name="l00176"></a><a class="code" href="classOgre_1_1ExternalTextureSource.html#Ogre_1_1ExternalTextureSourcep8">00176</a> <a class="code" href="namespaceOgre.html#a426">String</a> mDictionaryName; |
---|
153 | 00177 }; |
---|
154 | 00178 } |
---|
155 | 00179 |
---|
156 | 00180 <span class="preprocessor">#endif</span> |
---|
157 | </pre></div><hr> |
---|
158 | <p> |
---|
159 | Copyright © 2000-2005 by The OGRE Team<br /> |
---|
160 | <!--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/> |
---|
161 | 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/> |
---|
162 | <!--/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#"> |
---|
163 | <Work rdf:about=""> |
---|
164 | <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> |
---|
165 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> |
---|
166 | </Work> |
---|
167 | <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> --> |
---|
168 | |
---|
169 | Last modified Sun Feb 12 12:59:44 2006 |
---|
170 | </p> |
---|
171 | </body> |
---|
172 | </html> |
---|