- This topic has 2 replies, 2 voices, and was last updated 3 years, 3 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Programming with SOFA › [SOLVED] Question about calling header of SofaMeshCollision from SofaBaseCollision
Tagged: Linux_ubuntu, SOFA_2006
Hi there,
I am currently trying to modify the broadphase detection. In BruteBroadPhase.h file, I included TriangleModel.h from SofaMeshCollision. However, when I compiled it, the system said there was no such file or path. But surely, the header file is over there in SofaMeshCollision
I am using the version 20 on Linux system with ninja compiler. Just wonder if it is possible for anyone giving me a hint to solve this simple problem?
Best,
Sam
Hi,
you cannot include a file from SofaMeshCollision when you are in SofaBaseCollision, because SofaMeshCollision depends on SofaBaseCollision, but not the inverse.
You can try making SofaBaseCollision depends on SofaMeshCollision, but it would create a cyclic dependency, which is possible only for static libraries.
The best solution would be to create your own component, instead of modifying an existing one. Your component would inherit from BruteForceBroadPhase. You can put your component in a plugin, and this plugin can depend on both SofaBaseCollision and SofaMeshCollision.
The lazy solution would be to put your component directly in SofaMeshCollision.
Hi Alex,
Thank you so much for your response.
It seems the structure has been changed in version 20 compared to version 19. The calling used to work in the old version. That’s why it confused me.
I might test my algorithm by creating a component in SofaMeshCollision. Then create a new plugin if it works.
Best,
Sam
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.