[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Plane.java,1.14,1.15
Status: Pre-Alpha
Brought to you by:
henryml
From: Nordholt <nor...@us...> - 2006-02-23 21:31:42
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21803 Modified Files: Plane.java Log Message: added method for getting a normal for the plane Index: Plane.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Plane.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Plane.java 3 Feb 2006 13:01:49 -0000 1.14 --- Plane.java 23 Feb 2006 21:31:37 -0000 1.15 *************** *** 69,72 **** --- 69,82 ---- /** + * Gets a unit normal to the plane. + * @return a normal to the plane + */ + public Vertex normal() { + Vertex normal = new Vertex(a, b, c); + normal.scale(1 / normal.length()); + return normal; + } + + /** * Distance from vertex to this plane * @param vertex The vertex |