nn::ulcd::CTR::StereoCamera::GetParallax Member Function#include <nn/ulcd.h>
f32 GetParallax(
const f32 distance
) const;
| Name | Description | |
|---|---|---|
| in | distance | Distance from the camera. |
1.0f = 100%). Gets the ratio of the parallax at a point located a specified distance away from the camera to the screen width.
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 distance, where 1.0f indicates 100% (in other words, the return value is half of the offset between the images for the left and right eyes).
If a negative value is specified for distance, it returns 0.0f. 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.
The results from this function are calculated based on the results obtained during the last call to the CalculateMatrices* functions.
CONFIDENTIAL