header added

This commit is contained in:
ganovelli 2004-05-14 00:34:36 +00:00
parent d3d955427d
commit 3e5ab3d348
1 changed files with 27 additions and 37 deletions

View File

@ -1,42 +1,31 @@
/*#*************************************************************************** /****************************************************************************
* MinDistPoint.h o o * * VCGLib o o *
* o o * * Visual and Computer Graphics Library o o *
* Visual Computing Group _ O _ * * _ O _ *
* IEI Institute, CNUCE Institute, CNR Pisa \/)\/ * * Copyright(C) 2004 \/)\/ *
* /\/| * * Visual Computing Lab /\/| *
* Copyright(C) 1999 by Paolo Cignoni, Paolo Pingi, Claudio Rocchini | * * ISTI - Italian National Research Council | *
* All rights reserved. \ * * \ *
* * * All rights reserved. *
* Permission to use, copy, modify, distribute and sell this software and * * *
* its documentation for any purpose is hereby granted without fee, provided * * This program is free software; you can redistribute it and/or modify *
* that the above copyright notice appear in all copies and that both that * * it under the terms of the GNU General Public License as published by *
* copyright notice and this permission notice appear in supporting * * the Free Software Foundation; either version 2 of the License, or *
* documentation. the author makes no representations about the suitability * * (at your option) any later version. *
* of this software for any purpose. It is provided "as is" without express * * *
* or implied warranty. * * This program is distributed in the hope that it will be useful, *
* * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* NOTE THAT THIS FILE SHOULD NOT DIRECTL BE INCLUDED * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* It is automatically included by Mesh.h * * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
* * * for more details. *
***************************************************************************#*/ * *
/*#************************************************************************** ****************************************************************************/
/****************************************************************************
History History
2000 Nov 06 First Working release (pc) $Log: not supported by cvs2svn $
08 Aggiunto if(gr.bbox.IsIn(p)) per evitare piantamenti se si chiede
un punto fuori.
Tolto un Normalize inutile
2001 May 17 Aggiunta versione della Mindistpoint che da anche le coord
baricentriche del punto trovato (pc); aggiunto wrapper per la vecchia
versione.
Dec 10 Corretto prodotto scalare vettore nell'ordine giusto in un paio di posti
2002 Mar 29 Templatata anche in funzione del tipo scalare. (pc)
Oct 24 Corretti warning (unsigned mismatch) del vc7,
2003 Apr 15 Corretti mismatch iterator / pointer
Jun 08 Aggiornato UGridLink -> UGrid::Link
2004 Gen 09 Aggiunte le inclusioni a Point3[4].h
2004 Gen 19 Corretto qualche ->Normal() in ->cN()
****************************************************************************/ ****************************************************************************/
#ifndef __VCG_MINDISTPOINT #ifndef __VCG_MINDISTPOINT
#define __VCG_MINDISTPOINT #define __VCG_MINDISTPOINT
#include <math.h> #include <math.h>
@ -140,7 +129,8 @@ void MinDistPoint( MESH & mesh, const Point3<SCALAR> & p, GRID & gr, SCALAR & md
/*normf = (1-(alfa+beta))*(bestf->V(0)->Normal())+ /*normf = (1-(alfa+beta))*(bestf->V(0)->Normal())+
(alfa*(bestf->V(1)->Normal()))+ (alfa*(bestf->V(1)->Normal()))+
(beta*(bestf->V(2)->Normal()));*/ (beta*(bestf->V(2)->Normal()));*/
bestf->InterpolationParameters(q, alfa, beta, gamma); bool ret=bestf->InterpolationParameters(q, alfa, beta, gamma);
//assert(ret);
normf = (bestf->V(0)->cN())*alfa+ normf = (bestf->V(0)->cN())*alfa+
(bestf->V(1)->cN())*beta+ (bestf->V(1)->cN())*beta+
(bestf->V(2)->cN())*gamma; (bestf->V(2)->cN())*gamma;