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

Revision 657, 51.3 KB checked in by mattausch, 18 years ago (diff)

added ogre dependencies and patched ogre sources

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