nn::ulcd::CTR::StereoCamera::GetMaxParallax Member Function

Syntax

#include <nn/ulcd.h>

f32 GetMaxParallax(
     void
) const;

Arguments

None.

Return Values

Amount of offset required to display an object at the farthest possible distance.

Description

Gets the parallax at the farthest possible distance. The parallax is expressed as a ratio of the screen width.

It calculates and returns the left/right offset of an object located at infinity as seen by the left and right cameras, relative to the base camera. This offset is expressed as a percentage (1.0f = 100%).

For example, let's assume you are rendering a distant landscape as a single image. You can make the landscape appear to be at the farthest possible depth by offsetting this image by [return value]×[screen width] pixels to the left and right.

However, infinity in terms of this function is the distant position that the player senses when a limited parallax is specified by the SetLimitParallax function. The calculated offset follows the 3D volume values.

When using the application-priority method, you will never exceed the infinity of this function. With the realism-priority method, however, caution is needed because it is possible to apply a parallax that it is greater than the offset that can be derived by this function.

The calculations made by this function are based on the results obtained during the last call to either CalculateMatrices or CalculateMatricesReal.

Revision History

2010/10/26
Added Description.
2010/04/02
Initial version.

CONFIDENTIAL