MCPcopy Create free account
hub / github.com/comaps/comaps / IsReverseProjection3d

Method IsReverseProjection3d

libs/geometry/screenbase.cpp:508–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508bool ScreenBase::IsReverseProjection3d(m2::PointD const & pt) const
509{
510 if (!m_isPerspective)
511 return false;
512
513 Vector3dT const normalizedPoint{float(2.0 * pt.x / m_PixelRect.SizeX() - 1.0),
514 -float(2.0 * pt.y / m_PixelRect.SizeY() - 1.0), 0.0, 1.0};
515
516 Vector3dT const perspectivePoint = normalizedPoint * m_Pto3d;
517 return perspectivePoint(0, 3) < 0.0;
518}
519
520ScreenBase::Matrix3dT ScreenBase::GetModelView() const
521{

Callers 4

AddMethod · 0.80
GetPixelPositionMethod · 0.80
UpdateMethod · 0.80
GetPixelShapeMethod · 0.80

Calls 2

SizeXMethod · 0.80
SizeYMethod · 0.80

Tested by

no test coverage detected