MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / getProjectionMatrix

Method getProjectionMatrix

src/Base/ViewProj.cpp:105–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105Matrix4D ViewProjMatrix::getProjectionMatrix() const
106{
107 // Return the same matrix as passed to the constructor
108 Matrix4D mat(_clMtx);
109 if (isOrthographic) {
110 mat.move(-0.5, -0.5, -0.5);
111 mat.scale(2.0, 2.0, 2.0);
112 }
113
114 return mat;
115}
116
117template<typename Vec>
118void perspectiveTransform(const Base::Matrix4D& mat, Vec& pnt)

Callers

nothing calls this directly

Calls 2

moveMethod · 0.45
scaleMethod · 0.45

Tested by

no test coverage detected