{"action":"created","comment":{"url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/pulls/comments/66753753","id":66753753,"diff_hunk":"@@ -0,0 +1,97 @@\n+/*\n+ *  Copyright (C) 2011-2016  OpenDungeons Team\n+ *\n+ *  This program is free software: you can redistribute it and/or modify\n+ *  it under the terms of the GNU General Public License as published by\n+ *  the Free Software Foundation, either version 3 of the License, or\n+ *  (at your option) any later version.\n+ *\n+ *  This program is distributed in the hope that it will be useful,\n+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ *  GNU General Public License for more details.\n+ *\n+ *  You should have received a copy of the GNU General Public License\n+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+ */\n+\n+#ifndef CULLINGMANAGER_H_\n+#define CULLINGMANAGER_H_\n+#include \"camera/CameraManager.h\"\n+#include \"camera/SlopeWalk.h\"\n+#include \"entities/Tile.h\"\n+\n+#include \"utils/VectorInt64.h\"\n+\n+#include <OgreRay.h>\n+#include <OgrePlane.h>\n+#include <set>\n+\n+class CameraManager;\n+class GameMap;\n+\n+/*! \\brief The CullingMangaer class is a class to effectivly \n+ *  manage culling methods used in game. So far there is only\n+ *  one algorithm included : it is supposed to cull the Tiles.\n+ *  It should be started with the method startTileCulling.\n+ *  In future I plan to add creature's culling as well. \n+ \n+ * Currently I try to impment the most general polygon rasterizing algorithm , that is :\n+ * 1. We choose the max and min points due to their Y value .\n+ * 2. We sort all the points by the angle value in it's polar representation \n+ * ( that is going , by visiting them clockwise due to the center of the polygon )\n+ * 3. Now we have two paths from which we can walk from top to down vertices : call them left and right .\n+ * 4. Between each following pair of vertices we can establish a >> slope << ,\n+ * which is just the the \"a\" in the eq. of linear form y = ax + b\n+ * 5. Now start drawing our polygon Row by Row From top to bottom . \n+ * Each Row has given the most left and rightmost tile due to use of both paths prepared before \n+ * -- Left path for tracing the most Leftmost Tile , Right path teh most Rightmost Tile in each .\n+ */\n+class CullingManager\n+{\n+public:\n+    static const int HIDE =  1;","path":"source/camera/CullingManager.h","position":53,"original_position":53,"commit_id":"a7e687f34a790ec6b783654b0429239091809251","original_commit_id":"a7e687f34a790ec6b783654b0429239091809251","user":{"login":"hwoarangmy","id":7493706,"avatar_url":"https://avatars.githubusercontent.com/u/7493706?v=3","gravatar_id":"","url":"https://api.github.com/users/hwoarangmy","html_url":"https://github.com/hwoarangmy","followers_url":"https://api.github.com/users/hwoarangmy/followers","following_url":"https://api.github.com/users/hwoarangmy/following{/other_user}","gists_url":"https://api.github.com/users/hwoarangmy/gists{/gist_id}","starred_url":"https://api.github.com/users/hwoarangmy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwoarangmy/subscriptions","organizations_url":"https://api.github.com/users/hwoarangmy/orgs","repos_url":"https://api.github.com/users/hwoarangmy/repos","events_url":"https://api.github.com/users/hwoarangmy/events{/privacy}","received_events_url":"https://api.github.com/users/hwoarangmy/received_events","type":"User","site_admin":false},"body":"that would be better to use the same variable type as used in newBashAndSplashTiles. In this case, the most fitted would be uint32_t.","created_at":"2016-06-13T08:14:43Z","updated_at":"2016-06-13T08:14:43Z","html_url":"https://github.com/OpenDungeons/OpenDungeons/pull/1198#discussion_r66753753","pull_request_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/pulls/1198","_links":{"self":{"href":"https://api.github.com/repos/OpenDungeons/OpenDungeons/pulls/comments/66753753"},"html":{"href":"https://github.com/OpenDungeons/OpenDungeons/pull/1198#discussion_r66753753"},"pull_request":{"href":"https://api.github.com/repos/OpenDungeons/OpenDungeons/pulls/1198"}}},"pull_request":{"url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/pulls/1198","id":72501472,"html_url":"https://github.com/OpenDungeons/OpenDungeons/pull/1198","diff_url":"https://github.com/OpenDungeons/OpenDungeons/pull/1198.diff","patch_url":"https://github.com/OpenDungeons/OpenDungeons/pull/1198.patch","issue_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/issues/1198","number":1198,"state":"open","locked":false,"title":"Culling of both cameras","user":{"login":"tomluchowski","id":4957813,"avatar_url":"https://avatars.githubusercontent.com/u/4957813?v=3","gravatar_id":"","url":"https://api.github.com/users/tomluchowski","html_url":"https://github.com/tomluchowski","followers_url":"https://api.github.com/users/tomluchowski/followers","following_url":"https://api.github.com/users/tomluchowski/following{/other_user}","gists_url":"https://api.github.com/users/tomluchowski/gists{/gist_id}","starred_url":"https://api.github.com/users/tomluchowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomluchowski/subscriptions","organizations_url":"https://api.github.com/users/tomluchowski/orgs","repos_url":"https://api.github.com/users/tomluchowski/repos","events_url":"https://api.github.com/users/tomluchowski/events{/privacy}","received_events_url":"https://api.github.com/users/tomluchowski/received_events","type":"User","site_admin":false},"body":"As in title , now the code due to boost::geometry::convex_hull can cull both camera views at once .","created_at":"2016-06-03T12:47:58Z","updated_at":"2016-06-13T08:14:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47e8aa520be39f03011a6191d3dd7cf083d7728a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/pulls/1198/commits","review_comments_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/pulls/1198/comments","review_comment_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/issues/1198/comments","statuses_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/statuses/a7e687f34a790ec6b783654b0429239091809251","head":{"label":"tomluchowski:development","ref":"development","sha":"a7e687f34a790ec6b783654b0429239091809251","user":{"login":"tomluchowski","id":4957813,"avatar_url":"https://avatars.githubusercontent.com/u/4957813?v=3","gravatar_id":"","url":"https://api.github.com/users/tomluchowski","html_url":"https://github.com/tomluchowski","followers_url":"https://api.github.com/users/tomluchowski/followers","following_url":"https://api.github.com/users/tomluchowski/following{/other_user}","gists_url":"https://api.github.com/users/tomluchowski/gists{/gist_id}","starred_url":"https://api.github.com/users/tomluchowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomluchowski/subscriptions","organizations_url":"https://api.github.com/users/tomluchowski/orgs","repos_url":"https://api.github.com/users/tomluchowski/repos","events_url":"https://api.github.com/users/tomluchowski/events{/privacy}","received_events_url":"https://api.github.com/users/tomluchowski/received_events","type":"User","site_admin":false},"repo":{"id":28537490,"name":"OpenDungeons","full_name":"tomluchowski/OpenDungeons","owner":{"login":"tomluchowski","id":4957813,"avatar_url":"https://avatars.githubusercontent.com/u/4957813?v=3","gravatar_id":"","url":"https://api.github.com/users/tomluchowski","html_url":"https://github.com/tomluchowski","followers_url":"https://api.github.com/users/tomluchowski/followers","following_url":"https://api.github.com/users/tomluchowski/following{/other_user}","gists_url":"https://api.github.com/users/tomluchowski/gists{/gist_id}","starred_url":"https://api.github.com/users/tomluchowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomluchowski/subscriptions","organizations_url":"https://api.github.com/users/tomluchowski/orgs","repos_url":"https://api.github.com/users/tomluchowski/repos","events_url":"https://api.github.com/users/tomluchowski/events{/privacy}","received_events_url":"https://api.github.com/users/tomluchowski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomluchowski/OpenDungeons","description":"Open source game inspired by Dungeon Keeper - Dark, damp and dangerous...","fork":true,"url":"https://api.github.com/repos/tomluchowski/OpenDungeons","forks_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/forks","keys_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/teams","hooks_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/hooks","issue_events_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/issues/events{/number}","events_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/events","assignees_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/assignees{/user}","branches_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/branches{/branch}","tags_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/tags","blobs_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/statuses/{sha}","languages_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/languages","stargazers_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/stargazers","contributors_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/contributors","subscribers_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/subscribers","subscription_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/subscription","commits_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/contents/{+path}","compare_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/merges","archive_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/downloads","issues_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/issues{/number}","pulls_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/pulls{/number}","milestones_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/milestones{/number}","notifications_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/labels{/name}","releases_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/releases{/id}","deployments_url":"https://api.github.com/repos/tomluchowski/OpenDungeons/deployments","created_at":"2014-12-27T13:37:58Z","updated_at":"2016-05-15T16:03:18Z","pushed_at":"2016-06-12T21:14:06Z","git_url":"git://github.com/tomluchowski/OpenDungeons.git","ssh_url":"git@github.com:tomluchowski/OpenDungeons.git","clone_url":"https://github.com/tomluchowski/OpenDungeons.git","svn_url":"https://github.com/tomluchowski/OpenDungeons","homepage":"http://opendungeons.sourceforge.net/","size":342359,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"OpenDungeons:development","ref":"development","sha":"f45d31c79fb24e89e728d277908cee9aebd6fd53","user":{"login":"OpenDungeons","id":8298376,"avatar_url":"https://avatars.githubusercontent.com/u/8298376?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenDungeons","html_url":"https://github.com/OpenDungeons","followers_url":"https://api.github.com/users/OpenDungeons/followers","following_url":"https://api.github.com/users/OpenDungeons/following{/other_user}","gists_url":"https://api.github.com/users/OpenDungeons/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenDungeons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenDungeons/subscriptions","organizations_url":"https://api.github.com/users/OpenDungeons/orgs","repos_url":"https://api.github.com/users/OpenDungeons/repos","events_url":"https://api.github.com/users/OpenDungeons/events{/privacy}","received_events_url":"https://api.github.com/users/OpenDungeons/received_events","type":"Organization","site_admin":false},"repo":{"id":22376157,"name":"OpenDungeons","full_name":"OpenDungeons/OpenDungeons","owner":{"login":"OpenDungeons","id":8298376,"avatar_url":"https://avatars.githubusercontent.com/u/8298376?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenDungeons","html_url":"https://github.com/OpenDungeons","followers_url":"https://api.github.com/users/OpenDungeons/followers","following_url":"https://api.github.com/users/OpenDungeons/following{/other_user}","gists_url":"https://api.github.com/users/OpenDungeons/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenDungeons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenDungeons/subscriptions","organizations_url":"https://api.github.com/users/OpenDungeons/orgs","repos_url":"https://api.github.com/users/OpenDungeons/repos","events_url":"https://api.github.com/users/OpenDungeons/events{/privacy}","received_events_url":"https://api.github.com/users/OpenDungeons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenDungeons/OpenDungeons","description":"Open source game inspired by Dungeon Keeper - Dark, damp and dangerous...","fork":false,"url":"https://api.github.com/repos/OpenDungeons/OpenDungeons","forks_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/forks","keys_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/teams","hooks_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/hooks","issue_events_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/issues/events{/number}","events_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/events","assignees_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/assignees{/user}","branches_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/branches{/branch}","tags_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/tags","blobs_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/languages","stargazers_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/stargazers","contributors_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/contributors","subscribers_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/subscribers","subscription_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/subscription","commits_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/contents/{+path}","compare_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/merges","archive_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/downloads","issues_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/issues{/number}","pulls_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/labels{/name}","releases_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/releases{/id}","deployments_url":"https://api.github.com/repos/OpenDungeons/OpenDungeons/deployments","created_at":"2014-07-29T10:24:41Z","updated_at":"2016-06-12T00:24:52Z","pushed_at":"2016-06-12T21:14:06Z","git_url":"git://github.com/OpenDungeons/OpenDungeons.git","ssh_url":"git@github.com:OpenDungeons/OpenDungeons.git","clone_url":"https://github.com/OpenDungeons/OpenDungeons.git","svn_url":"https://github.com/OpenDungeons/OpenDungeons","homepage":"http://opendungeons.github.io","size":346379,"stargazers_count":87,"watchers_count":87,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":115,"forks":25,"open_issues":115,"watchers":87,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenDungeons/OpenDungeons/pulls/1198"},"html":{"href":"https://github.com/OpenDungeons/OpenDungeons/pull/1198"},"issue":{"href":"https://api.github.com/repos/OpenDungeons/OpenDungeons/issues/1198"},"comments":{"href":"https://api.github.com/repos/OpenDungeons/OpenDungeons/issues/1198/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenDungeons/OpenDungeons/pulls/1198/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenDungeons/OpenDungeons/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenDungeons/OpenDungeons/pulls/1198/commits"},"statuses":{"href":"https://api.github.com/repos/OpenDungeons/OpenDungeons/statuses/a7e687f34a790ec6b783654b0429239091809251"}}}}
{"actor":{"display_login":"hwoarangmy"}}