/**************************************************************************** ** $Id: cmds/cmdgrippointtexture.h ** AutoQ3D a qt 3d model editor program ** ** Copyright (C) 2005-2007 -Gonzalo Reynaga Garcia. ** ** This program is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public Licence ** as published by the Free Software Foundation; either version 2 ** of the License, or (at your option) any later option. ** ** 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 PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA ** *****************************************************************************/ #ifndef CMDGRIPPOINTTEXTURE_H #define CMDGRIPPOINTTEXTURE_H #include "cmds.h" #include "../dialogs/picktex.h" void cmds::cmdgrippointtexture(){ int i,idx=-1; float uvcoords[2]; d3line *DLV; d3triangle *DTV; DLV=DataLV->data(); DTV=DataTV->data(); if((SecCmd==tr("**Cancel**")||SecCmd=="")&&!PopViewMode){ SendText(SecCmd); CmdCancel(); return; } switch(step){ case 0: SendText(tr("--Point-Texture--"));instruction=tr("Point Texture:");emit instru(instruction); for(i=0;iexec()){ tempdataF[0]=uvcoords[0]; tempdataF[1]=uvcoords[1]; } GriPoint[0].find=0; for(i=0;iv[0])&&(DTV[DataSV[i].index].v1[1]==GriPoint->v[1])&&(DTV[DataSV[i].index].v1[2]==GriPoint->v[2])){ DTV[DataSV[i].index].t1[0]=tempdataF[0];DTV[DataSV[i].index].t1[1]=tempdataF[1]; } if((DTV[DataSV[i].index].v2[0]==GriPoint->v[0])&&(DTV[DataSV[i].index].v2[1]==GriPoint->v[1])&&(DTV[DataSV[i].index].v2[2]==GriPoint->v[2])){ DTV[DataSV[i].index].t2[0]=tempdataF[0];DTV[DataSV[i].index].t2[1]=tempdataF[1]; } if((DTV[DataSV[i].index].v3[0]==GriPoint->v[0])&&(DTV[DataSV[i].index].v3[1]==GriPoint->v[1])&&(DTV[DataSV[i].index].v3[2]==GriPoint->v[2])){ DTV[DataSV[i].index].t3[0]=tempdataF[0];DTV[DataSV[i].index].t3[1]=tempdataF[1]; } } } /*DataSV.resize(0);*/ CmdCancel(); return; break; } SendText(SecCmd); SendText(tr("**Secondary Command not found**")); } #endif