Example #1
0
File: ovr.go Project: krux02/libovr
// Used for 2D rendering, Y is down
// orthoScale = 1.0f / pixelsPerTanAngleAtCenter
// orthoDistance = distance from camera, such as 0.8m
func MatrixOrthoSubProjection(projection Matrix4f, orthoScale Vector2f, orthoDistance, eyeViewAdjustX float32) Matrix4f {
	return matrix4f(C.ovrMatrix4f_OrthoSubProjection(c_matrix4f(projection), c_vector2f(orthoScale), C.float(orthoDistance), C.float(eyeViewAdjustX)))
}
Example #2
0
File: ovr.go Project: postfix/ovr
func Matrix4f_OrthoSubProjection(projection Matrix4f, orthoScale Vector2f, orthoDistance float32, eyeViewAdjustX float32) Matrix4f {
	return newMatrix4f(C.ovrMatrix4f_OrthoSubProjection(projection.toC(), orthoScale.toC(), C.float(orthoDistance), C.float(eyeViewAdjustX)))
}
Example #3
0
/// Generates an orthographic sub-projection.
///
/// Used for 2D rendering, Y is down.
///
/// \param[in] projection The perspective matrix that the orthographic matrix is derived from.
/// \param[in] orthoScale Equal to 1.0f / pixelsPerTanAngleAtCenter.
/// \param[in] orthoDistance Equal to the distance from the camera in meters, such as 0.8m.
/// \param[in] HmdToEyeOffsetX Specifies the offset of the eye from the center.
///
/// \return Returns the calculated projection matrix.
func Matrix4f_OrthoSubProjection(projection Matrix4f, orthoScale Vector2f, orthoDistance, hmdToEyeViewOffsetX float32) Matrix4f {
	return goMatrix4f(C.ovrMatrix4f_OrthoSubProjection(cMatrix4f(projection), cVector2f(orthoScale), C.float(orthoDistance), C.float(hmdToEyeViewOffsetX)))
}