-
Notifications
You must be signed in to change notification settings - Fork 197
MAPSJS-2660: Support off-center projection in getFitBoundsDistance() #2294
Conversation
Also add more unit tests. Signed-off-by: Andres Mandado <andres.mandado-almajano@here.com>
c522597
to
1ffdbe5
Compare
Signed-off-by: Andres Mandado <andres.mandado-almajano@here.com>
1ffdbe5
to
1577629
Compare
Codecov Report
@@ Coverage Diff @@
## master #2294 +/- ##
==========================================
+ Coverage 67.96% 68.23% +0.27%
==========================================
Files 315 315
Lines 27775 27755 -20
Branches 6219 6220 +1
==========================================
+ Hits 18877 18940 +63
+ Misses 8898 8815 -83
Continue to review full report at Codecov.
|
tilt: 80, | ||
heading: 30 | ||
}, | ||
ppalPoint: { x: -0.8, y: 0.1 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a test at the extremes, i.e. -1, 1, and make sure they don't break etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
// |<-------->| Ps | ||
// constD pEyeZ| /| ^ | ||
// |<-->|<--->| / | | | ||
// | | | / | | |ndcY-O.y|*h/2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please document what h is to remove any potential ambiguity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@here/harp-mapview/lib/Utils.ts
Outdated
// | _-` Ps - P projected on screen. | ||
// P-` O - Principal point. | ||
// | ||
// Diagram showing how to calculate the camera distance on the camera YZ plane so that a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't understand the diagrams till I had read the description, and even then it wasn't fully clear.
They should have some title, and the second diagram should have some description that highlights that we are computing the factor to move C from C0 to C1. Also, it should be highlighted that Ps is on the edge of the screen. I know it is described later, but it would be good to have it documented here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: Andres Mandado <andres.mandado-almajano@here.com>
…2294) * MAPSJS-2660: Simplify getFitBoundsDistance implementation. Also add more unit tests. Signed-off-by: Andres Mandado <andres.mandado-almajano@here.com> * MAPSJS-2660: Support off-center projection in getFitBoundsDistance. Signed-off-by: Andres Mandado <andres.mandado-almajano@here.com> * MAPSJS-2660: Address review comments. Signed-off-by: Andres Mandado <andres.mandado-almajano@here.com> Signed-off-by: Fischer, Thomas <thomas.fischer@here.com>
No description provided.