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

version 4.0 little fixes #104

Open
vilkun opened this issue Apr 14, 2022 · 10 comments
Open

version 4.0 little fixes #104

vilkun opened this issue Apr 14, 2022 · 10 comments

Comments

@vilkun
Copy link

vilkun commented Apr 14, 2022

In Version 4.0 VHACD I replaced X, Y, Z with X_INDEX, Y_INDEX, Z_INDEX because it was compile issues with my UE project, where I use their vector's X, Y, Z members.
1.txt

@vilkun
Copy link
Author

vilkun commented Apr 14, 2022

also there several define X, Y, Z in a file

@vilkun
Copy link
Author

vilkun commented Apr 14, 2022

image

@vilkun
Copy link
Author

vilkun commented Apr 14, 2022

The whole patch can be
2.txt

@jratcliff63367
Copy link
Collaborator

Yikes, that's some ugly ass code. Not sure how that got in there. It's not mine. I will see if I can find a cleaner way to fix this.

@jratcliff63367
Copy link
Collaborator

Ok, thanks for catching this. That was as a result of two things. First, moving all of the implementation code into the header file; which caused the conflicts you saw. The second was just a lot of copy/paste that happened when merging a ton of utility code into the single monolithic header.

I have changed the #define X/Y/Z to be #define X_INDEX/Y_INDEX/Z_INDEX and removed the duplicate defines.

All methods that were previously called 'X', 'Y', 'Z', are now called 'getX', 'getY', 'getZ'.

Not only does this fix the build errors that you saw, it just makes the code cleaner and easier to understand.

Thanks for catching this. The fixes have been pushed to master.

@vilkun
Copy link
Author

vilkun commented May 24, 2022

vhacd.txt
I returned to updating of vhacd, environment is: ubuntu, ue project, clang compiler.
There are many tiny issues too, could you check patch? Inside:

  • skip lines with add_library , but you can add them as other cmake argument
  • previous errors with X_INDEX, Y_INDEX, Z_INDEX
  • compilation errors with 'variable hides other' added 'x_id', 'y_id', 'taskCost' just suffixes.
  • variable order in constructor was valuable (compilation error), thus I reordered member mConcavity
  • redundant AlignToPrincipalAxes
  • JoinTask works wrong with asyncing turned on (UE project). It reraised task again. thats why I just commented out it. Also saw there was big update for these classes, so it can be leaved as my internal project issue.

@vilkun vilkun mentioned this issue May 24, 2022
@jratcliff63367
Copy link
Collaborator

How do I apply this patch? Sorry, I'm not familiar enough with the git process to do this. Can you make this in the form of a pull request?

@jratcliff63367
Copy link
Collaborator

I tried to do a 'git apply' with the patch file you provided but it fails

@vilkun
Copy link
Author

vilkun commented May 25, 2022

Made a pr #109
I applied it on top of 'version4' branch:
git clone -b version4 https://github.com/kmammou/v-hacd.git
cd v-hacd (think you forgot this?)
git apply /home/vilkun/work/vhacd_build/1/vhacd.txt
Also you can try:
git apply --reject --whitespace=fix mychanges.patch
(see https://stackoverflow.com/questions/4770177/git-patch-does-not-apply )

It's a first time, when I write to really third party developers :)

@jratcliff63367
Copy link
Collaborator

Yeah, you should not be using the 'version4' branch. That was just a staging branch as I was developing the new version. That branch is not current or up to date. The only branch you should be working on now is simply the 'master' branch. Sorry for any confusion here.

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

No branches or pull requests

2 participants