Esempio n. 1
0
V3f
direction (const Box2i &dataWindow, const V2f &pixelPosition)
{
    V2f ll = latLong (dataWindow, pixelPosition);

    return V3f (sin (ll.y) * cos (ll.x),
		sin (ll.x),
		cos (ll.y) * cos (ll.x));
}
Esempio n. 2
0
 GeographyPointValue(const S2Point &s2Point)
     : m_latitude(nullCoord())
     , m_longitude(nullCoord())
 {
     assert(!s2Point.IsNaN());
     S2LatLng latLong(s2Point);
     m_latitude = latLong.lat().degrees();
     m_longitude = latLong.lng().degrees();
     assert (m_latitude >= -90.0 && m_latitude <= 90.0);
     assert (m_longitude >= -180.0 && m_longitude <= 180.0);
 }
Esempio n. 3
0
V2f
pixelPosition (const Box2i &dataWindow, const V3f &direction)
{
    return pixelPosition (dataWindow, latLong (direction));
}