source: NonGTP/FCollada/Documentation/_f_c_d_camera_8h-source.html @ 964

Revision 964, 17.8 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: FCDocument/FCDCamera.h Source File</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><a href="classes.html"><span>Classes</span></a></li>
14    <li id="current"><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="files.html"><span>File&nbsp;List</span></a></li>
20    <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
21  </ul></div>
22<h1>FCDocument/FCDCamera.h</h1><a href="_f_c_d_camera_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
23<a name="l00002"></a>00002 <span class="comment">    Copyright (C) 2005-2006 Feeling Software Inc.</span>
24<a name="l00003"></a>00003 <span class="comment">    MIT License: http://www.opensource.org/licenses/mit-license.php</span>
25<a name="l00004"></a>00004 <span class="comment">*/</span>
26<a name="l00005"></a>00005 <span class="comment">/*</span>
27<a name="l00006"></a>00006 <span class="comment">    Based on the FS Import classes:</span>
28<a name="l00007"></a>00007 <span class="comment">    Copyright (C) 2005-2006 Feeling Software Inc</span>
29<a name="l00008"></a>00008 <span class="comment">    Copyright (C) 2005-2006 Autodesk Media Entertainment</span>
30<a name="l00009"></a>00009 <span class="comment">    MIT License: http://www.opensource.org/licenses/mit-license.php</span>
31<a name="l00010"></a>00010 <span class="comment">*/</span>
32<a name="l00011"></a>00011
33<a name="l00017"></a>00017 <span class="preprocessor">#ifndef _FCD_CAMERA_H_</span>
34<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _FCD_CAMERA_H_</span>
35<a name="l00019"></a>00019 <span class="preprocessor"></span>
36<a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="_f_c_d_targeted_entity_8h.html">FCDocument/FCDTargetedEntity.h</a>"</span>
37<a name="l00021"></a>00021
38<a name="l00022"></a>00022 <span class="keyword">class </span><a class="code" href="class_f_c_document.html">FCDocument</a>;
39<a name="l00023"></a>00023 <span class="keyword">class </span><a class="code" href="class_f_c_d_scene_node.html">FCDSceneNode</a>;
40<a name="l00024"></a>00024
41<a name="l00044"></a><a class="code" href="class_f_c_d_camera.html">00044</a> <span class="keyword">class </span>FCOLLADA_EXPORT <a class="code" href="class_f_c_d_camera.html">FCDCamera</a> : <span class="keyword">public</span> <a class="code" href="class_f_c_d_targeted_entity.html">FCDTargetedEntity</a>
42<a name="l00045"></a>00045 {
43<a name="l00046"></a>00046 <span class="keyword">private</span>:
44<a name="l00047"></a>00047     <a class="code" href="_f_u_object_type_8h.html#8124b8a8706cd10260f8cd5a7bd8e691">DeclareObjectType</a>;
45<a name="l00048"></a>00048
46<a name="l00049"></a>00049     <span class="comment">// Camera flags</span>
47<a name="l00050"></a>00050 <span class="keywordtype">bool</span> isPerspective;
48<a name="l00051"></a>00051 <span class="keywordtype">bool</span> isOrthographic;
49<a name="l00052"></a>00052 <span class="keywordtype">bool</span> hasHorizontalView;
50<a name="l00053"></a>00053 <span class="keywordtype">bool</span> hasVerticalView;
51<a name="l00054"></a>00054
52<a name="l00055"></a>00055     <span class="comment">// Camera parameters</span>
53<a name="l00056"></a>00056 <span class="keywordtype">float</span> viewY;
54<a name="l00057"></a>00057 <span class="keywordtype">float</span> viewX;
55<a name="l00058"></a>00058 <span class="keywordtype">float</span> nearZ;
56<a name="l00059"></a>00059 <span class="keywordtype">float</span> farZ;
57<a name="l00060"></a>00060 <span class="keywordtype">float</span> aspectRatio;
58<a name="l00061"></a>00061
59<a name="l00062"></a>00062     <span class="comment">// Maya parameters</span>
60<a name="l00063"></a>00063 <span class="keywordtype">bool</span> hasAperture;
61<a name="l00064"></a>00064 <span class="keywordtype">float</span> verticalAperture;
62<a name="l00065"></a>00065 <span class="keywordtype">float</span> horizontalAperture;
63<a name="l00066"></a>00066 <span class="keywordtype">float</span> lensSqueeze;
64<a name="l00067"></a>00067
65<a name="l00068"></a>00068 <span class="keyword">public</span>:
66<a name="l00071"></a>00071     <a class="code" href="class_f_c_d_camera.html">FCDCamera</a>(<a class="code" href="class_f_c_document.html">FCDocument</a>* document);
67<a name="l00072"></a>00072
68<a name="l00075"></a>00075 <span class="keyword">virtual</span> ~<a class="code" href="class_f_c_d_camera.html">FCDCamera</a>();
69<a name="l00076"></a>00076
70<a name="l00079"></a><a class="code" href="class_f_c_d_camera.html#a07c99de0148e39b46e33733852ef229">00079</a>     <span class="keyword">virtual</span> Type <a class="code" href="class_f_c_d_entity.html#bfd4312a7124f92364c1e6517c7e60ba">GetType</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> CAMERA; }
71<a name="l00080"></a>00080
72<a name="l00084"></a><a class="code" href="class_f_c_d_camera.html#7756959daf1ed8d8a90fa19f45f49496">00084</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> IsPerspective()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> isPerspective; }
73<a name="l00085"></a>00085
74<a name="l00087"></a><a class="code" href="class_f_c_d_camera.html#45a9822f6666bade1c2ad78565c76600">00087</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> SetPerspective() { isPerspective = <span class="keyword">true</span>; isOrthographic = <span class="keyword">false</span>; }
75<a name="l00088"></a>00088
76<a name="l00093"></a><a class="code" href="class_f_c_d_camera.html#f5b0f3acc94e585b3d6b7a97d2b33600">00093</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> HasHorizontalFov()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> hasHorizontalView; }
77<a name="l00094"></a>00094
78<a name="l00099"></a><a class="code" href="class_f_c_d_camera.html#e08e063c02ac91d0fb834aaba29fec74">00099</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> HasVerticalFov()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> hasVerticalView; }
79<a name="l00100"></a>00100
80<a name="l00105"></a><a class="code" href="class_f_c_d_camera.html#097a7a8bd64199f2f46e55d356b42723">00105</a>     <span class="keyword">inline</span> <span class="keywordtype">float</span>&amp; GetFovX() { <span class="keywordflow">return</span> viewX; }
81<a name="l00106"></a><a class="code" href="class_f_c_d_camera.html#ad29e20409b32f51e0753e2e39dd51b5">00106</a>     <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">float</span>&amp; GetFovX()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> viewX; }
82<a name="l00112"></a><a class="code" href="class_f_c_d_camera.html#25dad9e9f24449a2091ddf86dc728a28">00112</a>     <span class="keyword">inline</span> <span class="keywordtype">float</span>&amp; GetFovY() { <span class="keywordflow">return</span> viewY; }
83<a name="l00113"></a><a class="code" href="class_f_c_d_camera.html#2d7347a1ecd3eaddb35bb93957fcbb23">00113</a>     <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">float</span>&amp; GetFovY()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> viewY; }
84<a name="l00117"></a>00117 <span class="keywordtype">void</span> SetFovX(<span class="keywordtype">float</span> fovX);
85<a name="l00118"></a>00118
86<a name="l00121"></a>00121 <span class="keywordtype">void</span> SetFovY(<span class="keywordtype">float</span> fovY);
87<a name="l00122"></a>00122
88<a name="l00125"></a><a class="code" href="class_f_c_d_camera.html#2f8ac0483f3be7766eb8ecf10653316f">00125</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> IsOrthographic()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> isOrthographic; }
89<a name="l00126"></a>00126
90<a name="l00128"></a><a class="code" href="class_f_c_d_camera.html#54bd0ff5066f198322e3c055543ae044">00128</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> SetOrthographic() { isPerspective = <span class="keyword">false</span>; isOrthographic = <span class="keyword">true</span>; }
91<a name="l00129"></a>00129
92<a name="l00134"></a><a class="code" href="class_f_c_d_camera.html#8e6652d9695b24aa398b0ab6bb408ecb">00134</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> HasHorizontalMag()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> hasHorizontalView; }
93<a name="l00135"></a>00135
94<a name="l00140"></a><a class="code" href="class_f_c_d_camera.html#4eddec2fc3082c106b417632103dbe51">00140</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> HasVerticalMag()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> hasVerticalView; }
95<a name="l00141"></a>00141
96<a name="l00146"></a><a class="code" href="class_f_c_d_camera.html#2f0257c2a1ad1a4978729ff4ccef1928">00146</a>     <span class="keyword">inline</span> <span class="keywordtype">float</span>&amp; GetMagX() { <span class="keywordflow">return</span> viewX; }
97<a name="l00147"></a><a class="code" href="class_f_c_d_camera.html#ebc801453acc033037b700bdd1fbef30">00147</a>     <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">float</span>&amp; GetMagX()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> viewX; }
98<a name="l00153"></a><a class="code" href="class_f_c_d_camera.html#c4f31dac6a0251f00d3844f983feadc1">00153</a>     <span class="keyword">inline</span> <span class="keywordtype">float</span>&amp; GetMagY() { <span class="keywordflow">return</span> viewY; }
99<a name="l00154"></a><a class="code" href="class_f_c_d_camera.html#e20d7fab2752b11d346ac10614a469c5">00154</a>     <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">float</span>&amp; GetMagY()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> viewY; }
100<a name="l00158"></a><a class="code" href="class_f_c_d_camera.html#6dad0e3978aad3bbd920587ae387e952">00158</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> SetMagX(<span class="keywordtype">float</span> magX) { <span class="keywordflow">return</span> SetFovX(magX); }
101<a name="l00159"></a>00159
102<a name="l00162"></a><a class="code" href="class_f_c_d_camera.html#4edf1eb03fe522145a18d80aabcef450">00162</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> SetMagY(<span class="keywordtype">float</span> magY) { <span class="keywordflow">return</span> SetFovY(magY); }
103<a name="l00163"></a>00163
104<a name="l00169"></a><a class="code" href="class_f_c_d_camera.html#ef027ddbc606e4356ebd4a57896e503c">00169</a>     <span class="keyword">inline</span> <span class="keywordtype">float</span>&amp; GetNearZ() { <span class="keywordflow">return</span> nearZ; }
105<a name="l00170"></a><a class="code" href="class_f_c_d_camera.html#4c4333f299cdcfa705b11c46e6f95eeb">00170</a>     <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">float</span>&amp; GetNearZ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> nearZ; }
106<a name="l00176"></a><a class="code" href="class_f_c_d_camera.html#c60db7af98f8d5e2dbcca9a5d9bf243b">00176</a>     <span class="keyword">inline</span> <span class="keywordtype">float</span>&amp; GetFarZ() { <span class="keywordflow">return</span> farZ; }
107<a name="l00177"></a><a class="code" href="class_f_c_d_camera.html#3563cea2921138eb162244968680f36c">00177</a>     <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">float</span>&amp; GetFarZ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> farZ; }
108<a name="l00185"></a><a class="code" href="class_f_c_d_camera.html#8a44f6185e7146eb8eae3987ce5c69dc">00185</a>     <span class="keyword">inline</span> <span class="keywordtype">float</span>&amp; GetAspectRatio() { <span class="keywordflow">return</span> aspectRatio; }
109<a name="l00186"></a><a class="code" href="class_f_c_d_camera.html#d2718825a233bb4fab8461152a28ae6c">00186</a>     <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">float</span>&amp; GetAspectRatio()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> aspectRatio; }
110<a name="l00194"></a><a class="code" href="class_f_c_d_camera.html#5897d7a1ba3e10316f0f2f183530ee45">00194</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> SetNearZ(<span class="keywordtype">float</span> _nearZ) { nearZ = _nearZ; }
111<a name="l00195"></a>00195
112<a name="l00201"></a><a class="code" href="class_f_c_d_camera.html#f833473ab121efed5be5f02d8680d51c">00201</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> SetFarZ(<span class="keywordtype">float</span> _farZ) { farZ = _farZ; }
113<a name="l00202"></a>00202
114<a name="l00205"></a>00205 <span class="keywordtype">void</span> SetAspectRatio(<span class="keywordtype">float</span> aspectRatio);
115<a name="l00206"></a>00206
116<a name="l00210"></a><a class="code" href="class_f_c_d_camera.html#5a802fef4d39c8f3d02bb6510330f2f8">00210</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> HasAperture()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> hasAperture; }
117<a name="l00211"></a>00211     
118<a name="l00215"></a><a class="code" href="class_f_c_d_camera.html#a95ea437698deba85fbff8f2e38816f4">00215</a>     <span class="keyword">inline</span> <span class="keywordtype">float</span>&amp; GetVerticalAperture() { <span class="keywordflow">return</span> verticalAperture; }
119<a name="l00216"></a><a class="code" href="class_f_c_d_camera.html#e45da33c1e9a3d2b1dcfbf554ad87430">00216</a>     <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">float</span>&amp; GetVerticalAperture()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> verticalAperture; }
120<a name="l00221"></a><a class="code" href="class_f_c_d_camera.html#9d1e6fb97d3d78f00af8d1379bfcc7e6">00221</a>     <span class="keyword">inline</span> <span class="keywordtype">float</span>&amp; GetHorizontalAperture() { <span class="keywordflow">return</span> horizontalAperture; }
121<a name="l00222"></a><a class="code" href="class_f_c_d_camera.html#0bf89f25b4bb3d5ae62f44c484b12816">00222</a>     <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">float</span>&amp; GetHorizontalAperture()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> horizontalAperture; }
122<a name="l00229"></a><a class="code" href="class_f_c_d_camera.html#302125ce99ba715f9f8d33ea463653b2">00229</a>     <span class="keyword">inline</span> <span class="keywordtype">float</span>&amp; GetLensSqueeze() { <span class="keywordflow">return</span> lensSqueeze; }
123<a name="l00230"></a><a class="code" href="class_f_c_d_camera.html#5580601c1c3da1d949293ac5e98ee19b">00230</a>     <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">float</span>&amp; GetLensSqueeze()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> lensSqueeze; }
124<a name="l00234"></a><a class="code" href="class_f_c_d_camera.html#cf92f5b2bbf13e397feebb35bc3e0b18">00234</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> SetVerticalAperture(<span class="keywordtype">float</span> aperture) { verticalAperture = aperture; hasAperture = <span class="keyword">true</span>; }
125<a name="l00235"></a>00235
126<a name="l00238"></a><a class="code" href="class_f_c_d_camera.html#ea0914e5cdfd37b7910f35c111d70998">00238</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> SetHorizontalAperture(<span class="keywordtype">float</span> aperture) { horizontalAperture = aperture; hasAperture = <span class="keyword">true</span>; }
127<a name="l00239"></a>00239
128<a name="l00242"></a><a class="code" href="class_f_c_d_camera.html#43fc2d971aaaa1d3b2ca349375892bea">00242</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> SetLensSqueeze(<span class="keywordtype">float</span> factor) { lensSqueeze = factor; }
129<a name="l00243"></a>00243
130<a name="l00248"></a>00248 <a class="code" href="class_f_u_status.html">FUStatus</a> <a class="code" href="class_f_c_d_entity.html#8e32fcc93de76acc4b606db7b5b83890">LoadFromXML</a>(xmlNode* cameraNode);
131<a name="l00249"></a>00249
132<a name="l00253"></a>00253 <span class="keyword">virtual</span> xmlNode* <a class="code" href="class_f_c_d_entity.html#b27f0c175c3f8fd7064cde48bcf1d7a0">WriteToXML</a>(xmlNode* parentNode) <span class="keyword">const</span>;
133<a name="l00254"></a>00254 };
134<a name="l00255"></a>00255
135<a name="l00256"></a>00256 <span class="preprocessor">#endif // _FCD_CAMERA_H_</span>
136<a name="l00257"></a>00257 <span class="preprocessor"></span>
137</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri May 12 16:44:38 2006 for FCollada by&nbsp;
138<a href="http://www.doxygen.org/index.html">
139<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6-NO </small></address>
140</body>
141</html>
Note: See TracBrowser for help on using the repository browser.