change points order in plane3_for_points( const BasicVector3<Element>& p0, const BasicVector3<Element>& p1, const BasicVector3<Element>& p2 )

to be consistent over the related code
to omit points swap there and there
This commit is contained in:
Garux
2019-05-01 12:38:58 +03:00
parent 71c63fbdc6
commit 3ce07bb310
6 changed files with 27 additions and 17 deletions

View File

@@ -467,7 +467,7 @@ void Brush::vertexModeBuildHull( bool allTransformed /*= false*/ ){
static_cast<double>( i.m_vertexTransformed.y() ),
static_cast<double>( i.m_vertexTransformed.z() ) ) );
}
auto hull = quickhull.getConvexHull( pointCloud, false, true );
auto hull = quickhull.getConvexHull( pointCloud, true, true );
const auto& indexBuffer = hull.getIndexBuffer();
const size_t triangleCount = indexBuffer.size() / 3;
VertexModePlanes vertexModePlanes;
@@ -490,7 +490,7 @@ void Brush::vertexModeBuildHull( bool allTransformed /*= false*/ ){
if( vector3_dot( plane.normal(), face->getPlane().plane3().normal() ) < 0 ){ //likely reversed plane
transformed = true;
}
vertexModePlanes.push_back( VertexModePlane( plane, face, v[0], v[2], v[1], transformed ) );
vertexModePlanes.push_back( VertexModePlane( plane, face, v[0], v[1], v[2], transformed ) );
}
else{
it->m_transformed |= transformed;