1 | <html> |
---|
2 | <head> |
---|
3 | <title>OgreBillboard.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>OgreBillboard.h</h1><a href="OgreBillboard_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 |
---|
35 | 00026 <span class="preprocessor">#ifndef __Billboard_H__</span> |
---|
36 | 00027 <span class="preprocessor"></span><span class="preprocessor">#define __Billboard_H__</span> |
---|
37 | 00028 <span class="preprocessor"></span> |
---|
38 | 00029 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span> |
---|
39 | 00030 |
---|
40 | 00031 <span class="preprocessor">#include "<a class="code" href="OgreVector3_8h.html">OgreVector3.h</a>"</span> |
---|
41 | 00032 <span class="preprocessor">#include "<a class="code" href="OgreColourValue_8h.html">OgreColourValue.h</a>"</span> |
---|
42 | 00033 <span class="preprocessor">#include "<a class="code" href="OgreCommon_8h.html">OgreCommon.h</a>"</span> |
---|
43 | 00034 |
---|
44 | 00035 <span class="keyword">namespace </span>Ogre { |
---|
45 | 00036 |
---|
46 | <a name="l00057"></a><a class="code" href="classOgre_1_1Billboard.html">00057</a> <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> Billboard |
---|
47 | 00058 { |
---|
48 | <a name="l00059"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboardn0">00059</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOgre_1_1BillboardSet.html">BillboardSet</a>; |
---|
49 | <a name="l00060"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboardn1">00060</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOgre_1_1BillboardParticleRenderer.html">BillboardParticleRenderer</a>; |
---|
50 | 00061 <span class="keyword">protected</span>: |
---|
51 | <a name="l00062"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboardp0">00062</a> <span class="keywordtype">bool</span> mOwnDimensions; |
---|
52 | <a name="l00063"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboardp1">00063</a> <span class="keywordtype">bool</span> mUseTexcoordRect; |
---|
53 | <a name="l00064"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboardp2">00064</a> <a class="code" href="namespaceOgre.html#a456">uint16</a> mTexcoordIndex; <span class="comment">// index into the BillboardSet array of texture coordinates</span> |
---|
54 | <a name="l00065"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboardp3">00065</a> <a class="code" href="structOgre_1_1TRect.html">FloatRect</a> mTexcoordRect; <span class="comment">// individual texture coordinates</span> |
---|
55 | <a name="l00066"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboardp4">00066</a> <a class="code" href="namespaceOgre.html#a465">Real</a> mWidth; |
---|
56 | <a name="l00067"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboardp5">00067</a> <a class="code" href="namespaceOgre.html#a465">Real</a> mHeight; |
---|
57 | 00068 <span class="keyword">public</span>: |
---|
58 | 00069 <span class="comment">// Note the intentional public access to main internal variables used at runtime</span> |
---|
59 | 00070 <span class="comment">// Forcing access via get/set would be too costly for 000's of billboards</span> |
---|
60 | <a name="l00071"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboardo0">00071</a> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a> mPosition; |
---|
61 | 00072 <span class="comment">// Normalised direction vector</span> |
---|
62 | <a name="l00073"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboardo1">00073</a> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a> mDirection; |
---|
63 | <a name="l00074"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboardo2">00074</a> <a class="code" href="classOgre_1_1BillboardSet.html">BillboardSet</a>* mParentSet; |
---|
64 | <a name="l00075"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboardo3">00075</a> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a> mColour; |
---|
65 | <a name="l00076"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboardo4">00076</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a> mRotation; |
---|
66 | 00077 |
---|
67 | 00080 Billboard(); |
---|
68 | 00081 |
---|
69 | 00084 ~Billboard(); |
---|
70 | 00085 |
---|
71 | 00088 Billboard(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& position, <a class="code" href="classOgre_1_1BillboardSet.html">BillboardSet</a>* owner, <span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& colour = ColourValue::White); |
---|
72 | 00089 |
---|
73 | <a name="l00094"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboarda3">00094</a> <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& getRotation(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mRotation; } |
---|
74 | 00095 |
---|
75 | 00100 <span class="keywordtype">void</span> setRotation(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& rotation); |
---|
76 | 00101 |
---|
77 | 00107 <span class="keywordtype">void</span> setPosition(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& position); |
---|
78 | 00108 |
---|
79 | 00114 <span class="keywordtype">void</span> setPosition(<a class="code" href="namespaceOgre.html#a465">Real</a> x, <a class="code" href="namespaceOgre.html#a465">Real</a> y, <a class="code" href="namespaceOgre.html#a465">Real</a> z); |
---|
80 | 00115 |
---|
81 | 00121 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& getPosition(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
82 | 00122 |
---|
83 | 00130 <span class="keywordtype">void</span> setDimensions(<a class="code" href="namespaceOgre.html#a465">Real</a> width, <a class="code" href="namespaceOgre.html#a465">Real</a> height); |
---|
84 | 00131 |
---|
85 | <a name="l00133"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboarda9">00133</a> <span class="keywordtype">void</span> resetDimensions(<span class="keywordtype">void</span>) { mOwnDimensions = <span class="keyword">false</span>; } |
---|
86 | 00140 <span class="keywordtype">void</span> setColour(<span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& colour); |
---|
87 | 00141 |
---|
88 | 00144 <span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& getColour(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
89 | 00145 |
---|
90 | 00151 <span class="keywordtype">bool</span> hasOwnDimensions(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
91 | 00152 |
---|
92 | 00154 <a class="code" href="namespaceOgre.html#a465">Real</a> getOwnWidth(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
93 | 00155 |
---|
94 | 00157 <a class="code" href="namespaceOgre.html#a465">Real</a> getOwnHeight(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
95 | 00158 |
---|
96 | 00161 <span class="keywordtype">void</span> _notifyOwner(<a class="code" href="classOgre_1_1BillboardSet.html">BillboardSet</a>* owner); |
---|
97 | 00162 |
---|
98 | <a name="l00172"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboarda16">00172</a> <span class="keywordtype">bool</span> isUseTexcoordRect(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mUseTexcoordRect; } |
---|
99 | 00173 |
---|
100 | 00181 <span class="keywordtype">void</span> setTexcoordIndex(<a class="code" href="namespaceOgre.html#a456">uint16</a> texcoordIndex); |
---|
101 | 00182 |
---|
102 | <a name="l00188"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboarda18">00188</a> <a class="code" href="namespaceOgre.html#a456">uint16</a> getTexcoordIndex(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mTexcoordIndex; } |
---|
103 | 00189 |
---|
104 | 00195 <span class="keywordtype">void</span> setTexcoordRect(<span class="keyword">const</span> <a class="code" href="structOgre_1_1TRect.html">FloatRect</a>& texcoordRect); |
---|
105 | 00196 |
---|
106 | 00202 <span class="keywordtype">void</span> setTexcoordRect(<a class="code" href="namespaceOgre.html#a465">Real</a> u0, <a class="code" href="namespaceOgre.html#a465">Real</a> v0, <a class="code" href="namespaceOgre.html#a465">Real</a> u1, <a class="code" href="namespaceOgre.html#a465">Real</a> v1); |
---|
107 | 00203 |
---|
108 | <a name="l00208"></a><a class="code" href="classOgre_1_1Billboard.html#Ogre_1_1Billboarda21">00208</a> <span class="keyword">const</span> <a class="code" href="structOgre_1_1TRect.html">FloatRect</a>& getTexcoordRect(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mTexcoordRect; } |
---|
109 | 00209 }; |
---|
110 | 00210 |
---|
111 | 00211 } |
---|
112 | 00212 |
---|
113 | 00213 <span class="preprocessor">#endif</span> |
---|
114 | </pre></div><hr> |
---|
115 | <p> |
---|
116 | Copyright © 2000-2005 by The OGRE Team<br /> |
---|
117 | <!--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/> |
---|
118 | 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/> |
---|
119 | <!--/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#"> |
---|
120 | <Work rdf:about=""> |
---|
121 | <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> |
---|
122 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> |
---|
123 | </Work> |
---|
124 | <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> --> |
---|
125 | |
---|
126 | Last modified Sun Mar 12 14:37:37 2006 |
---|
127 | </p> |
---|
128 | </body> |
---|
129 | </html> |
---|