From: Chad G. <ex...@us...> - 2005-07-14 02:39:39
|
Update of /cvsroot/openrpg-gde/Source/Source3D/Simple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21910/Source3D/Simple Modified Files: Vertex.cpp Log Message: Fixed bugs in vertex Index: Vertex.cpp =================================================================== RCS file: /cvsroot/openrpg-gde/Source/Source3D/Simple/Vertex.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Vertex.cpp 14 Jul 2005 02:31:51 -0000 1.1 --- Vertex.cpp 14 Jul 2005 02:39:29 -0000 1.2 *************** *** 52,58 **** void Vertex::setCoordinate(int Axis, int Value) { ! for (std::list<Vertex *>::iterator I = axisLinks[Axis]->begin(); I != axisLinks[Axis]->end(); I++) //for each of the vertices connected with this axis { ! (*I)->coordinates[Axis] = Value; //inform of the value change } } --- 52,61 ---- void Vertex::setCoordinate(int Axis, int Value) { ! if (coordinates[Axis] != Value) { ! for (std::list<Vertex *>::iterator I = axisLinks[Axis]->begin(); I != axisLinks[Axis]->end(); I++) //for each of the vertices connected with this axis ! { ! (*I)->coordinates[Axis] = Value; //inform of the value change ! } } } *************** *** 62,68 **** /*Move the vertex by the given ammount on each axis, use setCoordinates() so that we inform the axislink vertices*/ ! setCoordinate(0, coordinates[0] += X); ! setCoordinate(1, coordinates[1] += Y); ! setCoordinate(2, coordinates[2] += Z); } --- 65,71 ---- /*Move the vertex by the given ammount on each axis, use setCoordinates() so that we inform the axislink vertices*/ ! setCoordinate(0, coordinates[0] + X); ! setCoordinate(1, coordinates[1] + Y); ! setCoordinate(2, coordinates[2] + Z); } |