rawPoint returns an unnormalized r3 vector from the origin through the center of the s2 cell on the sphere.
()
| 517 | // rawPoint returns an unnormalized r3 vector from the origin through the center |
| 518 | // of the s2 cell on the sphere. |
| 519 | func (ci CellID) rawPoint() r3.Vector { |
| 520 | face, si, ti := ci.faceSiTi() |
| 521 | return faceUVToXYZ(face, stToUV((0.5/MaxSize)*float64(si)), stToUV((0.5/MaxSize)*float64(ti))) |
| 522 | } |
| 523 | |
| 524 | // faceSiTi returns the Face/Si/Ti coordinates of the center of the cell. |
| 525 | func (ci CellID) faceSiTi() (face int, si, ti uint32) { |