GitHub PullRequestReviewCommentEvent at 2014-09-16 15:28:30
Repository: tangram-es
Actor: blair1618
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/tangram-map/tangram-es/pulls/comments/17608575","id":17608575,"diff_hunk":"@@ -0,0 +1,51 @@\n+#pragma one\n+\n+//Define global constants\n+#define PI 3.1415926535\n+#define HALF_CIRCUMFERENCE 20037508.342789244\n+\n+#include \"glm/glm.hpp\"\n+\n+const glm::vec2 ORIGIN(HALF_CIRCUMFERENCE, HALF_CIRCUMFERENCE);\n+\n+enum class ProjectionType {\n+    mercator\n+};\n+\n+class MapProjection {\n+protected:\n+    /* m_type: type of map projection: example: mercator*/\n+    ProjectionType m_type;\n+public:\n+    MapProjection(ProjectionType _type) : m_type(_type) {};\n+    virtual glm::vec2 LatLonToMeters(glm::vec2 _latLon) = 0;\n+    virtual glm::vec2 MetersToLatLon(glm::vec2 _meters) = 0;\n+    virtual glm::vec2 PixelsToMeters(glm::vec2 _pix, int _zoom) = 0;\n+    virtual glm::vec2 MetersToPixel(glm::vec2 _meters, int _zoom) = 0;\n+    virtual glm::ivec2 PixelsToTileXY(glm::vec2 _pix) = 0;\n+    virtual glm::ivec2 MetersToTileXY(glm::vec2 _meters, int _zoom) = 0;\n+    virtual glm::vec4 TileBounds(glm::ivec3 _tileCoord) = 0;\n+    virtual glm::vec4 TileLatLonBounds(glm::ivec3 _tileCoord) = 0;\n+    virtual ProjectionType GetMapProjectionType() {return m_type;}\n+    virtual ~MapProjection() {}\n+};\n+\n+class MercProjection : public MapProjection {\n+    /* \n+     * Following define the boundry covered by this mercator projection\n+     */\n+    float m_TileSize;\n+    float m_Res;\n+public:\n+    MercProjection(ProjectionType _type, int  _tileSize=256);\n+    virtual glm::vec2 LatLonToMeters(glm::vec2 _latLon);\n+    virtual glm::vec2 MetersToLatLon(glm::vec2 _meters);\n+    virtual glm::vec2 PixelsToMeters(glm::vec2 _pix, int _zoom);\n+    virtual glm::vec2 MetersToPixel(glm::vec2 _meters, int _zoom);\n+    virtual glm::ivec2 PixelsToTileXY(glm::vec2 _pix);\n+    virtual glm::ivec2 MetersToTileXY(glm::vec2 _meters, int _zoom);\n+    virtual glm::vec4 TileBounds(glm::ivec3 _tileCoord);","path":"core/util/projection.h","position":47,"original_position":47,"commit_id":"6280e2d274c1db0a0e4c4cc4e23cf60cb8a25815","original_commit_id":"6280e2d274c1db0a0e4c4cc4e23cf60cb8a25815","user":{"login":"blair1618","id":3371850,"avatar_url":"https://avatars.githubusercontent.com/u/3371850?v=2","gravatar_id":"97d18d65a4ead88adfd7f89cb5bca0bd","url":"https://api.github.com/users/blair1618","html_url":"https://github.com/blair1618","followers_url":"https://api.github.com/users/blair1618/followers","following_url":"https://api.github.com/users/blair1618/following{/other_user}","gists_url":"https://api.github.com/users/blair1618/gists{/gist_id}","starred_url":"https://api.github.com/users/blair1618/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blair1618/subscriptions","organizations_url":"https://api.github.com/users/blair1618/orgs","repos_url":"https://api.github.com/users/blair1618/repos","events_url":"https://api.github.com/users/blair1618/events{/privacy}","received_events_url":"https://api.github.com/users/blair1618/received_events","type":"User","site_admin":false},"body":"A comment describing the returned value would be helpful when the structure is not obvious","created_at":"2014-09-16T15:28:30Z","updated_at":"2014-09-16T15:28:30Z","html_url":"https://github.com/tangram-map/tangram-es/pull/7#discussion_r17608575","pull_request_url":"https://api.github.com/repos/tangram-map/tangram-es/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/tangram-map/tangram-es/pulls/comments/17608575"},"html":{"href":"https://github.com/tangram-map/tangram-es/pull/7#discussion_r17608575"},"pull_request":{"href":"https://api.github.com/repos/tangram-map/tangram-es/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/tangram-map/tangram-es/pulls/7","id":21273280,"html_url":"https://github.com/tangram-map/tangram-es/pull/7","diff_url":"https://github.com/tangram-map/tangram-es/pull/7.diff","patch_url":"https://github.com/tangram-map/tangram-es/pull/7.patch","issue_url":"https://api.github.com/repos/tangram-map/tangram-es/issues/7","number":7,"state":"open","locked":false,"title":"An abstract projection class and child mercprojection class","user":{"login":"tallytalwar","id":360641,"avatar_url":"https://avatars.githubusercontent.com/u/360641?v=2","gravatar_id":"03d156e407fbd4858c5ea6d81cec7e76","url":"https://api.github.com/users/tallytalwar","html_url":"https://github.com/tallytalwar","followers_url":"https://api.github.com/users/tallytalwar/followers","following_url":"https://api.github.com/users/tallytalwar/following{/other_user}","gists_url":"https://api.github.com/users/tallytalwar/gists{/gist_id}","starred_url":"https://api.github.com/users/tallytalwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tallytalwar/subscriptions","organizations_url":"https://api.github.com/users/tallytalwar/orgs","repos_url":"https://api.github.com/users/tallytalwar/repos","events_url":"https://api.github.com/users/tallytalwar/events{/privacy}","received_events_url":"https://api.github.com/users/tallytalwar/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-16T02:27:01Z","updated_at":"2014-09-16T15:28:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"691f48dbd3a580d938f0bd228f403efc153ce93f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tangram-map/tangram-es/pulls/7/commits","review_comments_url":"https://api.github.com/repos/tangram-map/tangram-es/pulls/7/comments","review_comment_url":"https://api.github.com/repos/tangram-map/tangram-es/pulls/comments/{number}","comments_url":"https://api.github.com/repos/tangram-map/tangram-es/issues/7/comments","statuses_url":"https://api.github.com/repos/tangram-map/tangram-es/statuses/6280e2d274c1db0a0e4c4cc4e23cf60cb8a25815","head":{"label":"tangram-map:geoUtil","ref":"geoUtil","sha":"6280e2d274c1db0a0e4c4cc4e23cf60cb8a25815","user":{"login":"tangram-map","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=2","gravatar_id":null,"url":"https://api.github.com/users/tangram-map","html_url":"https://github.com/tangram-map","followers_url":"https://api.github.com/users/tangram-map/followers","following_url":"https://api.github.com/users/tangram-map/following{/other_user}","gists_url":"https://api.github.com/users/tangram-map/gists{/gist_id}","starred_url":"https://api.github.com/users/tangram-map/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangram-map/subscriptions","organizations_url":"https://api.github.com/users/tangram-map/orgs","repos_url":"https://api.github.com/users/tangram-map/repos","events_url":"https://api.github.com/users/tangram-map/events{/privacy}","received_events_url":"https://api.github.com/users/tangram-map/received_events","type":"Organization","site_admin":false},"repo":{"id":23391501,"name":"tangram-es","full_name":"tangram-map/tangram-es","owner":{"login":"tangram-map","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=2","gravatar_id":null,"url":"https://api.github.com/users/tangram-map","html_url":"https://github.com/tangram-map","followers_url":"https://api.github.com/users/tangram-map/followers","following_url":"https://api.github.com/users/tangram-map/following{/other_user}","gists_url":"https://api.github.com/users/tangram-map/gists{/gist_id}","starred_url":"https://api.github.com/users/tangram-map/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangram-map/subscriptions","organizations_url":"https://api.github.com/users/tangram-map/orgs","repos_url":"https://api.github.com/users/tangram-map/repos","events_url":"https://api.github.com/users/tangram-map/events{/privacy}","received_events_url":"https://api.github.com/users/tangram-map/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangram-map/tangram-es","description":"OpenGL ES version of Tangram for mobile devices - EARLY work-in-progress!","fork":false,"url":"https://api.github.com/repos/tangram-map/tangram-es","forks_url":"https://api.github.com/repos/tangram-map/tangram-es/forks","keys_url":"https://api.github.com/repos/tangram-map/tangram-es/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangram-map/tangram-es/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangram-map/tangram-es/teams","hooks_url":"https://api.github.com/repos/tangram-map/tangram-es/hooks","issue_events_url":"https://api.github.com/repos/tangram-map/tangram-es/issues/events{/number}","events_url":"https://api.github.com/repos/tangram-map/tangram-es/events","assignees_url":"https://api.github.com/repos/tangram-map/tangram-es/assignees{/user}","branches_url":"https://api.github.com/repos/tangram-map/tangram-es/branches{/branch}","tags_url":"https://api.github.com/repos/tangram-map/tangram-es/tags","blobs_url":"https://api.github.com/repos/tangram-map/tangram-es/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangram-map/tangram-es/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangram-map/tangram-es/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangram-map/tangram-es/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangram-map/tangram-es/statuses/{sha}","languages_url":"https://api.github.com/repos/tangram-map/tangram-es/languages","stargazers_url":"https://api.github.com/repos/tangram-map/tangram-es/stargazers","contributors_url":"https://api.github.com/repos/tangram-map/tangram-es/contributors","subscribers_url":"https://api.github.com/repos/tangram-map/tangram-es/subscribers","subscription_url":"https://api.github.com/repos/tangram-map/tangram-es/subscription","commits_url":"https://api.github.com/repos/tangram-map/tangram-es/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangram-map/tangram-es/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangram-map/tangram-es/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangram-map/tangram-es/issues/comments/{number}","contents_url":"https://api.github.com/repos/tangram-map/tangram-es/contents/{+path}","compare_url":"https://api.github.com/repos/tangram-map/tangram-es/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangram-map/tangram-es/merges","archive_url":"https://api.github.com/repos/tangram-map/tangram-es/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangram-map/tangram-es/downloads","issues_url":"https://api.github.com/repos/tangram-map/tangram-es/issues{/number}","pulls_url":"https://api.github.com/repos/tangram-map/tangram-es/pulls{/number}","milestones_url":"https://api.github.com/repos/tangram-map/tangram-es/milestones{/number}","notifications_url":"https://api.github.com/repos/tangram-map/tangram-es/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangram-map/tangram-es/labels{/name}","releases_url":"https://api.github.com/repos/tangram-map/tangram-es/releases{/id}","created_at":"2014-08-27T13:56:56Z","updated_at":"2014-09-04T18:00:46Z","pushed_at":"2014-09-16T02:25:33Z","git_url":"git://github.com/tangram-map/tangram-es.git","ssh_url":"git@github.com:tangram-map/tangram-es.git","clone_url":"https://github.com/tangram-map/tangram-es.git","svn_url":"https://github.com/tangram-map/tangram-es","homepage":"","size":732,"stargazers_count":4,"watchers_count":4,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":4,"default_branch":"master"}},"base":{"label":"tangram-map:master","ref":"master","sha":"e38a03a2fc1af9ca68dd7faed072e7a7949808ed","user":{"login":"tangram-map","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=2","gravatar_id":null,"url":"https://api.github.com/users/tangram-map","html_url":"https://github.com/tangram-map","followers_url":"https://api.github.com/users/tangram-map/followers","following_url":"https://api.github.com/users/tangram-map/following{/other_user}","gists_url":"https://api.github.com/users/tangram-map/gists{/gist_id}","starred_url":"https://api.github.com/users/tangram-map/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangram-map/subscriptions","organizations_url":"https://api.github.com/users/tangram-map/orgs","repos_url":"https://api.github.com/users/tangram-map/repos","events_url":"https://api.github.com/users/tangram-map/events{/privacy}","received_events_url":"https://api.github.com/users/tangram-map/received_events","type":"Organization","site_admin":false},"repo":{"id":23391501,"name":"tangram-es","full_name":"tangram-map/tangram-es","owner":{"login":"tangram-map","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=2","gravatar_id":null,"url":"https://api.github.com/users/tangram-map","html_url":"https://github.com/tangram-map","followers_url":"https://api.github.com/users/tangram-map/followers","following_url":"https://api.github.com/users/tangram-map/following{/other_user}","gists_url":"https://api.github.com/users/tangram-map/gists{/gist_id}","starred_url":"https://api.github.com/users/tangram-map/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangram-map/subscriptions","organizations_url":"https://api.github.com/users/tangram-map/orgs","repos_url":"https://api.github.com/users/tangram-map/repos","events_url":"https://api.github.com/users/tangram-map/events{/privacy}","received_events_url":"https://api.github.com/users/tangram-map/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangram-map/tangram-es","description":"OpenGL ES version of Tangram for mobile devices - EARLY work-in-progress!","fork":false,"url":"https://api.github.com/repos/tangram-map/tangram-es","forks_url":"https://api.github.com/repos/tangram-map/tangram-es/forks","keys_url":"https://api.github.com/repos/tangram-map/tangram-es/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangram-map/tangram-es/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangram-map/tangram-es/teams","hooks_url":"https://api.github.com/repos/tangram-map/tangram-es/hooks","issue_events_url":"https://api.github.com/repos/tangram-map/tangram-es/issues/events{/number}","events_url":"https://api.github.com/repos/tangram-map/tangram-es/events","assignees_url":"https://api.github.com/repos/tangram-map/tangram-es/assignees{/user}","branches_url":"https://api.github.com/repos/tangram-map/tangram-es/branches{/branch}","tags_url":"https://api.github.com/repos/tangram-map/tangram-es/tags","blobs_url":"https://api.github.com/repos/tangram-map/tangram-es/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangram-map/tangram-es/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangram-map/tangram-es/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangram-map/tangram-es/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangram-map/tangram-es/statuses/{sha}","languages_url":"https://api.github.com/repos/tangram-map/tangram-es/languages","stargazers_url":"https://api.github.com/repos/tangram-map/tangram-es/stargazers","contributors_url":"https://api.github.com/repos/tangram-map/tangram-es/contributors","subscribers_url":"https://api.github.com/repos/tangram-map/tangram-es/subscribers","subscription_url":"https://api.github.com/repos/tangram-map/tangram-es/subscription","commits_url":"https://api.github.com/repos/tangram-map/tangram-es/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangram-map/tangram-es/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangram-map/tangram-es/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangram-map/tangram-es/issues/comments/{number}","contents_url":"https://api.github.com/repos/tangram-map/tangram-es/contents/{+path}","compare_url":"https://api.github.com/repos/tangram-map/tangram-es/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangram-map/tangram-es/merges","archive_url":"https://api.github.com/repos/tangram-map/tangram-es/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangram-map/tangram-es/downloads","issues_url":"https://api.github.com/repos/tangram-map/tangram-es/issues{/number}","pulls_url":"https://api.github.com/repos/tangram-map/tangram-es/pulls{/number}","milestones_url":"https://api.github.com/repos/tangram-map/tangram-es/milestones{/number}","notifications_url":"https://api.github.com/repos/tangram-map/tangram-es/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangram-map/tangram-es/labels{/name}","releases_url":"https://api.github.com/repos/tangram-map/tangram-es/releases{/id}","created_at":"2014-08-27T13:56:56Z","updated_at":"2014-09-04T18:00:46Z","pushed_at":"2014-09-16T02:25:33Z","git_url":"git://github.com/tangram-map/tangram-es.git","ssh_url":"git@github.com:tangram-map/tangram-es.git","clone_url":"https://github.com/tangram-map/tangram-es.git","svn_url":"https://github.com/tangram-map/tangram-es","homepage":"","size":732,"stargazers_count":4,"watchers_count":4,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tangram-map/tangram-es/pulls/7"},"html":{"href":"https://github.com/tangram-map/tangram-es/pull/7"},"issue":{"href":"https://api.github.com/repos/tangram-map/tangram-es/issues/7"},"comments":{"href":"https://api.github.com/repos/tangram-map/tangram-es/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/tangram-map/tangram-es/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/tangram-map/tangram-es/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/tangram-map/tangram-es/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/tangram-map/tangram-es/statuses/6280e2d274c1db0a0e4c4cc4e23cf60cb8a25815"}}}}