Skip to content

Add callback functionality for vertex insertation, triangle add/change #179

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

Closed
wants to merge 2 commits into from

Conversation

Madrich
Copy link

@Madrich Madrich commented May 12, 2024

In case C++ 11 is not available, its disabled

In cas C++ 11 is not available, its disabled
@Madrich
Copy link
Author

Madrich commented May 20, 2024

Hi Artem,
Can you please review my merge request? Like to finish it.

@artem-ogre
Copy link
Owner

Hi Artem, Can you please review my merge request? Like to finish it.

Unfortunately, I have no spare time now. Life keeps me busy elsewhere. I will take a look as soon as I can, but cannot promise quick response.

@artem-ogre artem-ogre linked an issue Jun 20, 2024 that may be closed by this pull request
@@ -31,6 +31,10 @@ option(CDT_USE_STRONG_TYPING
"If enabled uses strong typing for types: useful for development and debugging"
OFF)

option(CDT_CALLBACK_DISABLED
"If enabled a callbeack function can be registered if a triabngle is created or changed (>=C++11 necessary)"
Copy link

@chemodansama chemodansama Oct 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo in triabngle

// C++11 required for std::fucntion callbacks
#ifndef CDT_CALLBACK_DISABLED
std::function<void(TriInd, CallbackType)> callback_tri; // callback function for triangle creation
std::function<void(VertInd, CallbackType)> callback_vertex; // callback function for vertex insertation
Copy link

@chemodansama chemodansama Oct 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems Triangulation class members follow m_memberName naming style.
Naming style of callback_tri and callback_vertex makes members names inconsistent.

@@ -1093,6 +1099,12 @@ void Triangulation<T, TNearPointLocator>::insertVertex(const VertInd iVert)
const VertInd walkStart = m_nearPtLocator.nearPoint(v, vertices);
insertVertex(iVert, walkStart);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will also call insert-vertex callback, so the callback will be called twice. Is it intentional?

@artem-ogre
Copy link
Owner

Hi @Madrich
sorry for taking forever, but I finally got to taking a stab at callbacks in CDT.
If you have time could you please review #199?

@artem-ogre artem-ogre closed this May 9, 2025
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.

Callbacks
3 participants