mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-13 08:09:39 +00:00
- Added license and history
- On invert face also swap the texture coordinates if the mesh has them
This commit is contained in:
parent
0b78c1b90c
commit
d5964d15b8
@ -1,3 +1,36 @@
|
||||
/****************************************************************************
|
||||
* VCGLib o o *
|
||||
* Visual and Computer Graphics Library o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2004 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
// History
|
||||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.3 2006/05/06 17:05:18 mariolatronico
|
||||
* - Added license and history
|
||||
* - On invert face also swap the texture coordinates if the
|
||||
* mesh has them
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __VCGLIB_INVERT_FACES
|
||||
#define __VCGLIB_INVERT_FACES
|
||||
|
||||
@ -21,6 +54,13 @@ namespace vcg{
|
||||
{
|
||||
|
||||
swap((*fi).V1(0), (*fi).V2(0));
|
||||
// swap also texture coordinates
|
||||
if (MESH_TYPE::HasPerWedgeTexture()) {
|
||||
swap((*fi).WT(0),(*fi).WT(1));
|
||||
swap((*fi).WT(1),(*fi).WT(2));
|
||||
swap((*fi).WT(2),(*fi).WT(0));
|
||||
|
||||
}
|
||||
}
|
||||
vcg::tri::UpdateNormals<MESH_TYPE>::PerVertexNormalizedPerFace(m);
|
||||
vcg::tri::UpdateTopology<MESH_TYPE>::FaceFace(m);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user