// Copyright 2005 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS-IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // Author: [email protected] (Eric Veach) #include "s2/s2coords.h" #include "s2/util/bits/bits.h" namespace S2 { namespace internal { // Define the "extern" constants in s2coords-internal.h. static_assert …; // kIJtoPos[orientation][ij] -> pos int const kIJtoPos[4][4] = …; // kPosToIJ[orientation][pos] -> ij int const kPosToIJ[4][4] = …; // kPosToOrientation[pos] -> orientation_modifier int const kPosToOrientation[4] = …; int const kFaceUVWFaces[6][3][2] = …; double const kFaceUVWAxes[6][3][3] = …; } // namespace internal S2Point FaceXYZtoUVW(int face, S2Point const& p) { … } int XYZtoFaceSiTi(S2Point const& p, int* face, unsigned int* si, unsigned int* ti) { … } S2Point FaceSiTitoXYZ(int face, unsigned int si, unsigned int ti) { … } } // namespace S2