[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model CoordinateSystem.java,1.5,1.6
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2005-10-30 15:50:46
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19185/src/net/sourceforge/bprocessor/model Modified Files: CoordinateSystem.java Log Message: Implemented CoordinateSystem.unTranslate, which translates from the coordinatesystem to global coordinates Index: CoordinateSystem.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/CoordinateSystem.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CoordinateSystem.java 24 Oct 2005 10:25:47 -0000 1.5 --- CoordinateSystem.java 30 Oct 2005 15:50:38 -0000 1.6 *************** *** 151,154 **** --- 151,170 ---- /** + * Return the vertex translated from the CoordinateSystem to + * the global coordinate system + * @param vertex The vertex to un-translate + * @return The un-translated vertex + */ + public Vertex unTranslate(Vertex vertex) { + Vertex ii = i.copy(); + ii.scale(vertex.getX()); + Vertex jj = j.copy(); + jj.scale(vertex.getY()); + Vertex nn = n.copy(); + nn.scale(vertex.getZ()); + return origin.add(ii).add(jj).add(nn); + } + + /** * Translate all vertices in the list * @param vertices The list of vertices |