[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java,1.85,1.86
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-05-04 12:30:32
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11229/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Improved hit-detection (uses (near + far)/2 instead of just near). Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** View.java 3 May 2006 14:12:25 -0000 1.85 --- View.java 4 May 2006 12:30:08 -0000 1.86 *************** *** 1681,1688 **** --- 1681,1693 ---- double far = (double) z2 / (double) zMax; + near = (near + far) / 2; + bufferOffset += 2; int id = selectBuffer.get(bufferOffset); + bufferOffset += names; Object current = getName(id); + + if (!unWantedEntities.contains(current)) { if (current instanceof Surface) { *************** *** 1725,1731 **** } - - - if (surface != null) { // Test vertex and edge against surface --- 1730,1733 ---- |