source: OGRE/trunk/ogrenew/Docs/api/html/classOgre_1_1PixelUtil.html @ 692

Revision 692, 54.6 KB checked in by mattausch, 18 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1<html>
2<head>
3<title>Ogre::PixelUtil class Reference - 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&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
10<h1>Ogre::PixelUtil Class Reference</h1>Some utility functions for packing and unpacking pixel data. 
11<a href="#_details">More...</a>
12<p>
13<code>#include &lt;<a class="el" href="OgrePixelFormat_8h-source.html">OgrePixelFormat.h</a>&gt;</code>
14<p>
15<a href="classOgre_1_1PixelUtil-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
16<tr><td></td></tr>
17<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
18<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile0">getNumElemBytes</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format)</td></tr>
19
20<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the size in bytes of an element of the given pixel format.  <a href="#Ogre_1_1PixelUtile0"></a><br><br></td></tr>
21<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile1">getNumElemBits</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format)</td></tr>
22
23<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the size in bits of an element of the given pixel format.  <a href="#Ogre_1_1PixelUtile1"></a><br><br></td></tr>
24<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile2">getMemorySize</a> (size_t width, size_t height, size_t depth, <a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format)</td></tr>
25
26<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the size in memory of a region with the given extents and pixel format with consecutive memory layout.  <a href="#Ogre_1_1PixelUtile2"></a><br><br></td></tr>
27<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile3">getFlags</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format)</td></tr>
28
29<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the property flags for this pixel format.  <a href="#Ogre_1_1PixelUtile3"></a><br><br></td></tr>
30<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile4">hasAlpha</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format)</td></tr>
31
32<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shortcut method to determine if the format has an alpha component.  <a href="#Ogre_1_1PixelUtile4"></a><br><br></td></tr>
33<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile5">isFloatingPoint</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format)</td></tr>
34
35<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shortcut method to determine if the format is floating point.  <a href="#Ogre_1_1PixelUtile5"></a><br><br></td></tr>
36<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile6">isCompressed</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format)</td></tr>
37
38<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shortcut method to determine if the format is compressed.  <a href="#Ogre_1_1PixelUtile6"></a><br><br></td></tr>
39<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile7">isDepth</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format)</td></tr>
40
41<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shortcut method to determine if the format is a depth format.  <a href="#Ogre_1_1PixelUtile7"></a><br><br></td></tr>
42<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile8">isNativeEndian</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format)</td></tr>
43
44<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shortcut method to determine if the format is in native endian format.  <a href="#Ogre_1_1PixelUtile8"></a><br><br></td></tr>
45<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile9">isLuminance</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format)</td></tr>
46
47<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shortcut method to determine if the format is a luminance format.  <a href="#Ogre_1_1PixelUtile9"></a><br><br></td></tr>
48<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile10">isValidExtent</a> (size_t width, size_t height, size_t depth, <a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format)</td></tr>
49
50<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return wether a certain image extent is valid for this image format.  <a href="#Ogre_1_1PixelUtile10"></a><br><br></td></tr>
51<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile11">getBitDepths</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format, int rgba[4])</td></tr>
52
53<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gives the number of bits (RGBA) for a format.  <a href="#Ogre_1_1PixelUtile11"></a><br><br></td></tr>
54<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile12">getBitMasks</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> format, <a class="el" href="namespaceOgre.html#a455">uint32</a> rgba[4])</td></tr>
55
56<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gives the masks for the R, G, B and A component.  <a href="#Ogre_1_1PixelUtile12"></a><br><br></td></tr>
57<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="namespaceOgre.html#a471">String</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile13">getFormatName</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> srcformat)</td></tr>
58
59<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the name of an image format.  <a href="#Ogre_1_1PixelUtile13"></a><br><br></td></tr>
60<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile14">isAccessible</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> srcformat)</td></tr>
61
62<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns wether the format can be packed or unpacked with the <a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile17">packColour()</a> and <a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile20">unpackColour()</a> functions.  <a href="#Ogre_1_1PixelUtile14"></a><br><br></td></tr>
63<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="namespaceOgre.html#a673">PixelComponentType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile15">getComponentType</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> fmt)</td></tr>
64
65<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the component type for a certain pixel format.  <a href="#Ogre_1_1PixelUtile15"></a><br><br></td></tr>
66<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile16">getComponentCount</a> (<a class="el" href="namespaceOgre.html#a671">PixelFormat</a> fmt)</td></tr>
67
68<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the component count for a certain pixel format.  <a href="#Ogre_1_1PixelUtile16"></a><br><br></td></tr>
69<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile17">packColour</a> (const <a class="el" href="classOgre_1_1ColourValue.html">ColourValue</a> &amp;colour, const <a class="el" href="namespaceOgre.html#a671">PixelFormat</a> pf, const void *dest)</td></tr>
70
71<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pack a colour value to memory.  <a href="#Ogre_1_1PixelUtile17"></a><br><br></td></tr>
72<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile18">packColour</a> (const <a class="el" href="namespaceOgre.html#a457">uint8</a> r, const <a class="el" href="namespaceOgre.html#a457">uint8</a> g, const <a class="el" href="namespaceOgre.html#a457">uint8</a> b, const <a class="el" href="namespaceOgre.html#a457">uint8</a> a, const <a class="el" href="namespaceOgre.html#a671">PixelFormat</a> pf, const void *dest)</td></tr>
73
74<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pack a colour value to memory.  <a href="#Ogre_1_1PixelUtile18"></a><br><br></td></tr>
75<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile19">packColour</a> (const float r, const float g, const float b, const float a, const <a class="el" href="namespaceOgre.html#a671">PixelFormat</a> pf, const void *dest)</td></tr>
76
77<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pack a colour value to memory.  <a href="#Ogre_1_1PixelUtile19"></a><br><br></td></tr>
78<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile20">unpackColour</a> (<a class="el" href="classOgre_1_1ColourValue.html">ColourValue</a> *colour, <a class="el" href="namespaceOgre.html#a671">PixelFormat</a> pf, const void *src)</td></tr>
79
80<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unpack a colour value from memory.  <a href="#Ogre_1_1PixelUtile20"></a><br><br></td></tr>
81<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile21">unpackColour</a> (<a class="el" href="namespaceOgre.html#a457">uint8</a> *r, <a class="el" href="namespaceOgre.html#a457">uint8</a> *g, <a class="el" href="namespaceOgre.html#a457">uint8</a> *b, <a class="el" href="namespaceOgre.html#a457">uint8</a> *a, <a class="el" href="namespaceOgre.html#a671">PixelFormat</a> pf, const void *src)</td></tr>
82
83<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unpack a colour value from memory.  <a href="#Ogre_1_1PixelUtile21"></a><br><br></td></tr>
84<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile22">unpackColour</a> (float *r, float *g, float *b, float *a, <a class="el" href="namespaceOgre.html#a671">PixelFormat</a> pf, const void *src)</td></tr>
85
86<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unpack a colour value from memory.  <a href="#Ogre_1_1PixelUtile22"></a><br><br></td></tr>
87<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile23">bulkPixelConversion</a> (void *src, <a class="el" href="namespaceOgre.html#a671">PixelFormat</a> srcFormat, void *dest, <a class="el" href="namespaceOgre.html#a671">PixelFormat</a> dstFormat, unsigned int count)</td></tr>
88
89<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert consecutive pixels from one format to another.  <a href="#Ogre_1_1PixelUtile23"></a><br><br></td></tr>
90<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile24">bulkPixelConversion</a> (const <a class="el" href="classOgre_1_1PixelBox.html">PixelBox</a> &amp;src, const <a class="el" href="classOgre_1_1PixelBox.html">PixelBox</a> &amp;dst)</td></tr>
91
92<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert pixels from one format to another.  <a href="#Ogre_1_1PixelUtile24"></a><br><br></td></tr>
93</table>
94<hr><a name="_details"></a><h2>Detailed Description</h2>
95Some utility functions for packing and unpacking pixel data.
96<p>
97
98<p>
99Definition at line <a class="el" href="OgrePixelFormat_8h-source.html#l00260">260</a> of file <a class="el" href="OgrePixelFormat_8h-source.html">OgrePixelFormat.h</a>.<hr><h2>Member Function Documentation</h2>
100<a class="anchor" name="Ogre_1_1PixelUtile24" doxytag="Ogre::PixelUtil::bulkPixelConversion" ></a><p>
101<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
102  <tr>
103    <td class="mdRow">
104      <table cellpadding="0" cellspacing="0" border="0">
105        <tr>
106          <td class="md" nowrap valign="top"> void Ogre::PixelUtil::bulkPixelConversion </td>
107          <td class="md" valign="top">(&nbsp;</td>
108          <td class="md" nowrap valign="top">const <a class="el" href="classOgre_1_1PixelBox.html">PixelBox</a> &amp;&nbsp;</td>
109          <td class="mdname" nowrap> <em>src</em>, </td>
110        </tr>
111        <tr>
112          <td class="md" nowrap align="right"></td>
113          <td></td>
114          <td class="md" nowrap>const <a class="el" href="classOgre_1_1PixelBox.html">PixelBox</a> &amp;&nbsp;</td>
115          <td class="mdname" nowrap> <em>dst</em></td>
116        </tr>
117        <tr>
118          <td></td>
119          <td class="md">)&nbsp;</td>
120          <td class="md" colspan="2"><code> [static]</code></td>
121        </tr>
122
123      </table>
124    </td>
125  </tr>
126</table>
127<table cellspacing=5 cellpadding=0 border=0>
128  <tr>
129    <td>
130      &nbsp;
131    </td>
132    <td>
133
134<p>
135Convert pixels from one format to another.
136<p>
137No dithering or filtering is being done. Converting from RGB to luminance takes the R channel. <dl compact><dt><b>Parameters:</b></dt><dd>
138  <table border="0" cellspacing="2" cellpadding="0">
139    <tr><td valign=top><em>src</em>&nbsp;</td><td><a class="el" href="classOgre_1_1PixelBox.html">PixelBox</a> containing the source pixels, pitches and format </td></tr>
140    <tr><td valign=top><em>dst</em>&nbsp;</td><td><a class="el" href="classOgre_1_1PixelBox.html">PixelBox</a> containing the destination pixels, pitches and format </td></tr>
141  </table>
142</dl>
143<dl compact><dt><b>Remarks:</b></dt><dd>The source and destination boxes must have the same dimensions. In case the source and destination format match, a plain copy is done. </dd></dl>
144    </td>
145  </tr>
146</table>
147<a class="anchor" name="Ogre_1_1PixelUtile23" doxytag="Ogre::PixelUtil::bulkPixelConversion" ></a><p>
148<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
149  <tr>
150    <td class="mdRow">
151      <table cellpadding="0" cellspacing="0" border="0">
152        <tr>
153          <td class="md" nowrap valign="top"> void Ogre::PixelUtil::bulkPixelConversion </td>
154          <td class="md" valign="top">(&nbsp;</td>
155          <td class="md" nowrap valign="top">void *&nbsp;</td>
156          <td class="mdname" nowrap> <em>src</em>, </td>
157        </tr>
158        <tr>
159          <td class="md" nowrap align="right"></td>
160          <td></td>
161          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
162          <td class="mdname" nowrap> <em>srcFormat</em>, </td>
163        </tr>
164        <tr>
165          <td class="md" nowrap align="right"></td>
166          <td></td>
167          <td class="md" nowrap>void *&nbsp;</td>
168          <td class="mdname" nowrap> <em>dest</em>, </td>
169        </tr>
170        <tr>
171          <td class="md" nowrap align="right"></td>
172          <td></td>
173          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
174          <td class="mdname" nowrap> <em>dstFormat</em>, </td>
175        </tr>
176        <tr>
177          <td class="md" nowrap align="right"></td>
178          <td></td>
179          <td class="md" nowrap>unsigned int&nbsp;</td>
180          <td class="mdname" nowrap> <em>count</em></td>
181        </tr>
182        <tr>
183          <td></td>
184          <td class="md">)&nbsp;</td>
185          <td class="md" colspan="2"><code> [static]</code></td>
186        </tr>
187
188      </table>
189    </td>
190  </tr>
191</table>
192<table cellspacing=5 cellpadding=0 border=0>
193  <tr>
194    <td>
195      &nbsp;
196    </td>
197    <td>
198
199<p>
200Convert consecutive pixels from one format to another.
201<p>
202No dithering or filtering is being done. Converting from RGB to luminance takes the R channel. In case the source and destination format match, just a copy is done. <dl compact><dt><b>Parameters:</b></dt><dd>
203  <table border="0" cellspacing="2" cellpadding="0">
204    <tr><td valign=top><em>src</em>&nbsp;</td><td>Pointer to source region </td></tr>
205    <tr><td valign=top><em>srcFormat</em>&nbsp;</td><td>Pixel format of source region </td></tr>
206    <tr><td valign=top><em>dst</em>&nbsp;</td><td>Pointer to destination region </td></tr>
207    <tr><td valign=top><em>dstFormat</em>&nbsp;</td><td>Pixel format of destination region </td></tr>
208  </table>
209</dl>
210    </td>
211  </tr>
212</table>
213<a class="anchor" name="Ogre_1_1PixelUtile11" doxytag="Ogre::PixelUtil::getBitDepths" ></a><p>
214<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
215  <tr>
216    <td class="mdRow">
217      <table cellpadding="0" cellspacing="0" border="0">
218        <tr>
219          <td class="md" nowrap valign="top"> void Ogre::PixelUtil::getBitDepths </td>
220          <td class="md" valign="top">(&nbsp;</td>
221          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
222          <td class="mdname" nowrap> <em>format</em>, </td>
223        </tr>
224        <tr>
225          <td class="md" nowrap align="right"></td>
226          <td></td>
227          <td class="md" nowrap>int&nbsp;</td>
228          <td class="mdname" nowrap> <em>rgba</em>[4]</td>
229        </tr>
230        <tr>
231          <td></td>
232          <td class="md">)&nbsp;</td>
233          <td class="md" colspan="2"><code> [static]</code></td>
234        </tr>
235
236      </table>
237    </td>
238  </tr>
239</table>
240<table cellspacing=5 cellpadding=0 border=0>
241  <tr>
242    <td>
243      &nbsp;
244    </td>
245    <td>
246
247<p>
248Gives the number of bits (RGBA) for a format.
249<p>
250See remarks. <dl compact><dt><b>Remarks:</b></dt><dd>For non-colour formats (dxt, depth) this returns [0,0,0,0]. </dd></dl>
251    </td>
252  </tr>
253</table>
254<a class="anchor" name="Ogre_1_1PixelUtile12" doxytag="Ogre::PixelUtil::getBitMasks" ></a><p>
255<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
256  <tr>
257    <td class="mdRow">
258      <table cellpadding="0" cellspacing="0" border="0">
259        <tr>
260          <td class="md" nowrap valign="top"> void Ogre::PixelUtil::getBitMasks </td>
261          <td class="md" valign="top">(&nbsp;</td>
262          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
263          <td class="mdname" nowrap> <em>format</em>, </td>
264        </tr>
265        <tr>
266          <td class="md" nowrap align="right"></td>
267          <td></td>
268          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a455">uint32</a>&nbsp;</td>
269          <td class="mdname" nowrap> <em>rgba</em>[4]</td>
270        </tr>
271        <tr>
272          <td></td>
273          <td class="md">)&nbsp;</td>
274          <td class="md" colspan="2"><code> [static]</code></td>
275        </tr>
276
277      </table>
278    </td>
279  </tr>
280</table>
281<table cellspacing=5 cellpadding=0 border=0>
282  <tr>
283    <td>
284      &nbsp;
285    </td>
286    <td>
287
288<p>
289Gives the masks for the R, G, B and A component.
290<p>
291<dl compact><dt><b>Note:</b></dt><dd>Only valid for native endian formats </dd></dl>
292    </td>
293  </tr>
294</table>
295<a class="anchor" name="Ogre_1_1PixelUtile16" doxytag="Ogre::PixelUtil::getComponentCount" ></a><p>
296<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
297  <tr>
298    <td class="mdRow">
299      <table cellpadding="0" cellspacing="0" border="0">
300        <tr>
301          <td class="md" nowrap valign="top"> size_t Ogre::PixelUtil::getComponentCount </td>
302          <td class="md" valign="top">(&nbsp;</td>
303          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
304          <td class="mdname1" valign="top" nowrap> <em>fmt</em>          </td>
305          <td class="md" valign="top">&nbsp;)&nbsp;</td>
306          <td class="md" nowrap><code> [static]</code></td>
307        </tr>
308
309      </table>
310    </td>
311  </tr>
312</table>
313<table cellspacing=5 cellpadding=0 border=0>
314  <tr>
315    <td>
316      &nbsp;
317    </td>
318    <td>
319
320<p>
321Returns the component count for a certain pixel format.
322<p>
323Returns 3(no alpha) or 4 (has alpha) in case there is no clear component type like with compressed formats.     </td>
324  </tr>
325</table>
326<a class="anchor" name="Ogre_1_1PixelUtile15" doxytag="Ogre::PixelUtil::getComponentType" ></a><p>
327<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
328  <tr>
329    <td class="mdRow">
330      <table cellpadding="0" cellspacing="0" border="0">
331        <tr>
332          <td class="md" nowrap valign="top"> <a class="el" href="namespaceOgre.html#a673">PixelComponentType</a> Ogre::PixelUtil::getComponentType </td>
333          <td class="md" valign="top">(&nbsp;</td>
334          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
335          <td class="mdname1" valign="top" nowrap> <em>fmt</em>          </td>
336          <td class="md" valign="top">&nbsp;)&nbsp;</td>
337          <td class="md" nowrap><code> [static]</code></td>
338        </tr>
339
340      </table>
341    </td>
342  </tr>
343</table>
344<table cellspacing=5 cellpadding=0 border=0>
345  <tr>
346    <td>
347      &nbsp;
348    </td>
349    <td>
350
351<p>
352Returns the component type for a certain pixel format.
353<p>
354Returns PCT_BYTE in case there is no clear component type like with compressed formats. This is one of PCT_BYTE, PCT_SHORT, PCT_FLOAT16, PCT_FLOAT32.     </td>
355  </tr>
356</table>
357<a class="anchor" name="Ogre_1_1PixelUtile3" doxytag="Ogre::PixelUtil::getFlags" ></a><p>
358<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
359  <tr>
360    <td class="mdRow">
361      <table cellpadding="0" cellspacing="0" border="0">
362        <tr>
363          <td class="md" nowrap valign="top"> unsigned int Ogre::PixelUtil::getFlags </td>
364          <td class="md" valign="top">(&nbsp;</td>
365          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
366          <td class="mdname1" valign="top" nowrap> <em>format</em>          </td>
367          <td class="md" valign="top">&nbsp;)&nbsp;</td>
368          <td class="md" nowrap><code> [static]</code></td>
369        </tr>
370
371      </table>
372    </td>
373  </tr>
374</table>
375<table cellspacing=5 cellpadding=0 border=0>
376  <tr>
377    <td>
378      &nbsp;
379    </td>
380    <td>
381
382<p>
383Returns the property flags for this pixel format.
384<p>
385<dl compact><dt><b>Returns:</b></dt><dd>A bitfield combination of PFF_HASALPHA, PFF_ISCOMPRESSED, PFF_FLOAT, PFF_DEPTH, PFF_NATIVEENDIAN, PFF_LUMINANCE </dd></dl>
386<dl compact><dt><b>Remarks:</b></dt><dd>This replaces the seperate functions for formatHasAlpha, formatIsFloat, ... </dd></dl>
387    </td>
388  </tr>
389</table>
390<a class="anchor" name="Ogre_1_1PixelUtile13" doxytag="Ogre::PixelUtil::getFormatName" ></a><p>
391<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
392  <tr>
393    <td class="mdRow">
394      <table cellpadding="0" cellspacing="0" border="0">
395        <tr>
396          <td class="md" nowrap valign="top"> <a class="el" href="namespaceOgre.html#a471">String</a> Ogre::PixelUtil::getFormatName </td>
397          <td class="md" valign="top">(&nbsp;</td>
398          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
399          <td class="mdname1" valign="top" nowrap> <em>srcformat</em>          </td>
400          <td class="md" valign="top">&nbsp;)&nbsp;</td>
401          <td class="md" nowrap><code> [static]</code></td>
402        </tr>
403
404      </table>
405    </td>
406  </tr>
407</table>
408<table cellspacing=5 cellpadding=0 border=0>
409  <tr>
410    <td>
411      &nbsp;
412    </td>
413    <td>
414
415<p>
416Gets the name of an image format.
417<p>
418    </td>
419  </tr>
420</table>
421<a class="anchor" name="Ogre_1_1PixelUtile2" doxytag="Ogre::PixelUtil::getMemorySize" ></a><p>
422<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
423  <tr>
424    <td class="mdRow">
425      <table cellpadding="0" cellspacing="0" border="0">
426        <tr>
427          <td class="md" nowrap valign="top"> size_t Ogre::PixelUtil::getMemorySize </td>
428          <td class="md" valign="top">(&nbsp;</td>
429          <td class="md" nowrap valign="top">size_t&nbsp;</td>
430          <td class="mdname" nowrap> <em>width</em>, </td>
431        </tr>
432        <tr>
433          <td class="md" nowrap align="right"></td>
434          <td></td>
435          <td class="md" nowrap>size_t&nbsp;</td>
436          <td class="mdname" nowrap> <em>height</em>, </td>
437        </tr>
438        <tr>
439          <td class="md" nowrap align="right"></td>
440          <td></td>
441          <td class="md" nowrap>size_t&nbsp;</td>
442          <td class="mdname" nowrap> <em>depth</em>, </td>
443        </tr>
444        <tr>
445          <td class="md" nowrap align="right"></td>
446          <td></td>
447          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
448          <td class="mdname" nowrap> <em>format</em></td>
449        </tr>
450        <tr>
451          <td></td>
452          <td class="md">)&nbsp;</td>
453          <td class="md" colspan="2"><code> [static]</code></td>
454        </tr>
455
456      </table>
457    </td>
458  </tr>
459</table>
460<table cellspacing=5 cellpadding=0 border=0>
461  <tr>
462    <td>
463      &nbsp;
464    </td>
465    <td>
466
467<p>
468Returns the size in memory of a region with the given extents and pixel format with consecutive memory layout.
469<p>
470<dl compact><dt><b>Parameters:</b></dt><dd>
471  <table border="0" cellspacing="2" cellpadding="0">
472    <tr><td valign=top><em>width</em>&nbsp;</td><td>The width of the area </td></tr>
473    <tr><td valign=top><em>height</em>&nbsp;</td><td>The height of the area </td></tr>
474    <tr><td valign=top><em>depth</em>&nbsp;</td><td>The depth of the area </td></tr>
475    <tr><td valign=top><em>format</em>&nbsp;</td><td>The format of the area </td></tr>
476  </table>
477</dl>
478<dl compact><dt><b>Returns:</b></dt><dd>The size in bytes </dd></dl>
479<dl compact><dt><b>Remarks:</b></dt><dd>In case that the format is non-compressed, this simply returns width*height*depth*PixelUtil::getNumElemBytes(format). In the compressed case, this does serious magic.</dd></dl>
480    </td>
481  </tr>
482</table>
483<a class="anchor" name="Ogre_1_1PixelUtile1" doxytag="Ogre::PixelUtil::getNumElemBits" ></a><p>
484<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
485  <tr>
486    <td class="mdRow">
487      <table cellpadding="0" cellspacing="0" border="0">
488        <tr>
489          <td class="md" nowrap valign="top"> size_t Ogre::PixelUtil::getNumElemBits </td>
490          <td class="md" valign="top">(&nbsp;</td>
491          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
492          <td class="mdname1" valign="top" nowrap> <em>format</em>          </td>
493          <td class="md" valign="top">&nbsp;)&nbsp;</td>
494          <td class="md" nowrap><code> [static]</code></td>
495        </tr>
496
497      </table>
498    </td>
499  </tr>
500</table>
501<table cellspacing=5 cellpadding=0 border=0>
502  <tr>
503    <td>
504      &nbsp;
505    </td>
506    <td>
507
508<p>
509Returns the size in bits of an element of the given pixel format.
510<p>
511<dl compact><dt><b>Returns:</b></dt><dd>The size in bits of an element. See Remarks. </dd></dl>
512<dl compact><dt><b>Remarks:</b></dt><dd>Passing PF_UNKNOWN will result in returning a size of 0 bits. </dd></dl>
513
514<p>
515Referenced by <a class="el" href="OgreD3D9Texture_8h-source.html#l00226">Ogre::D3D9RenderTexture::rebind()</a>.    </td>
516  </tr>
517</table>
518<a class="anchor" name="Ogre_1_1PixelUtile0" doxytag="Ogre::PixelUtil::getNumElemBytes" ></a><p>
519<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
520  <tr>
521    <td class="mdRow">
522      <table cellpadding="0" cellspacing="0" border="0">
523        <tr>
524          <td class="md" nowrap valign="top"> size_t Ogre::PixelUtil::getNumElemBytes </td>
525          <td class="md" valign="top">(&nbsp;</td>
526          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
527          <td class="mdname1" valign="top" nowrap> <em>format</em>          </td>
528          <td class="md" valign="top">&nbsp;)&nbsp;</td>
529          <td class="md" nowrap><code> [static]</code></td>
530        </tr>
531
532      </table>
533    </td>
534  </tr>
535</table>
536<table cellspacing=5 cellpadding=0 border=0>
537  <tr>
538    <td>
539      &nbsp;
540    </td>
541    <td>
542
543<p>
544Returns the size in bytes of an element of the given pixel format.
545<p>
546<dl compact><dt><b>Returns:</b></dt><dd>The size in bytes of an element. See Remarks. </dd></dl>
547<dl compact><dt><b>Remarks:</b></dt><dd>Passing PF_UNKNOWN will result in returning a size of 0 bytes. </dd></dl>
548    </td>
549  </tr>
550</table>
551<a class="anchor" name="Ogre_1_1PixelUtile4" doxytag="Ogre::PixelUtil::hasAlpha" ></a><p>
552<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
553  <tr>
554    <td class="mdRow">
555      <table cellpadding="0" cellspacing="0" border="0">
556        <tr>
557          <td class="md" nowrap valign="top"> bool Ogre::PixelUtil::hasAlpha </td>
558          <td class="md" valign="top">(&nbsp;</td>
559          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
560          <td class="mdname1" valign="top" nowrap> <em>format</em>          </td>
561          <td class="md" valign="top">&nbsp;)&nbsp;</td>
562          <td class="md" nowrap><code> [static]</code></td>
563        </tr>
564
565      </table>
566    </td>
567  </tr>
568</table>
569<table cellspacing=5 cellpadding=0 border=0>
570  <tr>
571    <td>
572      &nbsp;
573    </td>
574    <td>
575
576<p>
577Shortcut method to determine if the format has an alpha component.
578<p>
579    </td>
580  </tr>
581</table>
582<a class="anchor" name="Ogre_1_1PixelUtile14" doxytag="Ogre::PixelUtil::isAccessible" ></a><p>
583<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
584  <tr>
585    <td class="mdRow">
586      <table cellpadding="0" cellspacing="0" border="0">
587        <tr>
588          <td class="md" nowrap valign="top"> bool Ogre::PixelUtil::isAccessible </td>
589          <td class="md" valign="top">(&nbsp;</td>
590          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
591          <td class="mdname1" valign="top" nowrap> <em>srcformat</em>          </td>
592          <td class="md" valign="top">&nbsp;)&nbsp;</td>
593          <td class="md" nowrap><code> [static]</code></td>
594        </tr>
595
596      </table>
597    </td>
598  </tr>
599</table>
600<table cellspacing=5 cellpadding=0 border=0>
601  <tr>
602    <td>
603      &nbsp;
604    </td>
605    <td>
606
607<p>
608Returns wether the format can be packed or unpacked with the <a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile17">packColour()</a> and <a class="el" href="classOgre_1_1PixelUtil.html#Ogre_1_1PixelUtile20">unpackColour()</a> functions.
609<p>
610This is generally not true for compressed and depth formats as they are special. It can only be true for formats with a fixed element size. <dl compact><dt><b>Returns:</b></dt><dd>true if yes, otherwise false </dd></dl>
611    </td>
612  </tr>
613</table>
614<a class="anchor" name="Ogre_1_1PixelUtile6" doxytag="Ogre::PixelUtil::isCompressed" ></a><p>
615<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
616  <tr>
617    <td class="mdRow">
618      <table cellpadding="0" cellspacing="0" border="0">
619        <tr>
620          <td class="md" nowrap valign="top"> bool Ogre::PixelUtil::isCompressed </td>
621          <td class="md" valign="top">(&nbsp;</td>
622          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
623          <td class="mdname1" valign="top" nowrap> <em>format</em>          </td>
624          <td class="md" valign="top">&nbsp;)&nbsp;</td>
625          <td class="md" nowrap><code> [static]</code></td>
626        </tr>
627
628      </table>
629    </td>
630  </tr>
631</table>
632<table cellspacing=5 cellpadding=0 border=0>
633  <tr>
634    <td>
635      &nbsp;
636    </td>
637    <td>
638
639<p>
640Shortcut method to determine if the format is compressed.
641<p>
642    </td>
643  </tr>
644</table>
645<a class="anchor" name="Ogre_1_1PixelUtile7" doxytag="Ogre::PixelUtil::isDepth" ></a><p>
646<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
647  <tr>
648    <td class="mdRow">
649      <table cellpadding="0" cellspacing="0" border="0">
650        <tr>
651          <td class="md" nowrap valign="top"> bool Ogre::PixelUtil::isDepth </td>
652          <td class="md" valign="top">(&nbsp;</td>
653          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
654          <td class="mdname1" valign="top" nowrap> <em>format</em>          </td>
655          <td class="md" valign="top">&nbsp;)&nbsp;</td>
656          <td class="md" nowrap><code> [static]</code></td>
657        </tr>
658
659      </table>
660    </td>
661  </tr>
662</table>
663<table cellspacing=5 cellpadding=0 border=0>
664  <tr>
665    <td>
666      &nbsp;
667    </td>
668    <td>
669
670<p>
671Shortcut method to determine if the format is a depth format.
672<p>
673    </td>
674  </tr>
675</table>
676<a class="anchor" name="Ogre_1_1PixelUtile5" doxytag="Ogre::PixelUtil::isFloatingPoint" ></a><p>
677<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
678  <tr>
679    <td class="mdRow">
680      <table cellpadding="0" cellspacing="0" border="0">
681        <tr>
682          <td class="md" nowrap valign="top"> bool Ogre::PixelUtil::isFloatingPoint </td>
683          <td class="md" valign="top">(&nbsp;</td>
684          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
685          <td class="mdname1" valign="top" nowrap> <em>format</em>          </td>
686          <td class="md" valign="top">&nbsp;)&nbsp;</td>
687          <td class="md" nowrap><code> [static]</code></td>
688        </tr>
689
690      </table>
691    </td>
692  </tr>
693</table>
694<table cellspacing=5 cellpadding=0 border=0>
695  <tr>
696    <td>
697      &nbsp;
698    </td>
699    <td>
700
701<p>
702Shortcut method to determine if the format is floating point.
703<p>
704    </td>
705  </tr>
706</table>
707<a class="anchor" name="Ogre_1_1PixelUtile9" doxytag="Ogre::PixelUtil::isLuminance" ></a><p>
708<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
709  <tr>
710    <td class="mdRow">
711      <table cellpadding="0" cellspacing="0" border="0">
712        <tr>
713          <td class="md" nowrap valign="top"> bool Ogre::PixelUtil::isLuminance </td>
714          <td class="md" valign="top">(&nbsp;</td>
715          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
716          <td class="mdname1" valign="top" nowrap> <em>format</em>          </td>
717          <td class="md" valign="top">&nbsp;)&nbsp;</td>
718          <td class="md" nowrap><code> [static]</code></td>
719        </tr>
720
721      </table>
722    </td>
723  </tr>
724</table>
725<table cellspacing=5 cellpadding=0 border=0>
726  <tr>
727    <td>
728      &nbsp;
729    </td>
730    <td>
731
732<p>
733Shortcut method to determine if the format is a luminance format.
734<p>
735    </td>
736  </tr>
737</table>
738<a class="anchor" name="Ogre_1_1PixelUtile8" doxytag="Ogre::PixelUtil::isNativeEndian" ></a><p>
739<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
740  <tr>
741    <td class="mdRow">
742      <table cellpadding="0" cellspacing="0" border="0">
743        <tr>
744          <td class="md" nowrap valign="top"> bool Ogre::PixelUtil::isNativeEndian </td>
745          <td class="md" valign="top">(&nbsp;</td>
746          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
747          <td class="mdname1" valign="top" nowrap> <em>format</em>          </td>
748          <td class="md" valign="top">&nbsp;)&nbsp;</td>
749          <td class="md" nowrap><code> [static]</code></td>
750        </tr>
751
752      </table>
753    </td>
754  </tr>
755</table>
756<table cellspacing=5 cellpadding=0 border=0>
757  <tr>
758    <td>
759      &nbsp;
760    </td>
761    <td>
762
763<p>
764Shortcut method to determine if the format is in native endian format.
765<p>
766    </td>
767  </tr>
768</table>
769<a class="anchor" name="Ogre_1_1PixelUtile10" doxytag="Ogre::PixelUtil::isValidExtent" ></a><p>
770<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
771  <tr>
772    <td class="mdRow">
773      <table cellpadding="0" cellspacing="0" border="0">
774        <tr>
775          <td class="md" nowrap valign="top"> bool Ogre::PixelUtil::isValidExtent </td>
776          <td class="md" valign="top">(&nbsp;</td>
777          <td class="md" nowrap valign="top">size_t&nbsp;</td>
778          <td class="mdname" nowrap> <em>width</em>, </td>
779        </tr>
780        <tr>
781          <td class="md" nowrap align="right"></td>
782          <td></td>
783          <td class="md" nowrap>size_t&nbsp;</td>
784          <td class="mdname" nowrap> <em>height</em>, </td>
785        </tr>
786        <tr>
787          <td class="md" nowrap align="right"></td>
788          <td></td>
789          <td class="md" nowrap>size_t&nbsp;</td>
790          <td class="mdname" nowrap> <em>depth</em>, </td>
791        </tr>
792        <tr>
793          <td class="md" nowrap align="right"></td>
794          <td></td>
795          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
796          <td class="mdname" nowrap> <em>format</em></td>
797        </tr>
798        <tr>
799          <td></td>
800          <td class="md">)&nbsp;</td>
801          <td class="md" colspan="2"><code> [static]</code></td>
802        </tr>
803
804      </table>
805    </td>
806  </tr>
807</table>
808<table cellspacing=5 cellpadding=0 border=0>
809  <tr>
810    <td>
811      &nbsp;
812    </td>
813    <td>
814
815<p>
816Return wether a certain image extent is valid for this image format.
817<p>
818<dl compact><dt><b>Parameters:</b></dt><dd>
819  <table border="0" cellspacing="2" cellpadding="0">
820    <tr><td valign=top><em>width</em>&nbsp;</td><td>The width of the area </td></tr>
821    <tr><td valign=top><em>height</em>&nbsp;</td><td>The height of the area </td></tr>
822    <tr><td valign=top><em>depth</em>&nbsp;</td><td>The depth of the area </td></tr>
823    <tr><td valign=top><em>format</em>&nbsp;</td><td>The format of the area </td></tr>
824  </table>
825</dl>
826<dl compact><dt><b>Remarks:</b></dt><dd>For non-compressed formats, this is always true. For DXT formats, only sizes with a width and height multiple of 4 and depth 1 are allowed.</dd></dl>
827    </td>
828  </tr>
829</table>
830<a class="anchor" name="Ogre_1_1PixelUtile19" doxytag="Ogre::PixelUtil::packColour" ></a><p>
831<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
832  <tr>
833    <td class="mdRow">
834      <table cellpadding="0" cellspacing="0" border="0">
835        <tr>
836          <td class="md" nowrap valign="top"> void Ogre::PixelUtil::packColour </td>
837          <td class="md" valign="top">(&nbsp;</td>
838          <td class="md" nowrap valign="top">const float&nbsp;</td>
839          <td class="mdname" nowrap> <em>r</em>, </td>
840        </tr>
841        <tr>
842          <td class="md" nowrap align="right"></td>
843          <td></td>
844          <td class="md" nowrap>const float&nbsp;</td>
845          <td class="mdname" nowrap> <em>g</em>, </td>
846        </tr>
847        <tr>
848          <td class="md" nowrap align="right"></td>
849          <td></td>
850          <td class="md" nowrap>const float&nbsp;</td>
851          <td class="mdname" nowrap> <em>b</em>, </td>
852        </tr>
853        <tr>
854          <td class="md" nowrap align="right"></td>
855          <td></td>
856          <td class="md" nowrap>const float&nbsp;</td>
857          <td class="mdname" nowrap> <em>a</em>, </td>
858        </tr>
859        <tr>
860          <td class="md" nowrap align="right"></td>
861          <td></td>
862          <td class="md" nowrap>const <a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
863          <td class="mdname" nowrap> <em>pf</em>, </td>
864        </tr>
865        <tr>
866          <td class="md" nowrap align="right"></td>
867          <td></td>
868          <td class="md" nowrap>const void *&nbsp;</td>
869          <td class="mdname" nowrap> <em>dest</em></td>
870        </tr>
871        <tr>
872          <td></td>
873          <td class="md">)&nbsp;</td>
874          <td class="md" colspan="2"><code> [static]</code></td>
875        </tr>
876
877      </table>
878    </td>
879  </tr>
880</table>
881<table cellspacing=5 cellpadding=0 border=0>
882  <tr>
883    <td>
884      &nbsp;
885    </td>
886    <td>
887
888<p>
889Pack a colour value to memory.
890<p>
891<dl compact><dt><b>Parameters:</b></dt><dd>
892  <table border="0" cellspacing="2" cellpadding="0">
893    <tr><td valign=top><em>r,g,b,a</em>&nbsp;</td><td>The four colour components, range 0.0f to 1.0f (an exception to this case exists for floating point pixel formats, which don't clamp to 0.0f..1.0f) </td></tr>
894    <tr><td valign=top><em>pf</em>&nbsp;</td><td>Pixelformat in which to write the colour </td></tr>
895    <tr><td valign=top><em>dest</em>&nbsp;</td><td>Destination memory location </td></tr>
896  </table>
897</dl>
898    </td>
899  </tr>
900</table>
901<a class="anchor" name="Ogre_1_1PixelUtile18" doxytag="Ogre::PixelUtil::packColour" ></a><p>
902<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
903  <tr>
904    <td class="mdRow">
905      <table cellpadding="0" cellspacing="0" border="0">
906        <tr>
907          <td class="md" nowrap valign="top"> void Ogre::PixelUtil::packColour </td>
908          <td class="md" valign="top">(&nbsp;</td>
909          <td class="md" nowrap valign="top">const <a class="el" href="namespaceOgre.html#a457">uint8</a>&nbsp;</td>
910          <td class="mdname" nowrap> <em>r</em>, </td>
911        </tr>
912        <tr>
913          <td class="md" nowrap align="right"></td>
914          <td></td>
915          <td class="md" nowrap>const <a class="el" href="namespaceOgre.html#a457">uint8</a>&nbsp;</td>
916          <td class="mdname" nowrap> <em>g</em>, </td>
917        </tr>
918        <tr>
919          <td class="md" nowrap align="right"></td>
920          <td></td>
921          <td class="md" nowrap>const <a class="el" href="namespaceOgre.html#a457">uint8</a>&nbsp;</td>
922          <td class="mdname" nowrap> <em>b</em>, </td>
923        </tr>
924        <tr>
925          <td class="md" nowrap align="right"></td>
926          <td></td>
927          <td class="md" nowrap>const <a class="el" href="namespaceOgre.html#a457">uint8</a>&nbsp;</td>
928          <td class="mdname" nowrap> <em>a</em>, </td>
929        </tr>
930        <tr>
931          <td class="md" nowrap align="right"></td>
932          <td></td>
933          <td class="md" nowrap>const <a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
934          <td class="mdname" nowrap> <em>pf</em>, </td>
935        </tr>
936        <tr>
937          <td class="md" nowrap align="right"></td>
938          <td></td>
939          <td class="md" nowrap>const void *&nbsp;</td>
940          <td class="mdname" nowrap> <em>dest</em></td>
941        </tr>
942        <tr>
943          <td></td>
944          <td class="md">)&nbsp;</td>
945          <td class="md" colspan="2"><code> [static]</code></td>
946        </tr>
947
948      </table>
949    </td>
950  </tr>
951</table>
952<table cellspacing=5 cellpadding=0 border=0>
953  <tr>
954    <td>
955      &nbsp;
956    </td>
957    <td>
958
959<p>
960Pack a colour value to memory.
961<p>
962<dl compact><dt><b>Parameters:</b></dt><dd>
963  <table border="0" cellspacing="2" cellpadding="0">
964    <tr><td valign=top><em>r,g,b,a</em>&nbsp;</td><td>The four colour components, range 0x00 to 0xFF </td></tr>
965    <tr><td valign=top><em>pf</em>&nbsp;</td><td>Pixelformat in which to write the colour </td></tr>
966    <tr><td valign=top><em>dest</em>&nbsp;</td><td>Destination memory location </td></tr>
967  </table>
968</dl>
969    </td>
970  </tr>
971</table>
972<a class="anchor" name="Ogre_1_1PixelUtile17" doxytag="Ogre::PixelUtil::packColour" ></a><p>
973<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
974  <tr>
975    <td class="mdRow">
976      <table cellpadding="0" cellspacing="0" border="0">
977        <tr>
978          <td class="md" nowrap valign="top"> void Ogre::PixelUtil::packColour </td>
979          <td class="md" valign="top">(&nbsp;</td>
980          <td class="md" nowrap valign="top">const <a class="el" href="classOgre_1_1ColourValue.html">ColourValue</a> &amp;&nbsp;</td>
981          <td class="mdname" nowrap> <em>colour</em>, </td>
982        </tr>
983        <tr>
984          <td class="md" nowrap align="right"></td>
985          <td></td>
986          <td class="md" nowrap>const <a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
987          <td class="mdname" nowrap> <em>pf</em>, </td>
988        </tr>
989        <tr>
990          <td class="md" nowrap align="right"></td>
991          <td></td>
992          <td class="md" nowrap>const void *&nbsp;</td>
993          <td class="mdname" nowrap> <em>dest</em></td>
994        </tr>
995        <tr>
996          <td></td>
997          <td class="md">)&nbsp;</td>
998          <td class="md" colspan="2"><code> [static]</code></td>
999        </tr>
1000
1001      </table>
1002    </td>
1003  </tr>
1004</table>
1005<table cellspacing=5 cellpadding=0 border=0>
1006  <tr>
1007    <td>
1008      &nbsp;
1009    </td>
1010    <td>
1011
1012<p>
1013Pack a colour value to memory.
1014<p>
1015<dl compact><dt><b>Parameters:</b></dt><dd>
1016  <table border="0" cellspacing="2" cellpadding="0">
1017    <tr><td valign=top><em>colour</em>&nbsp;</td><td>The colour </td></tr>
1018    <tr><td valign=top><em>pf</em>&nbsp;</td><td>Pixelformat in which to write the colour </td></tr>
1019    <tr><td valign=top><em>dest</em>&nbsp;</td><td>Destination memory location </td></tr>
1020  </table>
1021</dl>
1022    </td>
1023  </tr>
1024</table>
1025<a class="anchor" name="Ogre_1_1PixelUtile22" doxytag="Ogre::PixelUtil::unpackColour" ></a><p>
1026<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1027  <tr>
1028    <td class="mdRow">
1029      <table cellpadding="0" cellspacing="0" border="0">
1030        <tr>
1031          <td class="md" nowrap valign="top"> void Ogre::PixelUtil::unpackColour </td>
1032          <td class="md" valign="top">(&nbsp;</td>
1033          <td class="md" nowrap valign="top">float *&nbsp;</td>
1034          <td class="mdname" nowrap> <em>r</em>, </td>
1035        </tr>
1036        <tr>
1037          <td class="md" nowrap align="right"></td>
1038          <td></td>
1039          <td class="md" nowrap>float *&nbsp;</td>
1040          <td class="mdname" nowrap> <em>g</em>, </td>
1041        </tr>
1042        <tr>
1043          <td class="md" nowrap align="right"></td>
1044          <td></td>
1045          <td class="md" nowrap>float *&nbsp;</td>
1046          <td class="mdname" nowrap> <em>b</em>, </td>
1047        </tr>
1048        <tr>
1049          <td class="md" nowrap align="right"></td>
1050          <td></td>
1051          <td class="md" nowrap>float *&nbsp;</td>
1052          <td class="mdname" nowrap> <em>a</em>, </td>
1053        </tr>
1054        <tr>
1055          <td class="md" nowrap align="right"></td>
1056          <td></td>
1057          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
1058          <td class="mdname" nowrap> <em>pf</em>, </td>
1059        </tr>
1060        <tr>
1061          <td class="md" nowrap align="right"></td>
1062          <td></td>
1063          <td class="md" nowrap>const void *&nbsp;</td>
1064          <td class="mdname" nowrap> <em>src</em></td>
1065        </tr>
1066        <tr>
1067          <td></td>
1068          <td class="md">)&nbsp;</td>
1069          <td class="md" colspan="2"><code> [static]</code></td>
1070        </tr>
1071
1072      </table>
1073    </td>
1074  </tr>
1075</table>
1076<table cellspacing=5 cellpadding=0 border=0>
1077  <tr>
1078    <td>
1079      &nbsp;
1080    </td>
1081    <td>
1082
1083<p>
1084Unpack a colour value from memory.
1085<p>
1086<dl compact><dt><b>Parameters:</b></dt><dd>
1087  <table border="0" cellspacing="2" cellpadding="0">
1088    <tr><td valign=top><em>r,g,b,a</em>&nbsp;</td><td>The colour is returned here (as float) </td></tr>
1089    <tr><td valign=top><em>pf</em>&nbsp;</td><td>Pixelformat in which to read the colour </td></tr>
1090    <tr><td valign=top><em>src</em>&nbsp;</td><td>Source memory location </td></tr>
1091  </table>
1092</dl>
1093    </td>
1094  </tr>
1095</table>
1096<a class="anchor" name="Ogre_1_1PixelUtile21" doxytag="Ogre::PixelUtil::unpackColour" ></a><p>
1097<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1098  <tr>
1099    <td class="mdRow">
1100      <table cellpadding="0" cellspacing="0" border="0">
1101        <tr>
1102          <td class="md" nowrap valign="top"> void Ogre::PixelUtil::unpackColour </td>
1103          <td class="md" valign="top">(&nbsp;</td>
1104          <td class="md" nowrap valign="top"><a class="el" href="namespaceOgre.html#a457">uint8</a> *&nbsp;</td>
1105          <td class="mdname" nowrap> <em>r</em>, </td>
1106        </tr>
1107        <tr>
1108          <td class="md" nowrap align="right"></td>
1109          <td></td>
1110          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a457">uint8</a> *&nbsp;</td>
1111          <td class="mdname" nowrap> <em>g</em>, </td>
1112        </tr>
1113        <tr>
1114          <td class="md" nowrap align="right"></td>
1115          <td></td>
1116          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a457">uint8</a> *&nbsp;</td>
1117          <td class="mdname" nowrap> <em>b</em>, </td>
1118        </tr>
1119        <tr>
1120          <td class="md" nowrap align="right"></td>
1121          <td></td>
1122          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a457">uint8</a> *&nbsp;</td>
1123          <td class="mdname" nowrap> <em>a</em>, </td>
1124        </tr>
1125        <tr>
1126          <td class="md" nowrap align="right"></td>
1127          <td></td>
1128          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
1129          <td class="mdname" nowrap> <em>pf</em>, </td>
1130        </tr>
1131        <tr>
1132          <td class="md" nowrap align="right"></td>
1133          <td></td>
1134          <td class="md" nowrap>const void *&nbsp;</td>
1135          <td class="mdname" nowrap> <em>src</em></td>
1136        </tr>
1137        <tr>
1138          <td></td>
1139          <td class="md">)&nbsp;</td>
1140          <td class="md" colspan="2"><code> [static]</code></td>
1141        </tr>
1142
1143      </table>
1144    </td>
1145  </tr>
1146</table>
1147<table cellspacing=5 cellpadding=0 border=0>
1148  <tr>
1149    <td>
1150      &nbsp;
1151    </td>
1152    <td>
1153
1154<p>
1155Unpack a colour value from memory.
1156<p>
1157<dl compact><dt><b>Parameters:</b></dt><dd>
1158  <table border="0" cellspacing="2" cellpadding="0">
1159    <tr><td valign=top><em>r,g,b,a</em>&nbsp;</td><td>The colour is returned here (as byte) </td></tr>
1160    <tr><td valign=top><em>pf</em>&nbsp;</td><td>Pixelformat in which to read the colour </td></tr>
1161    <tr><td valign=top><em>src</em>&nbsp;</td><td>Source memory location </td></tr>
1162  </table>
1163</dl>
1164<dl compact><dt><b>Remarks:</b></dt><dd>This function returns the colour components in 8 bit precision, this will lose precision when coming from PF_A2R10G10B10 or floating point formats. </dd></dl>
1165    </td>
1166  </tr>
1167</table>
1168<a class="anchor" name="Ogre_1_1PixelUtile20" doxytag="Ogre::PixelUtil::unpackColour" ></a><p>
1169<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1170  <tr>
1171    <td class="mdRow">
1172      <table cellpadding="0" cellspacing="0" border="0">
1173        <tr>
1174          <td class="md" nowrap valign="top"> void Ogre::PixelUtil::unpackColour </td>
1175          <td class="md" valign="top">(&nbsp;</td>
1176          <td class="md" nowrap valign="top"><a class="el" href="classOgre_1_1ColourValue.html">ColourValue</a> *&nbsp;</td>
1177          <td class="mdname" nowrap> <em>colour</em>, </td>
1178        </tr>
1179        <tr>
1180          <td class="md" nowrap align="right"></td>
1181          <td></td>
1182          <td class="md" nowrap><a class="el" href="namespaceOgre.html#a671">PixelFormat</a>&nbsp;</td>
1183          <td class="mdname" nowrap> <em>pf</em>, </td>
1184        </tr>
1185        <tr>
1186          <td class="md" nowrap align="right"></td>
1187          <td></td>
1188          <td class="md" nowrap>const void *&nbsp;</td>
1189          <td class="mdname" nowrap> <em>src</em></td>
1190        </tr>
1191        <tr>
1192          <td></td>
1193          <td class="md">)&nbsp;</td>
1194          <td class="md" colspan="2"><code> [static]</code></td>
1195        </tr>
1196
1197      </table>
1198    </td>
1199  </tr>
1200</table>
1201<table cellspacing=5 cellpadding=0 border=0>
1202  <tr>
1203    <td>
1204      &nbsp;
1205    </td>
1206    <td>
1207
1208<p>
1209Unpack a colour value from memory.
1210<p>
1211<dl compact><dt><b>Parameters:</b></dt><dd>
1212  <table border="0" cellspacing="2" cellpadding="0">
1213    <tr><td valign=top><em>colour</em>&nbsp;</td><td>The colour is returned here </td></tr>
1214    <tr><td valign=top><em>pf</em>&nbsp;</td><td>Pixelformat in which to read the colour </td></tr>
1215    <tr><td valign=top><em>src</em>&nbsp;</td><td>Source memory location </td></tr>
1216  </table>
1217</dl>
1218    </td>
1219  </tr>
1220</table>
1221<hr>The documentation for this class was generated from the following file:<ul>
1222<li><a class="el" href="OgrePixelFormat_8h-source.html">OgrePixelFormat.h</a></ul>
1223<hr>
1224<p>
1225Copyright &copy; 2000-2005 by The OGRE Team<br />
1226<!--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/>
1227This 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/>
1228                <!--/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#">
1229                <Work rdf:about="">
1230                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
1231        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
1232                </Work>
1233                <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> -->
1234
1235Last modified Sun Mar 12 14:41:40 2006
1236</p>
1237</body>
1238</html>
Note: See TracBrowser for help on using the repository browser.