MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / makeFovPortFrustum

Function makeFovPortFrustum

Engine/source/math/mathUtils.cpp:1436–1455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1434//-----------------------------------------------------------------------------
1435
1436void makeFovPortFrustum(
1437 Frustum *outFrustum,
1438 bool isOrtho,
1439 F32 nearDist,
1440 F32 farDist,
1441 const FovPort &inPort,
1442 const MatrixF &transform)
1443{
1444 F32 leftSize = nearDist * inPort.leftTan;
1445 F32 rightSize = nearDist * inPort.rightTan;
1446 F32 upSize = nearDist * inPort.upTan;
1447 F32 downSize = nearDist * inPort.downTan;
1448
1449 F32 left = -leftSize;
1450 F32 right = rightSize;
1451 F32 top = upSize;
1452 F32 bottom = -downSize;
1453
1454 outFrustum->set(isOrtho, left, right, top, bottom, nearDist, farDist, transform);
1455}
1456
1457//-----------------------------------------------------------------------------
1458

Callers 6

updateReflectionMethod · 0.85
renderSceneMethod · 0.85
updateMethod · 0.85
_internalRenderMethod · 0.85
onRenderMethod · 0.85
setNearFarDistMethod · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected