nn::ulcd::CTR::StereoCamera::CalculateMatricesReal Member Function

Syntax

#include <nn/ulcd.h>

void CalculateMatricesReal(
     nn::math::Matrix44 * projL,
     nn::math::Matrix34 * viewL,
     nn::math::Matrix44 * projR,
     nn::math::Matrix34 * viewR,
     const f32 depthLevel,
     const f32 factor,
     const nn::math::PivotDirection pivot = nn::math::PIVOT_UPSIDE_TO_TOP
);

Parameters

Name Description
out projL Location where the calculated results for the left projection matrix are stored.
out viewL Location where the calculated results for the left view matrix are stored.
out projR Location where the calculated results for the right projection matrix are stored.
out viewR Location where the calculated results for the right view matrix are stored.
in depthLevel Distance (in virtual space) from the camera to the desired location on the LCD surface.
in factor Depth adjustment factor. (A value of 0 indicates no parallax. A value of 1 indicates standard parallax.)
in pivot Upward direction of the camera within the frame of the upper screen (used for rotation).

Return Values

None.

Description

Calculates the view matrices and projection matrices for the left and right cameras, using the realism priority method.

This method assumes the distance between the surface of the CTR's LCD and the user, and it calculates matrices by applying that assumed relationship to virtual space. This method, therefore, automatically adjusts the position of the base camera specified by the application. This makes it possible to achieve effects that give the impression that objects located at the specified depthLevel are actually on the surface of the LCD.

Once the projection matrix has been calculated and output, the upward direction of the camera will be the direction specified for the pivot argument. If pivot is set to nn::math::PIVOT_NONE, no rotation is applied. If an invalid value is specified for the pivot argument, the function halts on an assertion. The value nn::math::PIVOT_UPSIDE_TO_TOP is specified by default.

This function stops at an assertion if it is called before the Initialize function has been called on an instance of the StereoCamera class.

Revision History

2010/09/13
Noted that execution stops at an assertion prior to initialization.
2010/04/02
Initial version.

CONFIDENTIAL