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

[WARNING] Not clear if MarchingSquares::edgeMask and MarchingSquares::edges are set correctly #66

Closed
aaptho opened this issue May 23, 2018 · 4 comments

Comments

@aaptho
Copy link

aaptho commented May 23, 2018

When building PoissonRecon, my compiler informs me of this message, and I didn't see an issue tracking it. Are there more details on the issue behind this warning?

@aaptho
Copy link
Author

aaptho commented May 23, 2018

As pointed out in #26, there seems to be a logic error in IsEdgeCorner. cIndex && 2, 1, or 4 would always return true, and it seems the intention was to use & instead of &&. Is it possible this change would fix the issue it's talking about here?

bool Cube::IsEdgeCorner( int cIndex , int e )
{
	int o , i , j;
	FactorEdgeIndex( e , o , i , j );
	switch( o )
	{
	case 0: return (cIndex && 2)==(i<<1) && (cIndex && 4)==(j<<2);
	case 1: return (cIndex && 1)==(i<<0) && (cIndex && 4)==(j<<2);
	case 2: return (cIndex && 4)==(i<<2) && (cIndex && 2)==(j<<1);
	default: return false;
	}
}

@mkazhdan
Copy link
Owner

mkazhdan commented May 23, 2018 via email

@mkazhdan
Copy link
Owner

mkazhdan commented May 23, 2018 via email

@aaptho
Copy link
Author

aaptho commented May 23, 2018

Ah, right you are, it's no longer there. Thanks! Closing.

@aaptho aaptho closed this as completed May 23, 2018
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