-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Culling of both cameras #1198
Culling of both cameras #1198
Conversation
@tomluchowski Could you please merge the commits so that there is only 1 functionality per commit ? But with PRs like this one, history of the files will become a mess in only a few days and reading code to understand better what's going on when looking for some regression becomes not possible. |
527fa61
to
9e34cd9
Compare
: naah by choice I appended to the akien's mga " Add changelog for 0.7.0" |
"Add changelog for 0.7.0" is not the best name I could think about for such a commit. Please rename it so the history is not broken. Keep in mind that if we look for file history, commits must be a minimum meaningfull. And in this case, it is missleading as I wouldn't expect such a commit to be culling code. |
It seems also like your PR do not compile |
Also I appear as author, and it contains my whole changelog additions, which are already in the development branch. I would do:
|
Well just look why travis is broken , it cannot upgrade it's repos : I will fix my commit to meaningful name when I am back home. |
yes but appveyor complains at least of constexpr. Since we also support MSVS2013 and MinGW compilers, we must not use not supported c++11 features. And since you are going to redo your commit, also note that you have uploaded a file EntityBase.cpp and .h that are not in use anymore. |
BTW : Could you and akien-mga relate to the issues I posted on our forum ? |
ok , hopefully I am done . |
@@ -271,6 +271,9 @@ set(OD_SOURCEFILES | |||
|
|||
${SRC}/camera/CameraManager.cpp | |||
${SRC}/camera/HermiteCatmullSpline.cpp | |||
${SRC}/camera/CullingManager.cpp | |||
${SRC}/camera/DummyArrayClass.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file does not exist, so the build fails:
CMake Error at CMakeLists.txt:652 (add_executable):
Cannot find source file:
/home/travis/build/OpenDungeons/OpenDungeons/source/camera/DummyArrayClass.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
9e99e62
to
7d5c1f8
Compare
@@ -62,7 +66,7 @@ class CameraManager | |||
fullStop | |||
}; | |||
|
|||
CameraManager(Ogre::SceneManager* sceneManager, TileContainer* gameMap, Ogre::RenderWindow* renderWindow); | |||
CameraManager(Ogre::SceneManager* sceneManager, GameMap* gameMap, Ogre::RenderWindow* renderWindow); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change TileContainer to GameMap ? TileContainer is not a very useful abstract level since it is almost not used but why did you change ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a choice it seems./
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, then it is a random change. Hopefully, GameMap is compatible with TileContainer. Seems like luck is on our side...
rightVerticesIndex++; | ||
mRightSlopeIndex++; | ||
return rightVerticesIndex == rightVertices.end(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty line
I've not signaled all the random empty lines because there were too many. Please at least remove when there are too many or when they hurt readability (like in a constructor init list). |
I've had a quick look and seen that are set but not used. Is it some forgotten test variables ? |
@hwoarangmy : They are used in bool SlopeWalk::notifyOnMoveDown(int64_t newyIndex) |
cb853c6
to
a7e687f
Compare
|
||
// index numbers in myArray of Vertices | ||
// belonging to the right path | ||
std::deque<int32_t> rightVertices; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you really don't want to follow code guidelines...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What have I missed in code guidelines that I fail to implement in here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class member variables names must start with m. That is, you should rename this variable to mRightVertices.
@tomluchowski It can be done later but do you think it would be hard to split the CullingManager so that we can use one instance for the main screen and another for the minimap ? |
That would be increadibly hard if not impossible. The whole algorithm needs to compute the convex_hull of ALL points exactly ONCE. |
…hull from boost geometry used
a7e687f
to
6297f7f
Compare
Could you also answer my post on the forum ? |
mVertices.mMyArray.clear(); | ||
|
||
boost::geometry::convex_hull(polygon, hull); | ||
boost::geometry::for_each_point(boost::geometry::exterior_ring(hull), [this](Point &p){this->mVertices.mMyArray.push_back(p);}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the next time, please split this into several lines to make clear there is a function here. Not blocking
I would have prefered to merge that after the release but at our current pace, that may be long. I have a PR almost done for allowing to change the minimap (switching from the old and the camera one) and if it gets merged before yours, you will have to make sure it works. I guess you would curse me for many generations if that was to happen ^^ Sorry for all the requested changes but the code looks much better now and is mergeable as for me
Which one ? |
As in title , now the code due to boost::geometry::convex_hull can cull both camera views at once .