nn::ulcd::CTR::StereoCamera::CalculateMatrices Member Function

Syntax

#include <nn/ulcd.h>

void CalculateMatrices(
     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
);

Arguments

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 from the camera to the desired location on the LCD (the base plane).
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 application priority method.

It performs matrix calculation based on the base camera specified by the application. The calculations performed by this function preserve the original view angle, so use of this function is recommended if you want to preserve the effect given by cameras that you have adjusted a certain way.

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