1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../../css/manpage.css" type="text/css" />
7<title>GetParallax</title>
8  </head>
9  <body>
10<h1><CODE>nn::ulcd::CTR::StereoCamera::GetParallax</CODE> Member Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">#include &lt;nn/ulcd.h&gt;
14f32 GetParallax(
15     const f32 distance
16) const;
17</pre>
18    </div>
19<h2>Arguments</h2>
20    <div class="section">
21      <table class="arguments">
22        <thead>
23          <tr>
24            <td width="15" />
25<th>Name</th>
26<td>Description</td>
27          </tr>
28        </thead>
29        <tr>
30<td>in</td>
31<th>distance</th>
32<td>Distance from the camera.</td>
33        </tr> </table>
34    </div>
35<h2>Return Values</h2>
36<div class="section">Amount of offset, both to the left and right, of an object at the specified location (as a ratio with <CODE>1.0f</CODE> = <CODE>100%</CODE>). </div>
37<h2>Description</h2>
38    <div class="section">
39<p>Gets the parallax of a point located a specified distance away from the camera. The parallax is expressed as a ratio of the screen width.</p><!-- write here --><P>This function calculates and returns a value indicating the screen ratio by which to shift an object for both the left and right cameras at a distance specified by <SPAN class="argument">distance</SPAN>, where <CODE>1.0f</CODE> indicates 100% (in other words, the return value is half of the offset between the images for the left and right eyes).
40</P><P>If a negative value is specified for <CODE>distance</CODE>, it returns <CODE>0.0</CODE>f. It returns a positive value for objects located beyond the base plane. It returns a negative value for objects located in front of the base plane.
41</P><P>The results from this function are calculated based on the results obtained during the last call to the <CODE>CalculateMatrices*</CODE> functions.
42            </P></div>
43<h2>Revision History</h2>
44    <div class="section">
45      <dl class="history">
46        <dt>2010/09/13</dt>
47<dd>Revised <B>Description</B> to make it easier to understand.
48        </dd>
49        <dt>2010/04/02</dt>
50<dd>Initial version.<br />
51        </dd>
52      </dl>
53    </div>
54  <hr><p>CONFIDENTIAL</p></body>
55</html>
56