Skip to content
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

ElevationGrid Update. #86

Closed
wants to merge 17 commits into from
Closed

ElevationGrid Update. #86

wants to merge 17 commits into from

Conversation

jarmonik
Copy link
Contributor

Changed ElevationGrid manager to return float instead of int16 for smoother and more accurate terrain collision matching. The physics engine does the interpolation in floating point format too.

I debugged a case long ago where surface elevation was defined in 0.1 meter resolution but the global lunar resolution is 0.5 meters, so, some precision is lost. It might be practical to let go the INT16 and move to float based elevation in general, in which case the planet specific scale factor would become obsolete. uint8 and int16 would remain valid tile formats of course.

@jarmonik
Copy link
Contributor Author

What is this "Failed Win32" check ? A failed fail check ?

@mschweiger
Copy link
Collaborator

The 32-bit build reported an error:

D:\a\orbiter\orbiter\Src\Orbiter\surfmgr2.cpp(389,72): error C2664: 'void ElevationManager::ElevationGrid(int,int,int,int,int,int,INT16 *,float *,double *) const': cannot convert argument 8 from 'INT16 *' to 'float *' [D:\a\orbiter\orbiter\out\build\Src\Orbiter\Orbiter.vcxproj]
D:\a\orbiter\orbiter\Src\Orbiter\surfmgr2.cpp(389,68): message : Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast [D:\a\orbiter\orbiter\out\build\Src\Orbiter\Orbiter.vcxproj]
D:\a\orbiter\orbiter\Src\Orbiter\elevmgr.h(48,7): message : see declaration of 'ElevationManager::ElevationGrid' [D:\a\orbiter\orbiter\out\build\Src\Orbiter\Orbiter.vcxproj]

@jarmonik
Copy link
Contributor Author

It sounds like I have to start updating the DX7 engine. Is the DX7 OVP Client also included ?

@jarmonik
Copy link
Contributor Author

What is the current plan with the DX7 ? When are we going to leave it behind ? And what do we need to do before that can happen ?

@jarmonik
Copy link
Contributor Author

I'll just make two versions of the ElevationGrid function. That should do it.

@jarmonik jarmonik closed this Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants