Пример #1
0
// Used to generate projection from ovrEyeDesc::Fov.
func MatrixProjection(fov FovPort, znear, zfar float32, rightHanded bool) Matrix4f {
	if rightHanded {
		return matrix4f(C.ovrMatrix4f_Projection(c_fovPort(fov), C.float(znear), C.float(zfar), 1))
	} else {
		return matrix4f(C.ovrMatrix4f_Projection(c_fovPort(fov), C.float(znear), C.float(zfar), 0))
	}
}
Пример #2
0
Файл: ovr.go Проект: postfix/ovr
func Matrix4f_Projection(fov FovPort, znear float32, zfar float32, rightHanded bool) Matrix4f {
	return newMatrix4f(C.ovrMatrix4f_Projection(fov.toC(), C.float(znear), C.float(zfar), ovrBool(rightHanded)))
}
Пример #3
0
/// Used to generate projection from ovrEyeDesc::Fov.
///
/// \param[in] fov Specifies the ovrFovPort to use.
/// \param[in] znear Distance to near Z limit.
/// \param[in] zfar Distance to far Z limit.
/// \param[in] projectionModFlags A combination of the ovrProjectionModifier flags.
///
/// \return Returns the calculated projection matrix.
///
/// \see ovrProjectionModifier
func Matrix4f_Projection(fov FovPort, znear, zfar float32, projectionModFlags ProjectionModifier) Matrix4f {
	return goMatrix4f(C.ovrMatrix4f_Projection(cFovPort(fov), C.float(znear), C.float(zfar), C.uint(projectionModFlags)))
}