MCPcopy Create free account
hub / github.com/microsoft/SandDance / getProjectionMatrix

Function getProjectionMatrix

docs/tests/v2/es6/js/sanddance.js:38114–38137  ·  view source on GitHub ↗
(_ref9)

Source from the content-addressed store, hash-verified

38112}
38113
38114function getProjectionMatrix(_ref9) {
38115 var width = _ref9.width,
38116 height = _ref9.height,
38117 pitch = _ref9.pitch,
38118 altitude = _ref9.altitude,
38119 nearZMultiplier = _ref9.nearZMultiplier,
38120 farZMultiplier = _ref9.farZMultiplier;
38121
38122 var _getProjectionParamet = getProjectionParameters({
38123 width: width,
38124 height: height,
38125 altitude: altitude,
38126 pitch: pitch,
38127 nearZMultiplier: nearZMultiplier,
38128 farZMultiplier: farZMultiplier
38129 }),
38130 fov = _getProjectionParamet.fov,
38131 aspect = _getProjectionParamet.aspect,
38132 near = _getProjectionParamet.near,
38133 far = _getProjectionParamet.far;
38134
38135 var projectionMatrix = mat4.perspective([], fov, aspect, near, far);
38136 return projectionMatrix;
38137}
38138
38139function worldToPixels(xyz, pixelProjectionMatrix) {
38140 var _xyz2 = (0, _slicedToArray2.default)(xyz, 3),

Callers

nothing calls this directly

Calls 2

getProjectionParametersFunction · 0.70
perspectiveMethod · 0.45

Tested by

no test coverage detected