source: NonGTP/FCollada/Documentation/class_f_m_color.html @ 964

Revision 964, 17.9 KB checked in by igarcia, 18 years ago (diff)
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>FCollada: FMColor Class Reference</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.4.6-NO -->
8<div class="tabs">
9  <ul>
10    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11    <li><a href="modules.html"><span>Modules</span></a></li>
12    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
13    <li id="current"><a href="classes.html"><span>Classes</span></a></li>
14    <li><a href="files.html"><span>Files</span></a></li>
15    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
16  </ul></div>
17<div class="tabs">
18  <ul>
19    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
20    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
21    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
22    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
23  </ul></div>
24<h1>FMColor Class Reference<br>
25<small>
26[<a class="el" href="group___f_math.html">Mathematics Classes.</a>]</small>
27</h1><!-- doxytag: class="FMColor" -->A RBGA color. 
28<a href="#_details">More...</a>
29<p>
30<code>#include &lt;<a class="el" href="_f_m_color_8h-source.html">FMColor.h</a>&gt;</code>
31<p>
32<a href="class_f_m_color-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
33<tr><td></td></tr>
34<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
35<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_f_m_color.html#9acb710671c50f603c90e06ec2ed86b8">FMColor</a> ()</td></tr>
36
37<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an empty <a class="el" href="class_f_m_color.html">FMColor</a>.  <a href="#9acb710671c50f603c90e06ec2ed86b8"></a><br></td></tr>
38<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_f_m_color.html#acadee74c5d62bb4329d4c737991e0e0">FMColor</a> (uint8 _r, uint8 _g, uint8 _b, uint8 _a)</td></tr>
39
40<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates the <a class="el" href="class_f_m_color.html">FMColor</a> with the coordinates values.  <a href="#acadee74c5d62bb4329d4c737991e0e0"></a><br></td></tr>
41<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_f_m_color.html#ed846f140eef6e7379d2a4d7e11e0ce3">FMColor</a> (uint32 hex)</td></tr>
42
43<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates the <a class="el" href="class_f_m_color.html">FMColor</a> from a color encoded into a uint32.  <a href="#ed846f140eef6e7379d2a4d7e11e0ce3"></a><br></td></tr>
44<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_f_m_color.html#e3df0928bc78ec430804397fd47e8df5">FMColor</a> (const float *components, uint32 componentCount)</td></tr>
45
46<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates the <a class="el" href="class_f_m_color.html">FMColor</a> from a list of <code>floats</code>.  <a href="#e3df0928bc78ec430804397fd47e8df5"></a><br></td></tr>
47<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_f_m_color.html#89dcfa30dd18ff55c4aa79504fcabf24">ToFloats</a> (float *components, uint32 componentCount)</td></tr>
48
49<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get this <a class="el" href="class_f_m_color.html">FMColor</a> as an array of <code>floats</code>.  <a href="#89dcfa30dd18ff55c4aa79504fcabf24"></a><br></td></tr>
50<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_f_m_color.html#911f0f47225a8c9c89246dd01280f789">ComponentAverage</a> ()</td></tr>
51
52<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the average of the three color values of this <a class="el" href="class_f_m_color.html">FMColor</a>.  <a href="#911f0f47225a8c9c89246dd01280f789"></a><br></td></tr>
53<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_f_m_color.html#4cbe7fa247d38162d700fabe70240b0a">operator uint8 *</a> ()</td></tr>
54
55<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get this <a class="el" href="class_f_m_color.html">FMColor</a> as an array of uint8s.  <a href="#4cbe7fa247d38162d700fabe70240b0a"></a><br></td></tr>
56<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
57<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="36789d346608eb0c778d58204ea1f406"></a><!-- doxytag: member="FMColor::r" ref="36789d346608eb0c778d58204ea1f406" args="" -->
58uint8&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_f_m_color.html#36789d346608eb0c778d58204ea1f406">r</a></td></tr>
59
60<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The red component. <br></td></tr>
61<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0868b26c7d46f6fd5fb753e63010c377"></a><!-- doxytag: member="FMColor::g" ref="0868b26c7d46f6fd5fb753e63010c377" args="" -->
62uint8&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_f_m_color.html#0868b26c7d46f6fd5fb753e63010c377">g</a></td></tr>
63
64<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The green component. <br></td></tr>
65<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ba4a975fc1d71d6f0065cf67f90d3c45"></a><!-- doxytag: member="FMColor::b" ref="ba4a975fc1d71d6f0065cf67f90d3c45" args="" -->
66uint8&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_f_m_color.html#ba4a975fc1d71d6f0065cf67f90d3c45">b</a></td></tr>
67
68<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The blue component. <br></td></tr>
69<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="42355f56b082b874c5580a9b4625be7c"></a><!-- doxytag: member="FMColor::a" ref="42355f56b082b874c5580a9b4625be7c" args="" -->
70uint8&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_f_m_color.html#42355f56b082b874c5580a9b4625be7c">a</a></td></tr>
71
72<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The alpha component. <br></td></tr>
73</table>
74<hr><a name="_details"></a><h2>Detailed Description</h2>
75A RBGA color.
76<p>
77Not used within <a class="el" href="namespace_f_collada.html">FCollada</a>.
78<p>
79<hr><h2>Constructor &amp; Destructor Documentation</h2>
80<a class="anchor" name="9acb710671c50f603c90e06ec2ed86b8"></a><!-- doxytag: member="FMColor::FMColor" ref="9acb710671c50f603c90e06ec2ed86b8" args="()" --><p>
81<table class="mdTable" cellpadding="2" cellspacing="0">
82  <tr>
83    <td class="mdRow">
84      <table cellpadding="0" cellspacing="0" border="0">
85        <tr>
86          <td class="md" nowrap valign="top">FMColor::FMColor           </td>
87          <td class="md" valign="top">(&nbsp;</td>
88          <td class="mdname1" valign="top" nowrap>          </td>
89          <td class="md" valign="top">&nbsp;)&nbsp;</td>
90          <td class="md" nowrap><code> [inline]</code></td>
91        </tr>
92      </table>
93    </td>
94  </tr>
95</table>
96<table cellspacing="5" cellpadding="0" border="0">
97  <tr>
98    <td>
99      &nbsp;
100    </td>
101    <td>
102
103<p>
104Creates an empty <a class="el" href="class_f_m_color.html">FMColor</a>.
105<p>
106The default values are non deterministic.     </td>
107  </tr>
108</table>
109<a class="anchor" name="acadee74c5d62bb4329d4c737991e0e0"></a><!-- doxytag: member="FMColor::FMColor" ref="acadee74c5d62bb4329d4c737991e0e0" args="(uint8 _r, uint8 _g, uint8 _b, uint8 _a)" --><p>
110<table class="mdTable" cellpadding="2" cellspacing="0">
111  <tr>
112    <td class="mdRow">
113      <table cellpadding="0" cellspacing="0" border="0">
114        <tr>
115          <td class="md" nowrap valign="top">FMColor::FMColor           </td>
116          <td class="md" valign="top">(&nbsp;</td>
117          <td class="md" nowrap valign="top">uint8&nbsp;</td>
118          <td class="mdname" nowrap> <em>_r</em>, </td>
119        </tr>
120        <tr>
121          <td class="md" nowrap align="right"></td>
122          <td class="md"></td>
123          <td class="md" nowrap>uint8&nbsp;</td>
124          <td class="mdname" nowrap> <em>_g</em>, </td>
125        </tr>
126        <tr>
127          <td class="md" nowrap align="right"></td>
128          <td class="md"></td>
129          <td class="md" nowrap>uint8&nbsp;</td>
130          <td class="mdname" nowrap> <em>_b</em>, </td>
131        </tr>
132        <tr>
133          <td class="md" nowrap align="right"></td>
134          <td class="md"></td>
135          <td class="md" nowrap>uint8&nbsp;</td>
136          <td class="mdname" nowrap> <em>_a</em></td>
137        </tr>
138        <tr>
139          <td class="md"></td>
140          <td class="md">)&nbsp;</td>
141          <td class="md" colspan="2"><code> [inline]</code></td>
142        </tr>
143      </table>
144    </td>
145  </tr>
146</table>
147<table cellspacing="5" cellpadding="0" border="0">
148  <tr>
149    <td>
150      &nbsp;
151    </td>
152    <td>
153
154<p>
155Creates the <a class="el" href="class_f_m_color.html">FMColor</a> with the coordinates values.
156<p>
157The first three coordinates are taken from the <a class="el" href="class_f_m_vector3.html">FMVector3</a>, where the first one is the x value, the second is that y, and the third is the z. The forth value is the <code>float</code> specified.<p>
158<dl compact><dt><b>Parameters:</b></dt><dd>
159  <table border="0" cellspacing="2" cellpadding="0">
160    <tr><td valign="top"></td><td valign="top"><em>_r</em>&nbsp;</td><td>The red value. </td></tr>
161    <tr><td valign="top"></td><td valign="top"><em>_g</em>&nbsp;</td><td>The green value. </td></tr>
162    <tr><td valign="top"></td><td valign="top"><em>_b</em>&nbsp;</td><td>The blue value. </td></tr>
163    <tr><td valign="top"></td><td valign="top"><em>_a</em>&nbsp;</td><td>The alpha value. </td></tr>
164  </table>
165</dl>
166    </td>
167  </tr>
168</table>
169<a class="anchor" name="ed846f140eef6e7379d2a4d7e11e0ce3"></a><!-- doxytag: member="FMColor::FMColor" ref="ed846f140eef6e7379d2a4d7e11e0ce3" args="(uint32 hex)" --><p>
170<table class="mdTable" cellpadding="2" cellspacing="0">
171  <tr>
172    <td class="mdRow">
173      <table cellpadding="0" cellspacing="0" border="0">
174        <tr>
175          <td class="md" nowrap valign="top">FMColor::FMColor           </td>
176          <td class="md" valign="top">(&nbsp;</td>
177          <td class="md" nowrap valign="top">uint32&nbsp;</td>
178          <td class="mdname1" valign="top" nowrap> <em>hex</em>          </td>
179          <td class="md" valign="top">&nbsp;)&nbsp;</td>
180          <td class="md" nowrap><code> [inline]</code></td>
181        </tr>
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>
194Creates the <a class="el" href="class_f_m_color.html">FMColor</a> from a color encoded into a uint32.
195<p>
196The most significant byte makes up the red value. The second most significant makes up the green value, the third the blue, and the forth the alpha.<p>
197<dl compact><dt><b>Parameters:</b></dt><dd>
198  <table border="0" cellspacing="2" cellpadding="0">
199    <tr><td valign="top"></td><td valign="top"><em>hex</em>&nbsp;</td><td>The uint to decode the color values from. </td></tr>
200  </table>
201</dl>
202    </td>
203  </tr>
204</table>
205<a class="anchor" name="e3df0928bc78ec430804397fd47e8df5"></a><!-- doxytag: member="FMColor::FMColor" ref="e3df0928bc78ec430804397fd47e8df5" args="(const float *components, uint32 componentCount)" --><p>
206<table class="mdTable" cellpadding="2" cellspacing="0">
207  <tr>
208    <td class="mdRow">
209      <table cellpadding="0" cellspacing="0" border="0">
210        <tr>
211          <td class="md" nowrap valign="top">FMColor::FMColor           </td>
212          <td class="md" valign="top">(&nbsp;</td>
213          <td class="md" nowrap valign="top">const float *&nbsp;</td>
214          <td class="mdname" nowrap> <em>components</em>, </td>
215        </tr>
216        <tr>
217          <td class="md" nowrap align="right"></td>
218          <td class="md"></td>
219          <td class="md" nowrap>uint32&nbsp;</td>
220          <td class="mdname" nowrap> <em>componentCount</em></td>
221        </tr>
222        <tr>
223          <td class="md"></td>
224          <td class="md">)&nbsp;</td>
225          <td class="md" colspan="2"></td>
226        </tr>
227      </table>
228    </td>
229  </tr>
230</table>
231<table cellspacing="5" cellpadding="0" border="0">
232  <tr>
233    <td>
234      &nbsp;
235    </td>
236    <td>
237
238<p>
239Creates the <a class="el" href="class_f_m_color.html">FMColor</a> from a list of <code>floats</code>.
240<p>
241It creates the <a class="el" href="class_f_m_color.html">FMColor</a> with the values specified in the <code>floats</code>, which range from 0.0f to 1.0f.<p>
242<em>componentCount</em> is used to determined how many values to take from the <code>float</code> array. If there are insufficient values, then it will give the remaining values default values. The default values are 0 for the colors and 255 for the alpha. It fills in the values in this order: red, green, blue, alpha.<p>
243<dl compact><dt><b>Parameters:</b></dt><dd>
244  <table border="0" cellspacing="2" cellpadding="0">
245    <tr><td valign="top"></td><td valign="top"><em>components</em>&nbsp;</td><td>The <code>float</code> array to get values from. </td></tr>
246    <tr><td valign="top"></td><td valign="top"><em>componentCount</em>&nbsp;</td><td>The amount of <code>float</code> to take from the array. </td></tr>
247  </table>
248</dl>
249    </td>
250  </tr>
251</table>
252<hr><h2>Member Function Documentation</h2>
253<a class="anchor" name="911f0f47225a8c9c89246dd01280f789"></a><!-- doxytag: member="FMColor::ComponentAverage" ref="911f0f47225a8c9c89246dd01280f789" args="()" --><p>
254<table class="mdTable" cellpadding="2" cellspacing="0">
255  <tr>
256    <td class="mdRow">
257      <table cellpadding="0" cellspacing="0" border="0">
258        <tr>
259          <td class="md" nowrap valign="top">uint8 FMColor::ComponentAverage           </td>
260          <td class="md" valign="top">(&nbsp;</td>
261          <td class="mdname1" valign="top" nowrap>          </td>
262          <td class="md" valign="top">&nbsp;)&nbsp;</td>
263          <td class="md" nowrap><code> [inline]</code></td>
264        </tr>
265      </table>
266    </td>
267  </tr>
268</table>
269<table cellspacing="5" cellpadding="0" border="0">
270  <tr>
271    <td>
272      &nbsp;
273    </td>
274    <td>
275
276<p>
277Get the average of the three color values of this <a class="el" href="class_f_m_color.html">FMColor</a>.
278<p>
279<dl compact><dt><b>Returns:</b></dt><dd>The averages of the three colors values of this <a class="el" href="class_f_m_color.html">FMColor</a>. </dd></dl>
280    </td>
281  </tr>
282</table>
283<a class="anchor" name="4cbe7fa247d38162d700fabe70240b0a"></a><!-- doxytag: member="FMColor::operator uint8 *" ref="4cbe7fa247d38162d700fabe70240b0a" args="()" --><p>
284<table class="mdTable" cellpadding="2" cellspacing="0">
285  <tr>
286    <td class="mdRow">
287      <table cellpadding="0" cellspacing="0" border="0">
288        <tr>
289          <td class="md" nowrap valign="top">FMColor::operator uint8 *           </td>
290          <td class="md" valign="top">(&nbsp;</td>
291          <td class="mdname1" valign="top" nowrap>          </td>
292          <td class="md" valign="top">&nbsp;)&nbsp;</td>
293          <td class="md" nowrap><code> [inline]</code></td>
294        </tr>
295      </table>
296    </td>
297  </tr>
298</table>
299<table cellspacing="5" cellpadding="0" border="0">
300  <tr>
301    <td>
302      &nbsp;
303    </td>
304    <td>
305
306<p>
307Get this <a class="el" href="class_f_m_color.html">FMColor</a> as an array of uint8s.
308<p>
309<dl compact><dt><b>Returns:</b></dt><dd>The <code>uint8</code> array. </dd></dl>
310    </td>
311  </tr>
312</table>
313<a class="anchor" name="89dcfa30dd18ff55c4aa79504fcabf24"></a><!-- doxytag: member="FMColor::ToFloats" ref="89dcfa30dd18ff55c4aa79504fcabf24" args="(float *components, uint32 componentCount)" --><p>
314<table class="mdTable" cellpadding="2" cellspacing="0">
315  <tr>
316    <td class="mdRow">
317      <table cellpadding="0" cellspacing="0" border="0">
318        <tr>
319          <td class="md" nowrap valign="top">void FMColor::ToFloats           </td>
320          <td class="md" valign="top">(&nbsp;</td>
321          <td class="md" nowrap valign="top">float *&nbsp;</td>
322          <td class="mdname" nowrap> <em>components</em>, </td>
323        </tr>
324        <tr>
325          <td class="md" nowrap align="right"></td>
326          <td class="md"></td>
327          <td class="md" nowrap>uint32&nbsp;</td>
328          <td class="mdname" nowrap> <em>componentCount</em></td>
329        </tr>
330        <tr>
331          <td class="md"></td>
332          <td class="md">)&nbsp;</td>
333          <td class="md" colspan="2"></td>
334        </tr>
335      </table>
336    </td>
337  </tr>
338</table>
339<table cellspacing="5" cellpadding="0" border="0">
340  <tr>
341    <td>
342      &nbsp;
343    </td>
344    <td>
345
346<p>
347Get this <a class="el" href="class_f_m_color.html">FMColor</a> as an array of <code>floats</code>.
348<p>
349It fills the first <em>componentCount</em> elements (max 4) of <code>components</code> with the red, green, blue, alpha values of this <a class="el" href="class_f_m_color.html">FMColor</a> in that order.<p>
350<dl compact><dt><b>Parameters:</b></dt><dd>
351  <table border="0" cellspacing="2" cellpadding="0">
352    <tr><td valign="top"></td><td valign="top"><em>components</em>&nbsp;</td><td>The <code>float</code> array to fill. </td></tr>
353    <tr><td valign="top"></td><td valign="top"><em>componentCount</em>&nbsp;</td><td>The amount of <code>float</code> to fill into the array. </td></tr>
354  </table>
355</dl>
356    </td>
357  </tr>
358</table>
359<hr>The documentation for this class was generated from the following file:<ul>
360<li>FMath/<a class="el" href="_f_m_color_8h-source.html">FMColor.h</a></ul>
361<hr size="1"><address style="align: right;"><small>Generated on Fri May 12 16:44:44 2006 for FCollada by&nbsp;
362<a href="http://www.doxygen.org/index.html">
363<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6-NO </small></address>
364</body>
365</html>
Note: See TracBrowser for help on using the repository browser.