Skip to content

Handle multi geometric feature computation - #140

Merged
dgirardeau merged 7 commits into
CloudCompare:masterfrom
farmakis:geom_f
Oct 24, 2026
Merged

dgirardeau merged 7 commits into
CloudCompare:masterfrom
farmakis:geom_f

Conversation

@farmakis

Copy link
Copy Markdown
Contributor

Handling the computation of multiple geometric features at one octree traversal.
Associated with the PR #2489 in CloudCompare

Comment thread src/Neighbourhood.cpp Resolved
Comment thread include/Neighbourhood.h Outdated
virtual void reset();

//! PCA results (populated by computePCA, cleared by reset)
PCAResults pca;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should be named m_pca, and it should be declared protected at the end of the class definition with the other members

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But you can probably add a getter if necessary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think will have to create local copies of eigen values and eigen vectors anyway, in order to sort them with SortEigenValuesAndVectors for the feature computation.
Unless we cache by default sorted values to avoid any copies. computeCurvature and computeMomentOrder1 don't seem to be affected by this, however I think that it's cleaner to cache the original unsorted.

Comment thread include/Neighbourhood.h Resolved
Comment thread src/Neighbourhood.cpp Resolved
Comment thread src/Neighbourhood.cpp Resolved
Comment thread src/Neighbourhood.cpp Outdated
{
m_structuresValidity = FLAG_DEPRECATED;
pca = PCAResults();
m_pca = PCAResults();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

m_pca = {}

@dgirardeau

Copy link
Copy Markdown
Member

I just realized the way you manage the PCA member is not consistent with the others (i.e. with a flag, and getters that return a pointer if the auto-computation is successful). I'm going to push a commit to make things consistent.

@dgirardeau
dgirardeau merged commit 35bfaac into CloudCompare:master Oct 24, 2026
4 checks passed
@farmakis

Copy link
Copy Markdown
Contributor Author

I just realized the way you manage the PCA member is not consistent with the others (i.e. with a flag, and getters that return a pointer if the auto-computation is successful). I'm going to push a commit to make things consistent.

I see, yes. Thanks.

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.

2 participants