You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(116) |
May
(220) |
Jun
(52) |
Jul
(30) |
Aug
(35) |
Sep
(24) |
Oct
(49) |
Nov
(44) |
Dec
(70) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(21) |
Feb
(30) |
Mar
(9) |
Apr
(44) |
May
(2) |
Jun
|
Jul
(10) |
Aug
(20) |
Sep
(25) |
Oct
(12) |
Nov
(16) |
Dec
(4) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
(26) |
Dec
(10) |
2006 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(33) |
2007 |
Jan
(4) |
Feb
(57) |
Mar
(17) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Gerardo H. <ma...@us...> - 2007-02-26 19:36:35
|
Update of /cvsroot/jrman/drafts/src/org/jrman/parser In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30698/src/org/jrman/parser Modified Files: Frame.java Global.java ObjectInstanceList.java Parser.java Tokenizer.java World.java Log Message: Check for Catmull Clark scheme before trying to instance a Subdivision Mesh. Started reformatting source code to fit in 80 columns, remove tabs and ugly formatting done by Eclipse. Index: Frame.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/Frame.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Frame.java 2 Feb 2004 19:30:06 -0000 1.16 --- Frame.java 26 Feb 2007 19:35:47 -0000 1.17 *************** *** 1,19 **** /* ! Frame.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Frame.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 130,134 **** exposure = new Exposure(1f, 1f); colorQuantizer = new Quantizer(255, 0, 255, 0.5f); ! depthQuantizer = new Quantizer(Integer.MAX_VALUE, 0, Integer.MAX_VALUE, 0.5f); display = new Display("out.tif", Display.Type.FILE, Display.Mode.RGBA); hider = Hider.HIDDEN; --- 130,135 ---- exposure = new Exposure(1f, 1f); colorQuantizer = new Quantizer(255, 0, 255, 0.5f); ! depthQuantizer = new Quantizer(Integer.MAX_VALUE, 0, ! Integer.MAX_VALUE, 0.5f); display = new Display("out.tif", Display.Type.FILE, Display.Mode.RGBA); hider = Hider.HIDDEN; *************** *** 183,187 **** public void defineScreen() { if (frameAspectRatio == 0) ! frameAspectRatio = (horizontalResolution * pixelAspectRatio) / verticalResolution; if (screenWindow == null) { if (frameAspectRatio >= 1f) --- 184,189 ---- public void defineScreen() { if (frameAspectRatio == 0) ! frameAspectRatio = ! (horizontalResolution * pixelAspectRatio) / verticalResolution; if (screenWindow == null) { if (frameAspectRatio >= 1f) *************** *** 190,194 **** else screenWindow = ! new Bounds2f(-1f, 1f, -1f / frameAspectRatio, 1f / frameAspectRatio); } else { Point2f min = screenWindow.getMin(); --- 192,197 ---- else screenWindow = ! new Bounds2f(-1f, 1f, ! -1f / frameAspectRatio, 1f / frameAspectRatio); } else { Point2f min = screenWindow.getMin(); *************** *** 496,500 **** public Transform getNDCTransform() { ! return AffineTransform.createNDC(horizontalResolution, verticalResolution); } --- 499,504 ---- public Transform getNDCTransform() { ! return AffineTransform.createNDC(horizontalResolution, ! verticalResolution); } Index: Tokenizer.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/Tokenizer.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Tokenizer.java 20 Feb 2007 03:33:36 -0000 1.5 --- Tokenizer.java 26 Feb 2007 19:35:48 -0000 1.6 *************** *** 120,124 **** String[] tmp = new String[strings.length + 1]; System.arraycopy(strings, 0, tmp, 0, index); ! System.arraycopy(strings, index, tmp, index + 1, strings.length - index); strings = tmp; String s = new String(buffer, 0, pos); --- 120,125 ---- String[] tmp = new String[strings.length + 1]; System.arraycopy(strings, 0, tmp, 0, index); ! System.arraycopy(strings, index, tmp, index + 1, ! strings.length - index); strings = tmp; String s = new String(buffer, 0, pos); Index: Parser.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/Parser.java,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** Parser.java 26 Feb 2007 15:25:14 -0000 1.110 --- Parser.java 26 Feb 2007 19:35:47 -0000 1.111 *************** *** 101,105 **** public class Parser { ! private final static String KEYWORD_PREFIX = "org.jrman.parser.keywords.Keyword"; private final static Map fullFileNames = new HashMap(); --- 101,106 ---- public class Parser { ! private final static String KEYWORD_PREFIX = ! "org.jrman.parser.keywords.Keyword"; [...1467 lines suppressed...] ! public void makeTexture(String picturename, ! String texturename, ! String swrap, ! String twrap, ! String filter, ! int swidth, ! int twidth) { try { ! MipMap.makeMipMap(picturename, ! texturename, ! MipMap.Mode.getNamed(swrap), ! MipMap.Mode.getNamed(twrap), ! filter, ! swidth, ! twidth); } catch (IOException e) { ! throw new IllegalArgumentException("Can't create texture: " + ! picturename); } } Index: ObjectInstanceList.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/ObjectInstanceList.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ObjectInstanceList.java 11 May 2003 02:53:43 -0000 1.1 --- ObjectInstanceList.java 26 Feb 2007 19:35:47 -0000 1.2 *************** *** 1,19 **** /* ! ObjectInstance.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! ObjectInstance.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 40,44 **** public abstract Primitive create(Attributes attributes); ! protected Attributes createAttributes(Transform transform, Attributes attributes) { MutableAttributes ma = new MutableAttributes(attributes); ma.setTransform(ma.getTransform().concat(transform)); --- 40,45 ---- public abstract Primitive create(Attributes attributes); ! protected Attributes createAttributes(Transform transform, ! Attributes attributes) { MutableAttributes ma = new MutableAttributes(attributes); ma.setTransform(ma.getTransform().concat(transform)); *************** *** 55,59 **** Primitive[] result = new Primitive[primitiveCreators.size()]; for (int i = 0; i < primitiveCreators.size(); i++) ! result[i] = ((PrimitiveCreator) primitiveCreators.get(i)).create(attributes); return result; } --- 56,61 ---- Primitive[] result = new Primitive[primitiveCreators.size()]; for (int i = 0; i < primitiveCreators.size(); i++) ! result[i] = ! ((PrimitiveCreator)primitiveCreators.get(i)).create(attributes); return result; } Index: World.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/World.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** World.java 15 Apr 2003 05:22:10 -0000 1.3 --- World.java 26 Feb 2007 19:35:48 -0000 1.4 *************** *** 1,6 **** /* ! World.java ! Copyright (C) 2003 Gerardo Horvilleur ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License --- 1,6 ---- /* ! World.java ! Copyright (C) 2003 Gerardo Horvilleur ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License *************** *** 42,48 **** public LightShader getLight(int sequenceNumber) { ! LightShader light = (LightShader) lights.get(new Integer(sequenceNumber)); if (light == null) ! throw new IllegalArgumentException("no such light: " + sequenceNumber); return light; } --- 42,50 ---- public LightShader getLight(int sequenceNumber) { ! LightShader light = (LightShader) ! lights.get(new Integer(sequenceNumber)); if (light == null) ! throw new IllegalArgumentException("no such light: " + ! sequenceNumber); return light; } Index: Global.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/Global.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Global.java 25 Dec 2006 07:50:37 -0000 1.13 --- Global.java 26 Feb 2007 19:35:47 -0000 1.14 *************** *** 1,19 **** /* ! Global.java ! Copyright (C) 2003, 2006 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Global.java ! Copyright (C) 2003, 2006 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 108,112 **** Transform result = (Transform) transforms.get(name); if (result == null) ! throw new IllegalArgumentException("no such coordinate system: " + name); return result; } --- 108,113 ---- Transform result = (Transform) transforms.get(name); if (result == null) ! throw new IllegalArgumentException("no such coordinate system: " + ! name); return result; } |
From: Gerardo H. <ma...@us...> - 2007-02-26 19:36:30
|
Update of /cvsroot/jrman/drafts/src/org/jrman/options In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30698/src/org/jrman/options Modified Files: CameraProjection.java Display.java Exposure.java Filter.java Hider.java Quantizer.java Log Message: Check for Catmull Clark scheme before trying to instance a Subdivision Mesh. Started reformatting source code to fit in 80 columns, remove tabs and ugly formatting done by Eclipse. Index: Hider.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/options/Hider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Hider.java 27 Nov 2005 04:08:38 -0000 1.2 --- Hider.java 26 Feb 2007 19:35:47 -0000 1.3 *************** *** 1,19 **** /* ! Hider.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Hider.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: Display.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/options/Display.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Display.java 11 Apr 2003 22:23:10 -0000 1.2 --- Display.java 26 Feb 2007 19:35:47 -0000 1.3 *************** *** 1,19 **** /* ! Display.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Display.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 57,61 **** Type result = (Type) map.get(name); if (name == null) ! throw new IllegalArgumentException("no such display type: " + name); return result; } --- 57,62 ---- Type result = (Type) map.get(name); if (name == null) ! throw new IllegalArgumentException("no such display type: " ! + name); return result; } *************** *** 90,94 **** Mode result = (Mode) map.get(name); if (result == null) ! throw new IllegalArgumentException("no such display mode: " + name); return result; } --- 91,96 ---- Mode result = (Mode) map.get(name); if (result == null) ! throw new IllegalArgumentException("no such display mode: " ! + name); return result; } Index: Exposure.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/options/Exposure.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Exposure.java 8 Apr 2004 17:34:38 -0000 1.3 --- Exposure.java 26 Feb 2007 19:35:47 -0000 1.4 *************** *** 1,19 **** /* ! Exposure.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Exposure.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: Filter.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/options/Filter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Filter.java 26 Jun 2003 04:10:44 -0000 1.2 --- Filter.java 26 Feb 2007 19:35:47 -0000 1.3 *************** *** 1,19 **** /* ! Filter.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Filter.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 69,73 **** Type result = (Type) map.get(name); if (result == null) ! throw new IllegalArgumentException("no such filter type: " + name); return result; } --- 69,74 ---- Type result = (Type) map.get(name); if (result == null) ! throw new IllegalArgumentException("no such filter type: " + ! name); return result; } Index: CameraProjection.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/options/CameraProjection.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CameraProjection.java 11 Apr 2003 04:22:32 -0000 1.2 --- CameraProjection.java 26 Feb 2007 19:35:47 -0000 1.3 *************** *** 1,19 **** /* ! CameraProjection.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! CameraProjection.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 25,33 **** public class CameraProjection { ! public final static CameraProjection ORTHOGRAPHIC = new CameraProjection("orthographic"); ! public final static CameraProjection PERSPECTIVE = new CameraProjection("perspective"); ! public final static CameraProjection UNKNOWN = new CameraProjection("unknown"); private static Map map = new HashMap(); --- 25,36 ---- public class CameraProjection { ! public final static CameraProjection ORTHOGRAPHIC = ! new CameraProjection("orthographic"); ! public final static CameraProjection PERSPECTIVE = ! new CameraProjection("perspective"); ! public final static CameraProjection UNKNOWN = ! new CameraProjection("unknown"); private static Map map = new HashMap(); Index: Quantizer.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/options/Quantizer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Quantizer.java 3 May 2003 18:02:48 -0000 1.2 --- Quantizer.java 26 Feb 2007 19:35:47 -0000 1.3 *************** *** 1,19 **** /* ! Quantizer.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Quantizer.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ |
From: Gerardo H. <ma...@us...> - 2007-02-26 19:36:26
|
Update of /cvsroot/jrman/drafts/src/org/jrman/main In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30698/src/org/jrman/main Modified Files: JRMan.java MkTxr.java Log Message: Check for Catmull Clark scheme before trying to instance a Subdivision Mesh. Started reformatting source code to fit in 80 columns, remove tabs and ugly formatting done by Eclipse. Index: MkTxr.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/main/MkTxr.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MkTxr.java 3 Jul 2003 17:57:52 -0000 1.2 --- MkTxr.java 26 Feb 2007 19:35:47 -0000 1.3 *************** *** 1,19 **** /* ! MkTxr.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! MkTxr.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 26,41 **** public static void main(String[] args) { if (args.length != 7) { ! System.err.println("usage: mktxr imageFile textureFile sWrap tWrap filter sWidth tWidth"); System.exit(1); } try { ! MipMap.makeMipMap( ! args[0], ! args[1], ! MipMap.Mode.getNamed(args[2]), ! MipMap.Mode.getNamed(args[3]), ! args[4], ! Float.parseFloat(args[5]), ! Float.parseFloat(args[6])); } catch (Exception e) { System.err.println("Cannot create texture file"); --- 26,41 ---- public static void main(String[] args) { if (args.length != 7) { ! System.err.println("usage: mktxr imageFile textureFile" + ! " sWrap tWrap filter sWidth tWidth"); System.exit(1); } try { ! MipMap.makeMipMap(args[0], ! args[1], ! MipMap.Mode.getNamed(args[2]), ! MipMap.Mode.getNamed(args[3]), ! args[4], ! Float.parseFloat(args[5]), ! Float.parseFloat(args[6])); } catch (Exception e) { System.err.println("Cannot create texture file"); Index: JRMan.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/main/JRMan.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** JRMan.java 6 Dec 2006 14:39:09 -0000 1.11 --- JRMan.java 26 Feb 2007 19:35:47 -0000 1.12 *************** *** 38,43 **** public static int minorNumber= 4; private static final String MESSAGE_APPNAME= "jrMan"; ! private static final String MESSAGE_APPDESCRIPTION= "Java REYES based renderer."; ! private static final String MESSAGE_LICENSE= "This program is free software; you can redistribute it and/or modify\n" + "it under the terms of the GNU General Public License."; public static final char OPTION_STATISTICS= 's'; public static final char OPTION_LASTFRAME= 'e'; --- 38,46 ---- public static int minorNumber= 4; private static final String MESSAGE_APPNAME= "jrMan"; ! private static final String MESSAGE_APPDESCRIPTION= ! "Java REYES based renderer."; ! private static final String MESSAGE_LICENSE= ! "This program is free software; you can redistribute it and/or modify\n" ! + "it under the terms of the GNU General Public License."; public static final char OPTION_STATISTICS= 's'; public static final char OPTION_LASTFRAME= 'e'; *************** *** 50,162 **** public static final Options options= prepareOptions(); ! public static void main(String args[]) { ! try { ! Options opts= prepareOptions(); ! // parse command line ! CommandLine cmdLine= new BasicParser().parse(opts, args); ! // deal with help and version options or no args at all immediately ! if (cmdLine.getArgList().isEmpty() || cmdLine.hasOption(OPTION_HELP)) { ! printUsage(opts); ! System.exit(0); ! } ! if (cmdLine.hasOption(OPTION_VERSION)) { ! printVersion(); ! System.exit(0); ! } ! // process arguments (rib files to render) ! Iterator it= cmdLine.getArgList().iterator(); ! long totalStart= System.currentTimeMillis(); ! while (it.hasNext()) ! try { ! String filename= (String) it.next(); ! long start= System.currentTimeMillis(); ! Parser parser= new Parser(cmdLine); ! parser.begin(filename); ! File file = new File(filename); ! String directory = file.getParent(); ! parser.setCurrentDirectory(directory); ! MipMap.setCurrentDirectory(directory); ! ShadowMap.setCurrentDirectory(directory); ! parser.parse(file.getName()); ! parser.end(); ! long end= System.currentTimeMillis(); ! System.out.println(filename + " time: " + Format.time(end - start)); ! } ! catch (IOException ioe) { ! System.err.println("Error on file " + ioe.getLocalizedMessage()); ! } ! catch (Exception e) { ! System.err.println("Error " + e.getLocalizedMessage()); ! } ! long totalEnd= System.currentTimeMillis(); ! System.out.println("Total time: " + Format.time(totalEnd - totalStart)); ! } ! catch (ParseException e) { ! System.err.println(e.getLocalizedMessage()); ! System.exit(1); ! } ! } ! ! private static Options prepareOptions() { ! Options options= new Options(); ! OptionBuilder.withLongOpt("help"); ! OptionBuilder.withDescription("show this usage information and exits"); ! options.addOption(OptionBuilder.create(OPTION_HELP)); ! OptionBuilder.withLongOpt("version"); ! OptionBuilder.withDescription("show application version and exits"); ! options.addOption(OptionBuilder.create(OPTION_VERSION)); ! OptionBuilder.withLongOpt("display"); ! OptionBuilder.withDescription("always show image in a framebuffer display (implicitly add such " + "display if not already present)"); ! options.addOption(OptionBuilder.create(OPTION_FRAMEBUFFER)); ! OptionBuilder.withLongOpt("progress"); ! OptionBuilder.withDescription("show per frame rendering progress"); ! options.addOption(OptionBuilder.create(OPTION_PROGRESS)); ! OptionBuilder.withLongOpt("first"); ! OptionBuilder.withDescription("start rendering from <frame>"); ! OptionBuilder.hasArg(); ! OptionBuilder.withType(new Integer(1)); ! OptionBuilder.withArgName("frame"); ! options.addOption(OptionBuilder.create(OPTION_FIRSTFRAME)); ! OptionBuilder.withLongOpt("end"); ! OptionBuilder.withDescription("stop rendering after <frame>"); ! OptionBuilder.hasArg(); ! OptionBuilder.withArgName("frame"); ! options.addOption(OptionBuilder.create(OPTION_LASTFRAME)); ! OptionBuilder.withLongOpt("stats"); ! OptionBuilder.withDescription("print end of frame statistics"); ! // TODO implement level of detail for rendering statistics ! //OptionBuilder.hasOptionalArg(); ! //OptionBuilder.withType(new Integer(1)); ! //OptionBuilder.withArgName("level"); ! options.addOption(OptionBuilder.create(OPTION_STATISTICS)); ! OptionBuilder.withLongOpt("quality"); ! OptionBuilder.withDescription("higher rendering quality (slightly slower)"); ! options.addOption(OptionBuilder.create(OPTION_QUALITY)); ! return options; ! } ! ! private static void printHeader() { ! System.out.print(MESSAGE_APPNAME); ! System.out.print(" v"); ! System.out.print(majorNumber); ! System.out.print('.'); ! System.out.println(minorNumber); ! System.out.println(MESSAGE_APPDESCRIPTION); ! } ! ! private static void printVersion() { ! printHeader(); ! System.out.println(); ! System.out.println(MESSAGE_LICENSE); ! } ! ! private static void printUsage(Options options) { ! printHeader(); ! System.out.println(); ! HelpFormatter formatter= new HelpFormatter(); ! formatter.printHelp("jrman [options] [file1.rib] [file2.rib] ...", "Supported options are:", options, "If no rib file is given a basic graphical user interface is presented."); ! System.out.println(); ! System.out.println(MESSAGE_LICENSE); ! } ! } --- 53,175 ---- public static final Options options= prepareOptions(); ! public static void main(String args[]) { ! try { ! Options opts= prepareOptions(); ! // parse command line ! CommandLine cmdLine= new BasicParser().parse(opts, args); ! // deal with help and version options or no args at all immediately ! if (cmdLine.getArgList().isEmpty() || ! cmdLine.hasOption(OPTION_HELP)) { ! printUsage(opts); ! System.exit(0); ! } ! if (cmdLine.hasOption(OPTION_VERSION)) { ! printVersion(); ! System.exit(0); ! } ! // process arguments (rib files to render) ! Iterator it= cmdLine.getArgList().iterator(); ! long totalStart= System.currentTimeMillis(); ! while (it.hasNext()) ! try { ! String filename= (String) it.next(); ! long start= System.currentTimeMillis(); ! Parser parser= new Parser(cmdLine); ! parser.begin(filename); ! File file = new File(filename); ! String directory = file.getParent(); ! parser.setCurrentDirectory(directory); ! MipMap.setCurrentDirectory(directory); ! ShadowMap.setCurrentDirectory(directory); ! parser.parse(file.getName()); ! parser.end(); ! long end= System.currentTimeMillis(); ! System.out.println(filename + " time: " + ! Format.time(end - start)); ! } ! catch (IOException ioe) { ! System.err.println("Error on file " + ! ioe.getLocalizedMessage()); ! } ! catch (Exception e) { ! System.err.println("Error " + ! e.getLocalizedMessage()); ! } ! long totalEnd= System.currentTimeMillis(); ! System.out.println("Total time: " + ! Format.time(totalEnd - totalStart)); ! } ! catch (ParseException e) { ! System.err.println(e.getLocalizedMessage()); ! System.exit(1); ! } ! } ! ! private static Options prepareOptions() { ! Options options= new Options(); ! OptionBuilder.withLongOpt("help"); ! OptionBuilder.withDescription("show this usage information and exits"); ! options.addOption(OptionBuilder.create(OPTION_HELP)); ! OptionBuilder.withLongOpt("version"); ! OptionBuilder.withDescription("show application version and exits"); ! options.addOption(OptionBuilder.create(OPTION_VERSION)); ! OptionBuilder.withLongOpt("display"); ! OptionBuilder.withDescription( ! "always show image in a framebuffer display (implicitly add such " ! + "display if not already present)"); ! options.addOption(OptionBuilder.create(OPTION_FRAMEBUFFER)); ! OptionBuilder.withLongOpt("progress"); ! OptionBuilder.withDescription("show per frame rendering progress"); ! options.addOption(OptionBuilder.create(OPTION_PROGRESS)); ! OptionBuilder.withLongOpt("first"); ! OptionBuilder.withDescription("start rendering from <frame>"); ! OptionBuilder.hasArg(); ! OptionBuilder.withType(new Integer(1)); ! OptionBuilder.withArgName("frame"); ! options.addOption(OptionBuilder.create(OPTION_FIRSTFRAME)); ! OptionBuilder.withLongOpt("end"); ! OptionBuilder.withDescription("stop rendering after <frame>"); ! OptionBuilder.hasArg(); ! OptionBuilder.withArgName("frame"); ! options.addOption(OptionBuilder.create(OPTION_LASTFRAME)); ! OptionBuilder.withLongOpt("stats"); ! OptionBuilder.withDescription("print end of frame statistics"); ! // TODO implement level of detail for rendering statistics ! //OptionBuilder.hasOptionalArg(); ! //OptionBuilder.withType(new Integer(1)); ! //OptionBuilder.withArgName("level"); ! options.addOption(OptionBuilder.create(OPTION_STATISTICS)); ! OptionBuilder.withLongOpt("quality"); ! OptionBuilder.withDescription( ! "higher rendering quality (slightly slower)"); ! options.addOption(OptionBuilder.create(OPTION_QUALITY)); ! return options; ! } ! ! private static void printHeader() { ! System.out.print(MESSAGE_APPNAME); ! System.out.print(" v"); ! System.out.print(majorNumber); ! System.out.print('.'); ! System.out.println(minorNumber); ! System.out.println(MESSAGE_APPDESCRIPTION); ! } ! ! private static void printVersion() { ! printHeader(); ! System.out.println(); ! System.out.println(MESSAGE_LICENSE); ! } ! ! private static void printUsage(Options options) { ! printHeader(); ! System.out.println(); ! HelpFormatter formatter= new HelpFormatter(); ! formatter.printHelp("jrman [options] [file1.rib] [file2.rib] ...", ! "Supported options are:", options, ! "If no rib file is given options are presented."); ! System.out.println(); ! System.out.println(MESSAGE_LICENSE); ! } ! } |
From: Gerardo H. <ma...@us...> - 2007-02-26 19:36:24
|
Update of /cvsroot/jrman/drafts/src/org/jrman/geom In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30698/src/org/jrman/geom Modified Files: AffineTransform.java BoundingVolume.java Bounds2f.java Bounds3f.java ClippingVolume.java ConvexHull3f.java MutableBounds2f.java MutableBounds3f.java PerspectiveTransform.java Plane.java Transform.java Log Message: Check for Catmull Clark scheme before trying to instance a Subdivision Mesh. Started reformatting source code to fit in 80 columns, remove tabs and ugly formatting done by Eclipse. Index: Bounds3f.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/geom/Bounds3f.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Bounds3f.java 27 Nov 2005 04:08:38 -0000 1.17 --- Bounds3f.java 26 Feb 2007 19:35:46 -0000 1.18 *************** *** 1,19 **** /* ! Bounds3f.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Bounds3f.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 42,64 **** public static Bounds3f ALL = ! new Bounds3f( ! -Constants.INFINITY, ! Constants.INFINITY, ! -Constants.INFINITY, ! Constants.INFINITY, ! -Constants.INFINITY, ! Constants.INFINITY); protected Bounds3f() { // Empty ! this( ! Constants.INFINITY, ! -Constants.INFINITY, ! Constants.INFINITY, ! -Constants.INFINITY, ! Constants.INFINITY, ! -Constants.INFINITY); } ! public Bounds3f(float xMin, float xMax, float yMin, float yMax, float zMin, float zMax) { minX = xMin; maxX = xMax; --- 42,64 ---- public static Bounds3f ALL = ! new Bounds3f(-Constants.INFINITY, ! Constants.INFINITY, ! -Constants.INFINITY, ! Constants.INFINITY, ! -Constants.INFINITY, ! Constants.INFINITY); protected Bounds3f() { // Empty ! this(Constants.INFINITY, ! -Constants.INFINITY, ! Constants.INFINITY, ! -Constants.INFINITY, ! Constants.INFINITY, ! -Constants.INFINITY); } ! public Bounds3f(float xMin, float xMax, ! float yMin, float yMax, ! float zMin, float zMax) { minX = xMin; maxX = xMax; *************** *** 86,90 **** public Bounds2f toBounds2f(float margin) { ! return new Bounds2f(minX - margin, maxX + margin, minY - margin, maxY + margin); } --- 86,91 ---- public Bounds2f toBounds2f(float margin) { ! return new Bounds2f(minX - margin, maxX + margin, ! minY - margin, maxY + margin); } *************** *** 122,153 **** public BoundingVolume transform(Transform transform) { - /* - MutableBounds3f mb = new MutableBounds3f(); - p.set(minX, minY, minZ); - transform.transformPoint(p); - mb.addPoint(p); - p.set(minX, minY, maxZ); - transform.transformPoint(p); - mb.addPoint(p); - p.set(minX, maxY, minZ); - transform.transformPoint(p); - mb.addPoint(p); - p.set(minX, maxY, maxZ); - transform.transformPoint(p); - mb.addPoint(p); - p.set(maxX, minY, minZ); - transform.transformPoint(p); - mb.addPoint(p); - p.set(maxX, minY, maxZ); - transform.transformPoint(p); - mb.addPoint(p); - p.set(maxX, maxY, minZ); - transform.transformPoint(p); - mb.addPoint(p); - p.set(maxX, maxY, maxZ); - transform.transformPoint(p); - mb.addPoint(p); - return mb; - */ ConvexHull3f c = new ConvexHull3f(); c.addPoint(minX, minY, minZ); --- 123,126 ---- *************** *** 249,254 **** public String toString() { StringBuffer sb = new StringBuffer(); ! sb ! .append('[') .append(minX) .append(" ") --- 222,226 ---- public String toString() { StringBuffer sb = new StringBuffer(); ! sb.append('[') .append(minX) .append(" ") Index: Transform.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/geom/Transform.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Transform.java 17 Aug 2003 22:05:39 -0000 1.6 --- Transform.java 26 Feb 2007 19:35:46 -0000 1.7 *************** *** 1,19 **** /* ! Transform.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Transform.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: Bounds2f.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/geom/Bounds2f.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Bounds2f.java 10 May 2003 03:57:28 -0000 1.9 --- Bounds2f.java 26 Feb 2007 19:35:46 -0000 1.10 *************** *** 1,19 **** /* ! Bounds2f.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Bounds2f.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 49,53 **** protected Bounds2f() { // Empty ! this(Constants.INFINITY, -Constants.INFINITY, Constants.INFINITY, -Constants.INFINITY); } --- 49,54 ---- protected Bounds2f() { // Empty ! this(Constants.INFINITY, -Constants.INFINITY, ! Constants.INFINITY, -Constants.INFINITY); } *************** *** 116,121 **** StringBuffer sb = new StringBuffer(); sb.append("Bounds2f"); ! sb.append(", min: ").append('(').append(minX).append(", ").append(minY).append(')'); ! sb.append(", max: ").append('(').append(maxX).append(", ").append(maxY).append(')'); return sb.toString(); } --- 117,124 ---- StringBuffer sb = new StringBuffer(); sb.append("Bounds2f"); ! sb.append(", min: ").append('(').append(minX) ! .append(", ").append(minY).append(')'); ! sb.append(", max: ").append('(').append(maxX) ! .append(", ").append(maxY).append(')'); return sb.toString(); } Index: BoundingVolume.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/geom/BoundingVolume.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** BoundingVolume.java 16 Jul 2003 07:20:49 -0000 1.7 --- BoundingVolume.java 26 Feb 2007 19:35:46 -0000 1.8 *************** *** 1,19 **** /* ! BoundingVolume.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! BoundingVolume.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: Plane.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/geom/Plane.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Plane.java 18 May 2003 20:10:50 -0000 1.4 --- Plane.java 26 Feb 2007 19:35:46 -0000 1.5 *************** *** 1,19 **** /* ! Plane.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Plane.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 54,58 **** } ! public static Plane createWithPointAndNormal(Point3f point, Vector3f normal) { return new Plane(new Point3f(point), new Vector3f(normal)); } --- 54,59 ---- } ! public static Plane createWithPointAndNormal(Point3f point, ! Vector3f normal) { return new Plane(new Point3f(point), new Vector3f(normal)); } Index: ClippingVolume.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/geom/ClippingVolume.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ClippingVolume.java 18 May 2003 20:10:50 -0000 1.4 --- ClippingVolume.java 26 Feb 2007 19:35:46 -0000 1.5 *************** *** 1,19 **** /* ! ClippingVolume.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! ClippingVolume.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! 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 A 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. */ Index: AffineTransform.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/geom/AffineTransform.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** AffineTransform.java 20 Sep 2004 21:09:05 -0000 1.15 --- AffineTransform.java 26 Feb 2007 19:35:46 -0000 1.16 *************** *** 1,19 **** /* ! AffineTransform.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! AffineTransform.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 50,99 **** public static Transform createOrthographic(float near, float far) { Matrix4f m = ! new Matrix4f(1f, 0f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 0f, 1, //1f / (far - near), ! 0f, //-near / (far - near), ! 0f, 0f, 0f, 1f); ! return new AffineTransform(m); } ! public static Transform createRaster( ! Bounds2f screenWindow, ! float frameAspectRatio, ! int horizontalResolution, ! int verticalResolution, ! float pixelAspectRatio) { float imageAspectRatio = (horizontalResolution * pixelAspectRatio) / verticalResolution; if (imageAspectRatio < frameAspectRatio) verticalResolution = ! (int) ((horizontalResolution * pixelAspectRatio) / frameAspectRatio); else if (imageAspectRatio > frameAspectRatio) horizontalResolution = ! (int) ((verticalResolution * frameAspectRatio) / pixelAspectRatio); // Doesn't handle "flipped" screen window Point2f min = screenWindow.getMin(); Point2f max = screenWindow.getMax(); ! Matrix4f m = ! new Matrix4f( ! horizontalResolution / (max.x - min.x), ! 0f, ! 0f, ! 0f, ! 0f, ! verticalResolution / (max.y - min.y), ! 0f, ! 0f, ! 0f, ! 0f, ! 1f, ! 0f, ! 0f, ! 0f, ! 0f, ! 1f); Matrix4f tmp = new Matrix4f(); tmp.setIdentity(); tmp.setTranslation(new Vector3f(0f, max.y - min.y, 0f)); m.mul(tmp); ! tmp = new Matrix4f(1f, 0f, 0f, 0f, 0f, -1f, 0f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 0f, 1f); m.mul(tmp); tmp.setIdentity(); --- 50,102 ---- public static Transform createOrthographic(float near, float far) { Matrix4f m = ! new Matrix4f(1f, 0f, 0f, 0f, ! 0f, 1f, 0f, 0f, ! 0f, 0f, 1, 0f, //1f/(far-near),-near/(far-near), ! 0f, 0f, 0f, 1f); ! return new AffineTransform(m); } ! public static Transform createRaster(Bounds2f screenWindow, ! float frameAspectRatio, ! int horizontalResolution, ! int verticalResolution, ! float pixelAspectRatio) { float imageAspectRatio = (horizontalResolution * pixelAspectRatio) / verticalResolution; if (imageAspectRatio < frameAspectRatio) verticalResolution = ! (int) ((horizontalResolution * pixelAspectRatio) / ! frameAspectRatio); else if (imageAspectRatio > frameAspectRatio) horizontalResolution = ! (int) ((verticalResolution * frameAspectRatio) / ! pixelAspectRatio); // Doesn't handle "flipped" screen window Point2f min = screenWindow.getMin(); Point2f max = screenWindow.getMax(); ! Matrix4f m = new Matrix4f(horizontalResolution / (max.x - min.x), ! 0f, ! 0f, ! 0f, ! 0f, ! verticalResolution / (max.y - min.y), ! 0f, ! 0f, ! 0f, ! 0f, ! 1f, ! 0f, ! 0f, ! 0f, ! 0f, ! 1f); Matrix4f tmp = new Matrix4f(); tmp.setIdentity(); tmp.setTranslation(new Vector3f(0f, max.y - min.y, 0f)); m.mul(tmp); ! tmp = new Matrix4f(1f, 0f, 0f, 0f, ! 0f, -1f, 0f, 0f, ! 0f, 0f, 1f, 0f, ! 0f, 0f, 0f, 1f); m.mul(tmp); tmp.setIdentity(); *************** *** 103,129 **** } ! public static Transform createNDC(int horizontalResolution, int verticalResolution) { Matrix4f m = ! new Matrix4f( ! 1f / horizontalResolution, ! 0f, ! 0f, ! 0f, ! 0f, 1f / verticalResolution, ! 0f, ! 0f, ! 0f, ! 0f, ! 1f, ! 0f, ! 0f, ! 0f, ! 0f, ! 1f); return new AffineTransform(m); } ! public static Transform readFromFile(DataInputStream dis) throws IOException { float a = dis.readFloat(); float b = dis.readFloat(); --- 106,133 ---- } ! public static Transform createNDC(int horizontalResolution, ! int verticalResolution) { Matrix4f m = ! new Matrix4f(1f / horizontalResolution, ! 0f, ! 0f, ! 0f, ! 0f, 1f / verticalResolution, ! 0f, ! 0f, ! 0f, ! 0f, ! 1f, ! 0f, ! 0f, ! 0f, ! 0f, ! 1f); return new AffineTransform(m); } ! public static Transform readFromFile(DataInputStream dis) ! throws IOException { float a = dis.readFloat(); float b = dis.readFloat(); *************** *** 142,146 **** float o = dis.readFloat(); float p = dis.readFloat(); ! Matrix4f mat = new Matrix4f(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p); return new AffineTransform(mat); } --- 146,153 ---- float o = dis.readFloat(); float p = dis.readFloat(); ! Matrix4f mat = new Matrix4f(a, b, c, d, ! e, f, g, h, ! i, j, k, l, ! m, n, o, p); return new AffineTransform(mat); } Index: MutableBounds2f.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/geom/MutableBounds2f.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MutableBounds2f.java 20 May 2003 01:08:37 -0000 1.3 --- MutableBounds2f.java 26 Feb 2007 19:35:46 -0000 1.4 *************** *** 1,19 **** /* ! MutableBounds2f.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! MutableBounds2f.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: ConvexHull3f.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/geom/ConvexHull3f.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ConvexHull3f.java 14 Nov 2005 02:51:32 -0000 1.16 --- ConvexHull3f.java 26 Feb 2007 19:35:46 -0000 1.17 *************** *** 1,19 **** /* ! Polyhedron3f.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! ConvexHull3f.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: MutableBounds3f.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/geom/MutableBounds3f.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MutableBounds3f.java 30 Nov 2003 03:23:16 -0000 1.4 --- MutableBounds3f.java 26 Feb 2007 19:35:46 -0000 1.5 *************** *** 1,19 **** /* ! MutableBounds3f.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! MutableBounds3f.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: PerspectiveTransform.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/geom/PerspectiveTransform.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PerspectiveTransform.java 6 Jul 2005 22:53:23 -0000 1.12 --- PerspectiveTransform.java 26 Feb 2007 19:35:46 -0000 1.13 *************** *** 1,19 **** /* ! PerspectiveTransform.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! PerspectiveTransform.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 38,50 **** private float far; ! public static PerspectiveTransform createWithFov(float fov, float near, float far) { return createWithFocalLength(Calc.fovToFocalLength(fov), near, far); } ! public static PerspectiveTransform createWithFocalLength(float focalLength, float near, float far) { return new PerspectiveTransform(focalLength, near, far); } ! public static Transform readFromFile(DataInputStream dis) throws IOException { float a = dis.readFloat(); float b = dis.readFloat(); --- 38,54 ---- private float far; ! public static PerspectiveTransform createWithFov(float fov, ! float near, float far) { return createWithFocalLength(Calc.fovToFocalLength(fov), near, far); } ! public static PerspectiveTransform createWithFocalLength(float focalLength, ! float near, ! float far) { return new PerspectiveTransform(focalLength, near, far); } ! public static Transform readFromFile(DataInputStream dis) ! throws IOException { float a = dis.readFloat(); float b = dis.readFloat(); *************** *** 63,67 **** float o = dis.readFloat(); float p = dis.readFloat(); ! Matrix4f mat = new Matrix4f(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o ,p); float near = dis.readFloat(); float far = dis.readFloat(); --- 67,74 ---- float o = dis.readFloat(); float p = dis.readFloat(); ! Matrix4f mat = new Matrix4f(a, b, c, d, ! e, f, g, h, ! i, j, k, l, ! m, n, o ,p); float near = dis.readFloat(); float far = dis.readFloat(); *************** *** 76,86 **** private PerspectiveTransform(float fl, float near, float far) { ! super( ! new Matrix4f( ! fl, 0f, 0f, 0f, ! 0f, fl, 0f, 0f, ! // 0f, 0f, far / (far - near), (far * near) / (near - far), ! 0f, 0f, 1f, -1f, ! 0f, 0f, 1f, 0f)); this.near = near; this.far = far; --- 83,91 ---- private PerspectiveTransform(float fl, float near, float far) { ! super(new Matrix4f(fl, 0f, 0f, 0f, ! 0f, fl, 0f, 0f, ! // 0f, 0f, far/(far-near), (far*near) / (near-far), ! 0f, 0f, 1f, -1f, ! 0f, 0f, 1f, 0f)); this.near = near; this.far = far; *************** *** 104,108 **** public Transform preConcat(Transform transform) { ! Transform perspective = new PerspectiveTransform(transform.getMatrix(), near, far); return perspective.concat(this); } --- 109,114 ---- public Transform preConcat(Transform transform) { ! Transform perspective = new PerspectiveTransform(transform.getMatrix(), ! near, far); return perspective.concat(this); } |
Update of /cvsroot/jrman/drafts/src/org/jrman/grid In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30698/src/org/jrman/grid Modified Files: BooleanGrid.java Color3fGrid.java FloatGrid.java Grid.java Point3fGrid.java Tuple3fGrid.java Vector3fGrid.java Log Message: Check for Catmull Clark scheme before trying to instance a Subdivision Mesh. Started reformatting source code to fit in 80 columns, remove tabs and ugly formatting done by Eclipse. Index: Vector3fGrid.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/grid/Vector3fGrid.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Vector3fGrid.java 11 Jan 2006 06:23:23 -0000 1.9 --- Vector3fGrid.java 26 Feb 2007 19:35:46 -0000 1.10 *************** *** 1,19 **** /* ! Vector3fGrid.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Vector3fGrid.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 39,43 **** * normalize */ - public void normalize(Vector3fGrid v) { Vector3f[] tdata = (Vector3f[]) data; --- 39,42 ---- *************** *** 58,62 **** * vtransform */ - public void vtransform(Vector3fGrid v, Transform transform) { Vector3f[] tdata = (Vector3f[]) data; --- 57,60 ---- *************** *** 78,82 **** * ntransform */ - public void ntransform(Vector3fGrid n, Transform transform) { Vector3f[] tdata = (Vector3f[]) data; --- 76,79 ---- *************** *** 98,102 **** * faceforward */ - public void faceforward(Vector3fGrid v, Vector3f light) { Vector3f[] tdata = (Vector3f[]) data; --- 95,98 ---- *************** *** 127,131 **** * cross */ - public void cross(Vector3fGrid v1, Vector3fGrid v2) { Vector3f[] vdata = (Vector3f[]) data; --- 123,126 ---- Index: Grid.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/grid/Grid.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Grid.java 22 May 2003 07:36:26 -0000 1.4 --- Grid.java 26 Feb 2007 19:35:46 -0000 1.5 *************** *** 1,19 **** /* ! Grid.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Grid.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: Tuple3fGrid.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/grid/Tuple3fGrid.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Tuple3fGrid.java 11 Jan 2006 06:23:23 -0000 1.11 --- Tuple3fGrid.java 26 Feb 2007 19:35:46 -0000 1.12 *************** *** 1,19 **** /* ! Tuple3fGrid.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Tuple3fGrid.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 51,55 **** * set */ - public void set(float in) { for (int i= 0; i < size; i++) { --- 51,54 ---- *************** *** 112,116 **** * negate */ - public void negate(Tuple3fGrid t) { for (int i= 0; i < size; i++) --- 111,114 ---- *************** *** 127,131 **** * add */ - public void add(Tuple3fGrid t1, Tuple3f t2) { for (int i= 0; i < size; i++) --- 125,128 ---- *************** *** 153,157 **** * sub */ - public void sub(Tuple3fGrid t1, Tuple3f t2) { for (int i= 0; i < size; i++) --- 150,153 ---- *************** *** 190,194 **** * mul */ - public void mul(Tuple3fGrid t1, float f) { for (int i= 0; i < size; i++) { --- 186,189 ---- *************** *** 236,240 **** * div */ - public void div(Tuple3fGrid t1, Tuple3f t2) { for (int i= 0; i < size; i++) { --- 231,234 ---- *************** *** 291,295 **** * min */ - public void min(Tuple3fGrid t1, Tuple3f t2) { for (int i= 0; i < size; i++) { --- 285,288 ---- *************** *** 329,333 **** * max */ - public void max(Tuple3fGrid t1, Tuple3f t2) { for (int i= 0; i < size; i++) { --- 322,325 ---- *************** *** 367,371 **** * clamp */ - public void clamp(Tuple3fGrid t, Tuple3f min, Tuple3f max) { for (int i= 0; i < size; i++) { --- 359,362 ---- *************** *** 389,393 **** * mix */ - public void mix(Tuple3f t1, Tuple3f t2, FloatGrid alpha) { for (int i= 0; i < size; i++) { --- 380,383 ---- *************** *** 522,526 **** * Du */ - public void Du(Tuple3fGrid t, FloatGrid du) { for (int i= 0; i < size; i += uSize) { --- 512,515 ---- *************** *** 553,557 **** * Dv */ - public void Dv(Tuple3fGrid t, FloatGrid dv) { for (int i= 0; i < size - uSize; i += uSize) --- 542,545 ---- *************** *** 583,587 **** * random */ - public void random() { for (int i= 0; i < size; i++) --- 571,574 ---- *************** *** 600,604 **** * noise */ - public void noise(FloatGrid x) { for (int i= 0; i < size; i++) { --- 587,590 ---- *************** *** 654,660 **** for (int i= 0; i < size; i++) { Tuple3f tup= t.data[i]; ! data[i].set(0.5f * PerlinNoise.noise4d(tup.x, tup.y, tup.z, w)+0.5f, ! 0.5f * PerlinNoise.noise4d(tup.x, tup.z, tup.y, w)+0.5f, ! 0.5f * PerlinNoise.noise4d(tup.z, tup.y, tup.x, w)+0.5f); } } --- 640,646 ---- for (int i= 0; i < size; i++) { Tuple3f tup= t.data[i]; ! data[i].set(0.5f * PerlinNoise.noise4d(tup.x, tup.y, tup.z,w)+0.5f, ! 0.5f * PerlinNoise.noise4d(tup.x, tup.z, tup.y,w)+0.5f, ! 0.5f * PerlinNoise.noise4d(tup.z, tup.y, tup.x,w)+0.5f); } } *************** *** 663,667 **** * snoise */ - public void snoise(FloatGrid x) { for (int i= 0; i < size; i++) { --- 649,652 ---- *************** *** 727,731 **** private float pnoiseInternal1(float x, float px) { // this method reuses the argument variables (they are passed by value) ! // to decrease allocation of additional temporary varables x = x > 0 ? x % px : (-x) % px; float pmx = px - x; --- 712,716 ---- private float pnoiseInternal1(float x, float px) { // this method reuses the argument variables (they are passed by value) ! // to decrease allocation of additional temporary variables x = x > 0 ? x % px : (-x) % px; float pmx = px - x; *************** *** 772,776 **** } ! private float pnoiseInternal3(float x, float y, float z, float px, float py, float pz) { // this method reuses the argument variables (they are passed by value) // to decrease allocation of additional temporary varables --- 757,762 ---- } ! private float pnoiseInternal3(float x, float y, float z, float px, ! float py, float pz) { // this method reuses the argument variables (they are passed by value) // to decrease allocation of additional temporary varables *************** *** 818,827 **** } } - // TODO implement Tuple3f pnoise /* * cellnoise */ - public void cellnoise(FloatGrid x) { for (int i= 0; i < size; i++) { --- 804,811 ---- *************** *** 877,883 **** for (int i= 0; i < size; i++) { Tuple3f tup= t.data[i]; ! data[i].set(0.5f*PerlinNoise.cellnoise4d(tup.x,tup.y,tup.z, w)+0.5f, ! 0.5f*PerlinNoise.cellnoise4d(tup.x,tup.z,tup.y, w)+0.5f, ! 0.5f*PerlinNoise.cellnoise4d(tup.z,tup.y,tup.x, w)+0.5f); } } --- 861,867 ---- for (int i= 0; i < size; i++) { Tuple3f tup= t.data[i]; ! data[i].set(0.5f*PerlinNoise.cellnoise4d(tup.x,tup.y,tup.z,w)+0.5f, ! 0.5f*PerlinNoise.cellnoise4d(tup.x,tup.z,tup.y,w)+0.5f, ! 0.5f*PerlinNoise.cellnoise4d(tup.z,tup.y,tup.x,w)+0.5f); } } *************** *** 886,890 **** * setxcomp */ - public void setxcomp(float x) { for (int i= 0; i < size; i++) --- 870,873 ---- *************** *** 912,916 **** * setycomp */ - public void setycomp(float y) { for (int i= 0; i < size; i++) --- 895,898 ---- *************** *** 938,942 **** * setzcomp */ - public void setzcomp(float z) { for (int i= 0; i < size; i++) --- 920,923 ---- Index: Color3fGrid.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/grid/Color3fGrid.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Color3fGrid.java 14 Nov 2005 02:00:19 -0000 1.10 --- Color3fGrid.java 26 Feb 2007 19:35:46 -0000 1.11 *************** *** 1,19 **** /* ! Color3fGrid.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Color3fGrid.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 30,34 **** private static Color3f tmpc = new Color3f(); ! private static void getColor(MipMap texture, float s, float t, float area, Color3f out) { texture.getData(s, t, area, mmData); out.x = mmData[0]; --- 30,35 ---- private static Color3f tmpc = new Color3f(); ! private static void getColor(MipMap texture, float s, float t, ! float area, Color3f out) { texture.getData(s, t, area, mmData); out.x = mmData[0]; *************** *** 50,55 **** * texture */ ! ! public void texture(String textureName, FloatGrid s, FloatGrid t, float blur) { MipMap texture = MipMap.getMipMap(textureName); for (int v = 0; v < vSize; v++) --- 51,56 ---- * texture */ ! public void texture(String textureName, FloatGrid s, FloatGrid t, ! float blur) { MipMap texture = MipMap.getMipMap(textureName); for (int v = 0; v < vSize; v++) *************** *** 62,75 **** v1 = v - 1; float area = ! ((s.get(u, v) + s.get(u1, v)) * (t.get(u, v) - t.get(u1, v)) ! + (s.get(u1, v) + s.get(u1, v1)) * (t.get(u1, v) - t.get(u1, v1)) ! + (s.get(u1, v1) + s.get(u, v1)) * (t.get(u1, v1) - t.get(u, v1)) ! + (s.get(u, v1) + s.get(u, v)) * (t.get(u, v1) - t.get(u, v))) ! / 2f; area = Math.abs(area) + blur; - /* - float avgS = (s.get(u, v) + s.get(u1, v) + s.get(u1, v1) + s.get(u, v1)) / 4f; - float avgT = (t.get(u, v) + t.get(u1, v) + t.get(u1, v1) + t.get(u, v1)) / 4f; - */ float avgS = s.get(u, v); float avgT = t.get(u, v); --- 63,75 ---- v1 = v - 1; float area = ! ((s.get(u, v) + s.get(u1, v)) * (t.get(u, v) - t.get(u1, v)) ! + (s.get(u1, v) + s.get(u1, v1)) * ! (t.get(u1, v) - t.get(u1, v1)) ! + (s.get(u1, v1) + s.get(u, v1)) * ! (t.get(u1, v1) - t.get(u, v1)) ! + (s.get(u, v1) + s.get(u, v)) * ! (t.get(u, v1) - t.get(u, v))) ! / 2f; area = Math.abs(area) + blur; float avgS = s.get(u, v); float avgT = t.get(u, v); Index: Point3fGrid.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/grid/Point3fGrid.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Point3fGrid.java 11 Jan 2006 06:23:23 -0000 1.6 --- Point3fGrid.java 26 Feb 2007 19:35:46 -0000 1.7 *************** *** 1,19 **** /* ! Point3fGrid.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Point3fGrid.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 39,43 **** * transform */ - public void transform(Point3fGrid p, Transform transform) { Point3f[] tdata = (Point3f[]) data; --- 39,42 ---- Index: FloatGrid.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/grid/FloatGrid.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** FloatGrid.java 11 Jan 2006 06:23:23 -0000 1.27 --- FloatGrid.java 26 Feb 2007 19:35:46 -0000 1.28 *************** *** 73,77 **** * set */ - public void set(float f) { for (int i = 0; i < size; i++) --- 73,76 ---- *************** *** 99,103 **** * negate */ - public void negate(FloatGrid f) { for (int i = 0; i < size; i++) --- 98,101 ---- *************** *** 114,118 **** * add */ - public void add(FloatGrid f1, float f2) { for (int i = 0; i < size; i++) --- 112,115 ---- *************** *** 140,144 **** * sub */ - public void sub(FloatGrid f1, float f2) { for (int i = 0; i < size; i++) --- 137,140 ---- *************** *** 177,181 **** * mul */ - public void mul(FloatGrid f1, float f2) { for (int i = 0; i < size; i++) --- 173,176 ---- *************** *** 203,207 **** * div */ - public void div(FloatGrid f1, float f2) { for (int i = 0; i < size; i++) --- 198,201 ---- *************** *** 241,245 **** * toRadians */ - public void toRadians(FloatGrid f) { for (int i = 0; i < size; i++) --- 235,238 ---- *************** *** 256,260 **** * toDegrees */ - public void toDegrees(FloatGrid f) { for (int i = 0; i < size; i++) --- 249,252 ---- *************** *** 271,275 **** * sin */ - public void sin(FloatGrid f) { for (int i = 0; i < size; i++) --- 263,266 ---- *************** *** 286,290 **** * asin */ - public void asin(FloatGrid f) { for (int i = 0; i < size; i++) --- 277,280 ---- *************** *** 301,305 **** * cos */ - public void cos(FloatGrid f) { for (int i = 0; i < size; i++) --- 291,294 ---- *************** *** 316,320 **** * acos */ - public void acos(FloatGrid f) { for (int i = 0; i < size; i++) --- 305,308 ---- *************** *** 331,335 **** * tan */ - public void tan(FloatGrid f) { for (int i = 0; i < size; i++) --- 319,322 ---- *************** *** 346,350 **** * atan */ - public void atan(FloatGrid f) { for (int i = 0; i < size; i++) --- 333,336 ---- *************** *** 361,365 **** * atan (2 args) */ - public void atan(FloatGrid f1, float f2) { for (int i = 0; i < size; i++) --- 347,350 ---- *************** *** 398,402 **** * pow */ - public void pow(FloatGrid f1, float f2) { for (int i = 0; i < size; i++) --- 383,386 ---- *************** *** 435,439 **** * exp */ - public void exp(FloatGrid f) { for (int i = 0; i < size; i++) --- 419,422 ---- *************** *** 450,454 **** * sqrt */ - public void sqrt(FloatGrid f) { for (int i = 0; i < size; i++) --- 433,436 ---- *************** *** 465,469 **** * isqrt */ - public void isqrt(FloatGrid f) { for (int i = 0; i < size; i++) --- 447,450 ---- *************** *** 480,484 **** * log */ - public void log(FloatGrid f) { for (int i = 0; i < size; i++) --- 461,464 ---- *************** *** 495,499 **** * log base */ - public void log(FloatGrid f, float base) { double baseLog = Math.log(base); --- 475,478 ---- *************** *** 512,516 **** * mod */ - public void mod(FloatGrid f1, float f2) { for (int i = 0; i < size; i++) --- 491,494 ---- *************** *** 549,553 **** * abs */ - public void abs(FloatGrid f) { for (int i = 0; i < size; i++) --- 527,530 ---- *************** *** 564,568 **** * sign */ - public void sign(FloatGrid f) { for (int i = 0; i < size; i++) --- 541,544 ---- *************** *** 579,583 **** * min */ - public void min(FloatGrid f1, float f2) { for (int i = 0; i < size; i++) --- 555,558 ---- *************** *** 605,609 **** * max */ - public void max(FloatGrid f1, float f2) { for (int i = 0; i < size; i++) --- 580,583 ---- *************** *** 631,635 **** * clamp */ - public void clamp(FloatGrid f, float min, float max) { for (int i = 0; i < size; i++) --- 605,608 ---- *************** *** 646,650 **** * mix */ - public void mix(float f1, float f2, FloatGrid alpha) { for (int i = 0; i < size; i++) --- 619,622 ---- *************** *** 729,733 **** * floor */ - public void floor(FloatGrid f) { for (int i = 0; i < size; i++) --- 701,704 ---- *************** *** 744,748 **** * ceil */ - public void ceil(FloatGrid f) { for (int i = 0; i < size; i++) --- 715,718 ---- *************** *** 759,763 **** * round */ - public void round(FloatGrid f) { for (int i = 0; i < size; i++) --- 729,732 ---- *************** *** 774,778 **** * step */ - public void step(FloatGrid f1, float f2) { for (int i = 0; i < size; i++) --- 743,746 ---- *************** *** 811,815 **** * smoothstep */ - public void smoothstep(float f1, float f2, FloatGrid alpha) { for (int i = 0; i < size; i++) --- 779,782 ---- *************** *** 900,904 **** * filterstep */ - // TODO implement float filterstep --- 867,870 ---- *************** *** 906,910 **** * spline */ - // TODO implement float spline --- 872,875 ---- *************** *** 912,916 **** * Du */ - public void du(FloatGrid u) { for (int i = 0; i < size; i += uSize) { --- 877,880 ---- *************** *** 948,952 **** * Dv */ - public void dv(FloatGrid v) { for (int i = 0; i < size - uSize; i += uSize) --- 912,915 ---- *************** *** 980,984 **** * random */ - public void random() { for (int i = 0; i < size; i++) --- 943,946 ---- *************** *** 995,999 **** * noise */ - public void noise(FloatGrid x) { for (int i = 0; i < size; i++) --- 957,960 ---- *************** *** 1035,1039 **** * snoise */ - public void snoise(FloatGrid x) { for (int i = 0; i < size; i++) --- 996,999 ---- *************** *** 1071,1075 **** * pnoise */ - public void pnoise(FloatGrid x, float px) { assert px > 0f; --- 1031,1034 ---- *************** *** 1132,1144 **** } ! public void pnoise( ! FloatGrid x, ! FloatGrid y, ! FloatGrid z, ! float w, ! float px, ! float py, ! float pz, ! float pw) { assert px > 0f && py > 0f && pz > 0f && pw > 0f; float nw = w > 0 ? w % pw : (-w) % pw; --- 1091,1102 ---- } ! public void pnoise(FloatGrid x, ! FloatGrid y, ! FloatGrid z, ! float w, ! float px, ! float py, ! float pz, ! float pw) { assert px > 0f && py > 0f && pz > 0f && pw > 0f; float nw = w > 0 ? w % pw : (-w) % pw; *************** *** 1274,1319 **** /* - public static float pnoise(float x, float y, float px, float py) { - assert px > 0f && py > 0f; - x= x > 0 ? x % px : (-x) % px; - y= y > 0 ? y % py : (-y) % py; - float pmx= px - x; - float pmy= py - y; - float tmp= (PerlinNoise.noise2d(x, y) * pmx + PerlinNoise.noise2d(-pmx, y) * x) * pmy; - tmp += (PerlinNoise.noise2d(x, -pmy) * pmx + PerlinNoise.noise2d(-pmx, -pmy) * x) * y; - tmp /= px * py; - return .5f + tmp * .5f; - } - - public static void main(String[] args) { - float x, y, l= 4f, w= 4f, n, max= -Float.MAX_VALUE, min= Float.MAX_VALUE; - int i, j, il= 500, iw= 500; - float dx= w / iw, dy= l / il; - BufferedImage bi= new BufferedImage(iw, il, BufferedImage.TYPE_INT_ARGB); - long before= System.currentTimeMillis(); - for (i= 0, x= -2f; i < iw; i++, x += dx) { - for (j= 0, y= 2f; j < il; j++, y += dy) { - n= FloatGrid.pnoise(x, y, 2.5f, 1.7f); - bi.setRGB(i, j, Color.getHSBColor(0f, 0.f, n).getRGB()); - if (n > max) - max= n; - if (n < min) - min= n; - } - } - System.out.println("millis " + (System.currentTimeMillis() - before)); - System.out.println("max=" + max); - System.out.println("min=" + min); - JFrame f= new JFrame("periodic noise"); - f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - f.getContentPane().add(new JLabel(new ImageIcon(bi))); - f.pack(); - f.setVisible(true); - } - */ - /* * cellnoise */ - public void cellnoise(FloatGrid x) { for (int i = 0; i < size; i++) --- 1232,1237 ---- *************** *** 1352,1356 **** * xcomp */ - public void xcomp(Tuple3fGrid t) { for (int i = 0; i < size; i++) --- 1270,1273 ---- *************** *** 1367,1371 **** * ycomp */ - public void ycomp(Tuple3fGrid t) { for (int i = 0; i < size; i++) --- 1284,1287 ---- *************** *** 1382,1386 **** * zcomp */ - public void zcomp(Tuple3fGrid t) { for (int i = 0; i < size; i++) --- 1298,1301 ---- *************** *** 1397,1401 **** * length */ - public void length(Vector3fGrid v) { Vector3f[] vdata = (Vector3f[]) v.data; --- 1312,1315 ---- *************** *** 1414,1418 **** * distance */ - public void distance(Point3fGrid p1, Point3f p2) { Point3f[] p1data = (Point3f[]) p1.data; --- 1328,1331 ---- *************** *** 1446,1450 **** * dot */ - public void dot(Vector3fGrid p1, Vector3f p2) { Vector3f[] p1data = (Vector3f[]) p1.data; --- 1359,1362 ---- *************** *** 1478,1482 **** * ptlined */ - // TODO implement ptlined --- 1390,1393 ---- *************** *** 1484,1488 **** * area */ - public void area(Point3fGrid p) { Point3f[] pdata = (Point3f[]) p.data; --- 1395,1398 ---- *************** *** 1541,1545 **** * depth */ - public void depth(Point3fGrid p, float near, float far) { Point3f[] pdata = (Point3f[]) p.data; --- 1451,1454 ---- *************** *** 1558,1562 **** * texture */ - public void texture(String textureName, FloatGrid s, FloatGrid t, float blur, int band) { --- 1467,1470 ---- *************** *** 1592,1602 **** * shadow */ ! ! public void shadow( ! String shadowName, ! Point3fGrid p, ! float bias, ! float samples, ! float blur) { int isamples = (int) samples; float oneOverSamples = 1f / samples; --- 1500,1508 ---- * shadow */ ! public void shadow(String shadowName, ! Point3fGrid p, ! float bias, ! float samples, ! float blur) { int isamples = (int) samples; float oneOverSamples = 1f / samples; *************** *** 1625,1629 **** * simulPow */ - public void simulPow(FloatGrid f1, float n) { for (int i = 0; i < size; i++) { --- 1531,1534 ---- Index: BooleanGrid.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/grid/BooleanGrid.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** BooleanGrid.java 25 Oct 2003 05:46:46 -0000 1.6 --- BooleanGrid.java 26 Feb 2007 19:35:46 -0000 1.7 *************** *** 1,19 **** /* ! BooleanGrid.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! BooleanGrid.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ |
From: Gerardo H. <ma...@us...> - 2007-02-26 19:36:24
|
Update of /cvsroot/jrman/drafts/src/org/jrman/attributes In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30698/src/org/jrman/attributes Modified Files: Attributes.java Basis.java DetailRange.java GeometricApproximation.java MutableAttributes.java Orientation.java ShadingInterpolation.java SolidOperation.java Space.java TextureCoordinates.java TrimCurveSense.java Log Message: Check for Catmull Clark scheme before trying to instance a Subdivision Mesh. Started reformatting source code to fit in 80 columns, remove tabs and ugly formatting done by Eclipse. Index: Basis.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/Basis.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Basis.java 9 Feb 2004 16:49:31 -0000 1.2 --- Basis.java 26 Feb 2007 19:35:46 -0000 1.3 *************** *** 1,19 **** /* ! Basis.java ! Copyright (C) 2003, 2004 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Basis.java ! Copyright (C) 2003, 2004 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 30,89 **** static { ! bezierInverse = ! new Matrix4f(-1f, 3f, -3f, 1, 3f, -6f, 3f, 0f, -3f, 3f, 0f, 0f, 1f, 0f, 0f, 0f); bezierInverse.invert(); } public final static Basis BEZIER = ! new Basis( ! new Matrix4f(-1f, 3f, -3f, 1, 3f, -6f, 3f, 0f, -3f, 3f, 0f, 0f, 1f, 0f, 0f, 0f)); public final static Basis B_SPLINE = ! new Basis( ! new Matrix4f( ! -1f / 6f, ! 3f / 6f, ! -3f / 6f, ! 1f / 6f, ! 3f / 6f, ! -6f / 6f, ! 0f / 6f, ! 4f / 6f, ! -3f / 6f, ! 3f / 6f, ! 3f / 6f, ! 1f / 6f, ! 1f / 6f, ! 0f / 6f, ! 0f / 6f, ! 0f / 6f)); public final static Basis CATMULL_ROM = ! new Basis( ! new Matrix4f( ! -1f / 2f, ! 2f / 2f, ! -1f / 2f, ! 0f / 2f, ! 3f / 2f, ! -5f / 2f, ! 0f / 2f, ! 2f / 2f, ! -3f / 2f, ! 4f / 2f, ! 1f / 2f, ! 0f / 2f, ! 1f / 2f, ! -1f / 2f, ! 0f / 2f, ! 0f / 2f)); public final static Basis HERMITE = ! new Basis( ! new Matrix4f(2f, -3f, 0f, 1f, 1f, -2f, 1f, 0f, -2f, 3f, 0f, 0f, 1f, -1f, 0f, 0f)); public final static Basis POWER = ! new Basis( ! new Matrix4f(1f, 0f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 0f, 1f)); private static final Map map = new HashMap(); --- 30,69 ---- static { ! bezierInverse = new Matrix4f(-1f, 3f, -3f, 1f, ! 3f, -6f, 3f, 0f, ! -3f, 3f, 0f, 0f, ! 1f, 0f, 0f, 0f); bezierInverse.invert(); } public final static Basis BEZIER = ! new Basis(new Matrix4f(-1f, 3f, -3f, 1, ! 3f, -6f, 3f, 0f, ! -3f, 3f, 0f, 0f, ! 1f, 0f, 0f, 0f)); public final static Basis B_SPLINE = ! new Basis(new Matrix4f(-1f / 6f, 3f / 6f, -3f / 6f, 1f / 6f, ! 3f / 6f, -6f / 6f, 0f / 6f, 4f / 6f, ! -3f / 6f, 3f / 6f, 3f / 6f, 1f / 6f, ! 1f / 6f, 0f / 6f, 0f / 6f, 0f / 6f)); public final static Basis CATMULL_ROM = ! new Basis(new Matrix4f(-1f / 2f, 2f / 2f, -1f / 2f, 0f / 2f, ! 3f / 2f, -5f / 2f, 0f / 2f, 2f / 2f, ! -3f / 2f, 4f / 2f, 1f / 2f, 0f / 2f, ! 1f / 2f, -1f / 2f, 0f / 2f, 0f / 2f)); public final static Basis HERMITE = ! new Basis(new Matrix4f(2f, -3f, 0f, 1f, ! 1f, -2f, 1f, 0f, ! -2f, 3f, 0f, 0f, ! 1f, -1f, 0f, 0f)); public final static Basis POWER = ! new Basis(new Matrix4f(1f, 0f, 0f, 0f, ! 0f, 1f, 0f, 0f, ! 0f, 0f, 1f, 0f, ! 0f, 0f, 0f, 1f)); private static final Map map = new HashMap(); Index: TrimCurveSense.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/TrimCurveSense.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TrimCurveSense.java 9 Apr 2003 05:04:57 -0000 1.1 --- TrimCurveSense.java 26 Feb 2007 19:35:46 -0000 1.2 *************** *** 1,19 **** /* ! TrimCurveSense.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! TrimCurveSense.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: MutableAttributes.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/MutableAttributes.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MutableAttributes.java 30 Dec 2006 16:32:23 -0000 1.10 --- MutableAttributes.java 26 Feb 2007 19:35:46 -0000 1.11 *************** *** 1,19 **** /* ! MutableAttributes.java ! Copyright (C) 2003, 2006 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! MutableAttributes.java ! Copyright (C) 2003, 2006 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 52,56 **** detail = Bounds3f.ALL; geometricApproximation = ! new GeometricApproximation(GeometricApproximation.Type.FLATNESS, 1f); orientation = Orientation.OUTSIDE; sides = 2; --- 52,56 ---- detail = Bounds3f.ALL; geometricApproximation = ! new GeometricApproximation(GeometricApproximation.Type.FLATNESS, 1f); orientation = Orientation.OUTSIDE; sides = 2; *************** *** 130,134 **** } ! public void setShadingInterpolation(ShadingInterpolation shadingInterpolation) { this.shadingInterpolation = shadingInterpolation; modified = true; --- 130,135 ---- } ! public void setShadingInterpolation( ! ShadingInterpolation shadingInterpolation) { this.shadingInterpolation = shadingInterpolation; modified = true; *************** *** 155,159 **** } ! public void setGeometricApproximation(GeometricApproximation geometricApproximation) { this.geometricApproximation = geometricApproximation; modified = true; --- 156,161 ---- } ! public void setGeometricApproximation( ! GeometricApproximation geometricApproximation) { this.geometricApproximation = geometricApproximation; modified = true; *************** *** 180,185 **** } ! public void setDisplacementBoundCoordinateSystem(String displacementBoundCoordinateSystem) { ! this.displacementBoundCoordinateSystem = displacementBoundCoordinateSystem; modified = true; } --- 182,189 ---- } ! public void setDisplacementBoundCoordinateSystem( ! String displacementBoundCoordinateSystem) { ! this.displacementBoundCoordinateSystem = ! displacementBoundCoordinateSystem; modified = true; } Index: DetailRange.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/DetailRange.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DetailRange.java 9 Apr 2003 05:04:57 -0000 1.1 --- DetailRange.java 26 Feb 2007 19:35:46 -0000 1.2 *************** *** 1,19 **** /* ! DetailRange.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! DetailRange.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! 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 A 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. */ *************** *** 34,42 **** } ! public DetailRange( ! float minVisible, ! float lowerTransition, ! float upperTransition, ! float maxVisible) { this.minVisible = minVisible; this.lowerTransition = lowerTransition; --- 34,41 ---- } ! public DetailRange(float minVisible, ! float lowerTransition, ! float upperTransition, ! float maxVisible) { this.minVisible = minVisible; this.lowerTransition = lowerTransition; Index: SolidOperation.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/SolidOperation.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SolidOperation.java 9 Apr 2003 05:04:57 -0000 1.1 --- SolidOperation.java 26 Feb 2007 19:35:46 -0000 1.2 *************** *** 1,19 **** /* ! SolidOperation.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! SolidOperation.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 25,35 **** public class SolidOperation { ! public final static SolidOperation PRIMITIVE = new SolidOperation("primitive"); ! public final static SolidOperation INTERSECTION = new SolidOperation("intersection"); ! public final static SolidOperation UNION = new SolidOperation("union"); ! public final static SolidOperation DIFFERENCE = new SolidOperation("difference"); private static Map map = new HashMap(); --- 25,39 ---- public class SolidOperation { ! public final static SolidOperation PRIMITIVE = ! new SolidOperation("primitive"); ! public final static SolidOperation INTERSECTION = ! new SolidOperation("intersection"); ! public final static SolidOperation UNION = ! new SolidOperation("union"); ! public final static SolidOperation DIFFERENCE = ! new SolidOperation("difference"); private static Map map = new HashMap(); *************** *** 51,55 **** SolidOperation result = (SolidOperation) map.get(name); if (result == null) ! throw new IllegalArgumentException("No such solid operation: " + name); return result; } --- 55,60 ---- SolidOperation result = (SolidOperation) map.get(name); if (result == null) ! throw new IllegalArgumentException("No such solid operation: " + ! name); return result; } Index: Space.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/Space.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Space.java 15 May 2003 03:15:30 -0000 1.1 --- Space.java 26 Feb 2007 19:35:46 -0000 1.2 *************** *** 1,19 **** /* ! Space.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Space.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: Attributes.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/Attributes.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Attributes.java 24 Dec 2006 05:25:56 -0000 1.8 --- Attributes.java 26 Feb 2007 19:35:46 -0000 1.9 *************** *** 1,19 **** /* ! Attributes.java ! Copyright (C) 2003, 2006 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Attributes.java ! Copyright (C) 2003, 2006 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 119,123 **** transform = other.getTransform(); displacementBound = other.getDisplacementBound(); ! displacementBoundCoordinateSystem = other.getDisplacementBoundCoordinateSystem(); objectIdentifier = other.getObjectIdentifier(); trimCurveSense = other.getTrimCurveSense(); --- 119,124 ---- transform = other.getTransform(); displacementBound = other.getDisplacementBound(); ! displacementBoundCoordinateSystem = ! other.getDisplacementBoundCoordinateSystem(); objectIdentifier = other.getObjectIdentifier(); trimCurveSense = other.getTrimCurveSense(); Index: GeometricApproximation.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/GeometricApproximation.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GeometricApproximation.java 9 Apr 2003 05:04:57 -0000 1.1 --- GeometricApproximation.java 26 Feb 2007 19:35:46 -0000 1.2 *************** *** 1,19 **** /* ! GeometricApproximation.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! GeometricApproximation.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 50,54 **** (GeometricApproximation.Type) Type.map.get(name); if (result == null) ! throw new IllegalArgumentException("No such approximation type: " + name); return result; } --- 50,55 ---- (GeometricApproximation.Type) Type.map.get(name); if (result == null) ! throw new IllegalArgumentException("No such approximation type: " ! + name); return result; } *************** *** 60,64 **** } ! public GeometricApproximation(GeometricApproximation.Type type, float value) { this.type = type; this.value = value; --- 61,66 ---- } ! public GeometricApproximation(GeometricApproximation.Type type, ! float value) { this.type = type; this.value = value; Index: TextureCoordinates.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/TextureCoordinates.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TextureCoordinates.java 9 Apr 2003 05:04:57 -0000 1.1 --- TextureCoordinates.java 26 Feb 2007 19:35:46 -0000 1.2 *************** *** 1,19 **** /* ! TextureCoordinates.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! TextureCoordinates.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 38,50 **** private float t4; ! public TextureCoordinates( ! float s1, ! float t1, ! float s2, ! float t2, ! float s3, ! float t3, ! float s4, ! float t4) { this.s1 = s1; this.t1 = t1; --- 38,49 ---- private float t4; ! public TextureCoordinates(float s1, ! float t1, ! float s2, ! float t2, ! float s3, ! float t3, ! float s4, ! float t4) { this.s1 = s1; this.t1 = t1; Index: Orientation.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/Orientation.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Orientation.java 9 Apr 2003 05:04:57 -0000 1.1 --- Orientation.java 26 Feb 2007 19:35:46 -0000 1.2 *************** *** 1,19 **** /* ! Orientation.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Orientation.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: ShadingInterpolation.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/ShadingInterpolation.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ShadingInterpolation.java 9 Apr 2003 05:04:57 -0000 1.1 --- ShadingInterpolation.java 26 Feb 2007 19:35:46 -0000 1.2 *************** *** 1,19 **** /* ! ShadingInterpolation.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! ShadingInterpolation.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 28,32 **** new ShadingInterpolation("constant"); ! public static final ShadingInterpolation SMOOTH = new ShadingInterpolation("smooth"); private final static Map map = new HashMap(); --- 28,33 ---- new ShadingInterpolation("constant"); ! public static final ShadingInterpolation SMOOTH = ! new ShadingInterpolation("smooth"); private final static Map map = new HashMap(); *************** *** 44,50 **** public static ShadingInterpolation getNamed(String name) { ! ShadingInterpolation result = (ShadingInterpolation) ShadingInterpolation.map.get(name); if (result == null) ! throw new IllegalArgumentException("No such shading interpolation: " + name); return result; } --- 45,53 ---- public static ShadingInterpolation getNamed(String name) { ! ShadingInterpolation result = (ShadingInterpolation) ! ShadingInterpolation.map.get(name); if (result == null) ! throw new IllegalArgumentException("No such shading interpolation: " ! + name); return result; } |
From: Gerardo H. <ma...@us...> - 2007-02-26 19:36:22
|
Update of /cvsroot/jrman/drafts/src/org/jrman/parameters In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30698/src/org/jrman/parameters Modified Files: UniformScalarTuple3f.java VaryingArrayFloat.java VaryingArrayHPoint.java VaryingArrayTuple3f.java Log Message: Check for Catmull Clark scheme before trying to instance a Subdivision Mesh. Started reformatting source code to fit in 80 columns, remove tabs and ugly formatting done by Eclipse. Index: UniformScalarTuple3f.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parameters/UniformScalarTuple3f.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** UniformScalarTuple3f.java 24 Dec 2006 05:25:56 -0000 1.6 --- UniformScalarTuple3f.java 26 Feb 2007 19:35:47 -0000 1.7 *************** *** 32,36 **** final private float z; ! public UniformScalarTuple3f(Declaration declaration, float x, float y, float z) { super(declaration); this.x = x; --- 32,37 ---- final private float z; ! public UniformScalarTuple3f(Declaration declaration, ! float x, float y, float z) { super(declaration); this.x = x; Index: VaryingArrayHPoint.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parameters/VaryingArrayHPoint.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** VaryingArrayHPoint.java 24 Dec 2006 05:25:56 -0000 1.8 --- VaryingArrayHPoint.java 26 Feb 2007 19:35:47 -0000 1.9 *************** *** 62,97 **** float[] newValues = new float[n * 16]; for (int i = 0; i < off1; i++) { ! newValues[i] = ! Calc.interpolate( ! values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMin, ! vMin); ! newValues[off1 + i] = ! Calc.interpolate( ! values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMax, ! vMin); ! newValues[off1 + i] = ! Calc.interpolate( ! values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMin, ! vMax); ! newValues[off1 + i] = ! Calc.interpolate( ! values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMax, ! vMax); } return new VaryingArrayHPoint(declaration, newValues); --- 62,89 ---- float[] newValues = new float[n * 16]; for (int i = 0; i < off1; i++) { ! newValues[i] = Calc.interpolate(values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMin, ! vMin); ! newValues[off1 + i] = Calc.interpolate(values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMax, ! vMin); ! newValues[off1 + i] = Calc.interpolate(values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMin, ! vMax); ! newValues[off1 + i] = Calc.interpolate(values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMax, ! vMax); } return new VaryingArrayHPoint(declaration, newValues); Index: VaryingArrayTuple3f.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parameters/VaryingArrayTuple3f.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** VaryingArrayTuple3f.java 24 Dec 2006 05:25:56 -0000 1.8 --- VaryingArrayTuple3f.java 26 Feb 2007 19:35:47 -0000 1.9 *************** *** 61,96 **** float[] newValues = new float[n * 12]; for (int i = 0; i < off1; i++) { ! newValues[i] = ! Calc.interpolate( ! values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMin, ! vMin); ! newValues[off1 + i] = ! Calc.interpolate( ! values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMax, ! vMin); ! newValues[off1 + i] = ! Calc.interpolate( ! values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMin, ! vMax); ! newValues[off1 + i] = ! Calc.interpolate( ! values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMax, ! vMax); } return new VaryingArrayTuple3f(declaration, newValues); --- 61,88 ---- float[] newValues = new float[n * 12]; for (int i = 0; i < off1; i++) { ! newValues[i] = Calc.interpolate(values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMin, ! vMin); ! newValues[off1 + i] = Calc.interpolate(values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMax, ! vMin); ! newValues[off1 + i] = Calc.interpolate(values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMin, ! vMax); ! newValues[off1 + i] = Calc.interpolate(values[i], ! values[off1 + i], ! values[off2 + i], ! values[off3 + i], ! uMax, ! vMax); } return new VaryingArrayTuple3f(declaration, newValues); Index: VaryingArrayFloat.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parameters/VaryingArrayFloat.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** VaryingArrayFloat.java 24 Dec 2006 05:25:56 -0000 1.11 --- VaryingArrayFloat.java 26 Feb 2007 19:35:47 -0000 1.12 *************** *** 57,92 **** float[] newValues = new float[4 * n]; for (int i = 0; i < n; i++) { ! newValues[i] = ! Calc.interpolate( ! values[i], ! values[n + i], ! values[n2 + i], ! values[n3 + i], ! uMin, ! vMin); ! newValues[n + i] = ! Calc.interpolate( ! values[i], ! values[n + i], ! values[n2 + i], ! values[n3 + i], ! uMax, ! vMin); ! newValues[n2 + i] = ! Calc.interpolate( ! values[i], ! values[n + i], ! values[n2 + i], ! values[n3 + i], ! uMin, ! vMax); ! newValues[n3 + i] = ! Calc.interpolate( ! values[i], ! values[n + i], ! values[n2 + i], ! values[n3 + i], ! uMax, ! vMax); } return new VaryingArrayFloat(declaration, newValues); --- 57,84 ---- float[] newValues = new float[4 * n]; for (int i = 0; i < n; i++) { ! newValues[i] = Calc.interpolate(values[i], ! values[n + i], ! values[n2 + i], ! values[n3 + i], ! uMin, ! vMin); ! newValues[n + i] = Calc.interpolate(values[i], ! values[n + i], ! values[n2 + i], ! values[n3 + i], ! uMax, ! vMin); ! newValues[n2 + i] = Calc.interpolate(values[i], ! values[n + i], ! values[n2 + i], ! values[n3 + i], ! uMin, ! vMax); ! newValues[n3 + i] = Calc.interpolate(values[i], ! values[n + i], ! values[n2 + i], ! values[n3 + i], ! uMax, ! vMax); } return new VaryingArrayFloat(declaration, newValues); |
From: Gerardo H. <ma...@us...> - 2007-02-26 19:36:22
|
Update of /cvsroot/jrman/drafts/src/org/jrman/compiler/preprocessor In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30698/src/org/jrman/compiler/preprocessor Modified Files: Token.java TokenList.java Tokenizer.java UnexpectedEndOfFileException.java Log Message: Check for Catmull Clark scheme before trying to instance a Subdivision Mesh. Started reformatting source code to fit in 80 columns, remove tabs and ugly formatting done by Eclipse. Index: TokenList.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/compiler/preprocessor/TokenList.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TokenList.java 27 Jun 2005 05:23:49 -0000 1.1 --- TokenList.java 26 Feb 2007 19:35:46 -0000 1.2 *************** *** 1,19 **** /* ! TokenList.java ! Copyright (C) 2005 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! TokenList.java ! Copyright (C) 2005 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: Token.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/compiler/preprocessor/Token.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Token.java 27 Jun 2005 05:23:49 -0000 1.1 --- Token.java 26 Feb 2007 19:35:46 -0000 1.2 *************** *** 1,19 **** /* ! Token.java ! Copyright (C) 2005 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Token.java ! Copyright (C) 2005 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: Tokenizer.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/compiler/preprocessor/Tokenizer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tokenizer.java 27 Jun 2005 05:23:49 -0000 1.1 --- Tokenizer.java 26 Feb 2007 19:35:46 -0000 1.2 *************** *** 1,19 **** /* ! Tokenizer.java ! Copyright (C) 2005 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Tokenizer.java ! Copyright (C) 2005 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 122,126 **** while ((ch = getNextChar()) != '*') if (ch == -1) ! throw new UnexpectedEndOfFileException("inside /* comment"); ch = getNextChar(); if (ch == '/') { --- 122,127 ---- while ((ch = getNextChar()) != '*') if (ch == -1) ! throw new UnexpectedEndOfFileException( ! "inside /* comment"); ch = getNextChar(); if (ch == '/') { Index: UnexpectedEndOfFileException.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/compiler/preprocessor/UnexpectedEndOfFileException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UnexpectedEndOfFileException.java 27 Jun 2005 05:23:49 -0000 1.1 --- UnexpectedEndOfFileException.java 26 Feb 2007 19:35:46 -0000 1.2 *************** *** 1,19 **** /* ! UnexpectedEndOfFileException.java ! Copyright (C) 2005 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! UnexpectedEndOfFileException.java ! Copyright (C) 2005 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ |
From: Gerardo H. <ma...@us...> - 2007-02-26 19:36:22
|
Update of /cvsroot/jrman/drafts/src/org/jrman/maps In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30698/src/org/jrman/maps Modified Files: MipMap.java ShadowMap.java Log Message: Check for Catmull Clark scheme before trying to instance a Subdivision Mesh. Started reformatting source code to fit in 80 columns, remove tabs and ugly formatting done by Eclipse. Index: ShadowMap.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/maps/ShadowMap.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ShadowMap.java 24 Oct 2004 21:14:38 -0000 1.7 --- ShadowMap.java 26 Feb 2007 19:35:47 -0000 1.8 *************** *** 1,19 **** /* ! ShadowMap.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! ShadowMap.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 56,62 **** public static class Projection { ! public final static Projection PERSPECTIVE = new Projection(1, "perspective"); ! public final static Projection ORTHOGRAPHIC = new Projection(2, "orthographic"); private int code; --- 56,64 ---- public static class Projection { ! public final static Projection PERSPECTIVE = ! new Projection(1, "perspective"); ! public final static Projection ORTHOGRAPHIC = ! new Projection(2, "orthographic"); private int code; *************** *** 74,78 **** Projection result = (Projection) map.get(name); if (result == null) ! throw new IllegalArgumentException("No such ShadowMap projection: " + name); return result; } --- 76,81 ---- Projection result = (Projection) map.get(name); if (result == null) ! throw new IllegalArgumentException("No such ShadowMap projection: " ! + name); return result; } *************** *** 83,87 **** if (code == 2) return ORTHOGRAPHIC; ! throw new IllegalArgumentException("No such ShadowMap projection code: " + code); } --- 86,91 ---- if (code == 2) return ORTHOGRAPHIC; ! throw new IllegalArgumentException("No such ShadowMap proj code: " ! + code); } *************** *** 109,119 **** } ! public static void writeShadowMap( ! String filename, ! Transform worldToCamera, ! Transform cameraToRaster, ! int width, ! int height, ! float[] depths) throws IOException { Transform worldToRaster = cameraToRaster.concat(worldToCamera); --- 113,122 ---- } ! public static void writeShadowMap(String filename, ! Transform worldToCamera, ! Transform cameraToRaster, ! int width, ! int height, ! float[] depths) throws IOException { Transform worldToRaster = cameraToRaster.concat(worldToCamera); *************** *** 187,198 **** } ! public float get( ! Point3f p1, ! Point3f p2, ! float bias, ! int samples, ! float oneOverSamples, ! float blur, ! float halfBlur) { float total = 0f; float dx = p2.x - p1.x + blur; --- 190,200 ---- } ! public float get(Point3f p1, ! Point3f p2, ! float bias, ! int samples, ! float oneOverSamples, ! float blur, ! float halfBlur) { float total = 0f; float dx = p2.x - p1.x + blur; Index: MipMap.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/maps/MipMap.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MipMap.java 24 Oct 2004 21:14:38 -0000 1.7 --- MipMap.java 26 Feb 2007 19:35:47 -0000 1.8 *************** *** 1,19 **** /* ! MipMap.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! MipMap.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 95,99 **** Mode result = (Mode) map.get(name); if (result == null) ! throw new IllegalArgumentException("No such MipMap mode: " + name); return result; } --- 95,100 ---- Mode result = (Mode) map.get(name); if (result == null) ! throw new IllegalArgumentException("No such MipMap mode: " + ! name); return result; } *************** *** 106,110 **** if (code == 3) return PERIODIC; ! throw new IllegalArgumentException("No such MipMap mode code: " + code); } --- 107,112 ---- if (code == 3) return PERIODIC; ! throw new IllegalArgumentException("No such MipMap mode code: " + ! code); } *************** *** 132,162 **** } ! private static byte[] scaleDown( ! byte[] data, ! int size, ! Mode sMode, ! Mode tMode, ! SamplesFilter samplesFilter) { byte[] result = new byte[data.length / 4]; ! samplesFilter.doFilter( ! data, ! size, ! result, ! size / 2, ! size / 2, ! size / 2, ! 2, ! 2, ! sMode, ! tMode); return result; } ! public static void makeMipMap( ! BufferedImage image, ! String filename, ! Mode sMode, ! Mode tMode, ! Filter filter) throws IOException { int largerSide = Math.max(image.getWidth(), image.getHeight()); --- 134,161 ---- } ! private static byte[] scaleDown(byte[] data, ! int size, ! Mode sMode, ! Mode tMode, ! SamplesFilter samplesFilter) { byte[] result = new byte[data.length / 4]; ! samplesFilter.doFilter(data, ! size, ! result, ! size / 2, ! size / 2, ! size / 2, ! 2, ! 2, ! sMode, ! tMode); return result; } ! public static void makeMipMap(BufferedImage image, ! String filename, ! Mode sMode, ! Mode tMode, ! Filter filter) throws IOException { int largerSide = Math.max(image.getWidth(), image.getHeight()); *************** *** 173,178 **** dos.writeByte(tMode.getCode()); AffineTransform af = new AffineTransform(); ! af.scale((float) size / image.getWidth(), (float) size / image.getHeight()); ! AffineTransformOp afop = new AffineTransformOp(af, AffineTransformOp.TYPE_BILINEAR); BufferedImage squareImage = afop.filter(image, null); image = null; // Release memory --- 172,179 ---- dos.writeByte(tMode.getCode()); AffineTransform af = new AffineTransform(); ! af.scale((float) size / image.getWidth(), ! (float) size / image.getHeight()); ! AffineTransformOp afop = ! new AffineTransformOp(af, AffineTransformOp.TYPE_BILINEAR); BufferedImage squareImage = afop.filter(image, null); image = null; // Release memory *************** *** 191,199 **** int width = Calc.ceil(filter.getHorizontalWidth() * 2); int height = Calc.ceil(filter.getVerticalWidth() * 2); ! samplesFilter.init( ! width, ! height, ! filter.getHorizontalWidth(), ! filter.getVerticalWidth()); while (size >= 1) { dos.write(data); --- 192,199 ---- int width = Calc.ceil(filter.getHorizontalWidth() * 2); int height = Calc.ceil(filter.getVerticalWidth() * 2); ! samplesFilter.init(width, ! height, ! filter.getHorizontalWidth(), ! filter.getVerticalWidth()); while (size >= 1) { dos.write(data); *************** *** 204,215 **** } ! public static void makeMipMap( ! String imageFilename, ! String filename, ! Mode sMode, ! Mode tMode, ! String filterType, ! float sWidth, ! float tWidth) throws IOException { flushMipMap(filename); --- 204,214 ---- } ! public static void makeMipMap(String imageFilename, ! String filename, ! Mode sMode, ! Mode tMode, ! String filterType, ! float sWidth, ! float tWidth) throws IOException { flushMipMap(filename); *************** *** 218,227 **** File file = new File(imageFilename); BufferedImage image = ImageIO.read(file); ! makeMipMap( ! image, ! filename, ! sMode, ! tMode, ! new Filter(Filter.Type.getNamed(filterType), sWidth, tWidth)); } --- 217,226 ---- File file = new File(imageFilename); BufferedImage image = ImageIO.read(file); ! makeMipMap(image, ! filename, ! sMode, ! tMode, ! new Filter(Filter.Type.getNamed(filterType), ! sWidth, tWidth)); } *************** *** 274,278 **** } ! private void getDataDirect(int s, int t, int level, int levelSize, float[] data) { int offset = levelOffsets[level]; offset += (t * levelSize + s) * 4; --- 273,278 ---- } ! private void getDataDirect(int s, int t, int level, int levelSize, ! float[] data) { int offset = levelOffsets[level]; offset += (t * levelSize + s) * 4; *************** *** 323,327 **** } ! private void getData(float s, float t, int level, float interp, float[] data) { getData(s, t, level, ll); getData(s, t, level + 1, lh); --- 323,328 ---- } ! private void getData(float s, float t, int level, float interp, ! float[] data) { getData(s, t, level, ll); getData(s, t, level + 1, lh); |
Update of /cvsroot/jrman/drafts/src/org/jrman/parser/keywords In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30698/src/org/jrman/parser/keywords Modified Files: AbstractKeywordParser.java AnyKeywordParser.java BeginEndKeywordParser.java FrameKeywordParser.java KeywordAreaLightSource.java KeywordAtmosphere.java KeywordAttribute.java KeywordAttributeBegin.java KeywordAttributeEnd.java KeywordBasis.java KeywordBegin.java KeywordBlobby.java KeywordBound.java KeywordClipping.java KeywordClippingPlane.java KeywordColor.java KeywordColorSamples.java KeywordConcatTransform.java KeywordCone.java KeywordCoordSysTransform.java KeywordCoordinateSystem.java KeywordCropWindow.java KeywordCurves.java KeywordCylinder.java KeywordDeclare.java KeywordDepthOfField.java KeywordDetail.java KeywordDetailRange.java KeywordDisk.java KeywordDisplacement.java KeywordDisplay.java KeywordEnd.java KeywordErrorHandler.java KeywordExposure.java KeywordExterior.java KeywordFormat.java KeywordFrameAspectRatio.java KeywordFrameBegin.java KeywordFrameEnd.java KeywordGeneralPolygon.java KeywordGeometricApproximation.java KeywordGeometry.java KeywordHider.java KeywordHyperboloid.java KeywordIdentity.java KeywordIlluminate.java KeywordImager.java KeywordInterior.java KeywordLightSource.java KeywordMakeCubeFaceEnvironment.java KeywordMakeLatLongEnvironment.java KeywordMakeShadow.java KeywordMakeTexture.java KeywordMatte.java KeywordMotionBegin.java KeywordMotionEnd.java KeywordNuPatch.java KeywordObjectBegin.java KeywordObjectEnd.java KeywordObjectInstance.java KeywordOpacity.java KeywordOption.java KeywordOrientation.java KeywordParaboloid.java KeywordParser.java KeywordPatch.java KeywordPatchMesh.java KeywordPerspective.java KeywordPixelFilter.java KeywordPixelSamples.java KeywordPixelVariance.java KeywordPoints.java KeywordPointsGeneralPolygons.java KeywordPointsPolygons.java KeywordPolygon.java KeywordProcedural.java KeywordProjection.java KeywordQuantize.java KeywordReadArchive.java KeywordRelativeDetail.java KeywordReverseOrientation.java KeywordRotate.java KeywordScale.java KeywordScreenWindow.java KeywordShadingInterpolation.java KeywordShadingRate.java KeywordShutter.java KeywordSides.java KeywordSkew.java KeywordSolidBegin.java KeywordSolidEnd.java KeywordSphere.java KeywordSubdivisionMesh.java KeywordSurface.java KeywordTextureCoordinates.java KeywordTorus.java KeywordTransform.java KeywordTransformBegin.java KeywordTransformEnd.java KeywordTranslate.java KeywordTrimCurve.java KeywordVersion.java KeywordWorldBegin.java KeywordWorldEnd.java MotionKeywordParser.java MoveableObjectKeywordParser.java ObjectKeywordParser.java OutsideKeywordParser.java SolidKeywordParser.java WorldKeywordParser.java Log Message: Check for Catmull Clark scheme before trying to instance a Subdivision Mesh. Started reformatting source code to fit in 80 columns, remove tabs and ugly formatting done by Eclipse. Index: KeywordImager.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordImager.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** KeywordImager.java 25 Nov 2003 16:34:08 -0000 1.5 --- KeywordImager.java 26 Feb 2007 19:35:49 -0000 1.6 *************** *** 1,19 **** /* ! KeywordImager.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordImager.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: AbstractKeywordParser.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/AbstractKeywordParser.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** AbstractKeywordParser.java 26 Feb 2007 15:25:15 -0000 1.15 --- AbstractKeywordParser.java 26 Feb 2007 19:35:48 -0000 1.16 *************** *** 1,19 **** /* ! AbstractKeywordParser.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! AbstractKeywordParser.java ! Copyright (C) 2003, 2007 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 106,118 **** int found = st.nextToken(); if (found != expected) ! throw new Exception( ! "Parsing error.\n" ! + "Expected: " ! + tokenToString(expected) ! + "\n" ! + "Found: " ! + tokenToString(found)); } ! protected Bounds3f readBounds(Tokenizer st) throws Exception { boolean array = false; --- 106,117 ---- int found = st.nextToken(); if (found != expected) ! throw new Exception("Parsing error.\n" ! + "Expected: " ! + tokenToString(expected) ! + "\n" ! + "Found: " ! + tokenToString(found)); } ! protected Bounds3f readBounds(Tokenizer st) throws Exception { boolean array = false; *************** *** 201,205 **** match(st, TK_RBRACE); // Renderman uses row vectors and Java3D uses column vectors.... ! Matrix4f transform = new Matrix4f(a, e, i, m, b, f, j, n, c, g, k, o, d, h, l, p); return transform; } --- 200,207 ---- match(st, TK_RBRACE); // Renderman uses row vectors and Java3D uses column vectors.... ! Matrix4f transform = new Matrix4f(a, e, i, m, ! b, f, j, n, ! c, g, k, o, ! d, h, l, p); return transform; } Index: KeywordCoordSysTransform.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordCoordSysTransform.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordCoordSysTransform.java 7 Apr 2003 08:24:31 -0000 1.3 --- KeywordCoordSysTransform.java 26 Feb 2007 19:35:48 -0000 1.4 *************** *** 1,19 **** /* ! KeywordCoordSysTransform.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordCoordSysTransform.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordReverseOrientation.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordReverseOrientation.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KeywordReverseOrientation.java 7 Apr 2003 08:24:22 -0000 1.2 --- KeywordReverseOrientation.java 26 Feb 2007 19:35:50 -0000 1.3 *************** *** 1,19 **** /* ! KeywordReverseOrientation.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordReverseOrientation.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordClipping.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordClipping.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordClipping.java 11 Apr 2003 04:22:33 -0000 1.3 --- KeywordClipping.java 26 Feb 2007 19:35:48 -0000 1.4 *************** *** 1,19 **** /* ! KeywordClipping.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordClipping.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordTransformEnd.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordTransformEnd.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordTransformEnd.java 11 May 2003 02:53:43 -0000 1.3 --- KeywordTransformEnd.java 26 Feb 2007 19:35:50 -0000 1.4 *************** *** 1,19 **** /* ! KeywordTransformEnd.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordTransformEnd.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordAttributeBegin.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordAttributeBegin.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KeywordAttributeBegin.java 7 Apr 2003 08:24:31 -0000 1.2 --- KeywordAttributeBegin.java 26 Feb 2007 19:35:48 -0000 1.3 *************** *** 1,19 **** /* ! KeywordAttributeBegin.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordAttributeBegin.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordLightSource.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordLightSource.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** KeywordLightSource.java 25 Nov 2003 16:34:08 -0000 1.4 --- KeywordLightSource.java 26 Feb 2007 19:35:49 -0000 1.5 *************** *** 1,19 **** /* ! KeywordLightSource.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordLightSource.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordCurves.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordCurves.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordCurves.java 20 Dec 2004 03:22:52 -0000 1.3 --- KeywordCurves.java 26 Feb 2007 19:35:49 -0000 1.4 *************** *** 1,19 **** /* ! KeywordCurves.java ! Copyright (C) 2003, 2004 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordCurves.java ! Copyright (C) 2003, 2004 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordSphere.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordSphere.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** KeywordSphere.java 25 Nov 2003 16:34:08 -0000 1.4 --- KeywordSphere.java 26 Feb 2007 19:35:50 -0000 1.5 *************** *** 1,19 **** /* ! KeywordSphere.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordSphere.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordDetail.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordDetail.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordDetail.java 9 Apr 2003 05:04:58 -0000 1.3 --- KeywordDetail.java 26 Feb 2007 19:35:49 -0000 1.4 *************** *** 1,19 **** /* ! KeywordDetail.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordDetail.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordPointsPolygons.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordPointsPolygons.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** KeywordPointsPolygons.java 26 Feb 2007 15:25:15 -0000 1.8 --- KeywordPointsPolygons.java 26 Feb 2007 19:35:50 -0000 1.9 *************** *** 1,19 **** /* ! KeywordPointsPolygons.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordPointsPolygons.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordPixelSamples.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordPixelSamples.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordPixelSamples.java 11 Apr 2003 22:23:11 -0000 1.3 --- KeywordPixelSamples.java 26 Feb 2007 19:35:50 -0000 1.4 *************** *** 1,19 **** /* ! KeywordPixelSamples.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordPixelSamples.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordSkew.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordSkew.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordSkew.java 11 May 2003 02:53:43 -0000 1.3 --- KeywordSkew.java 26 Feb 2007 19:35:50 -0000 1.4 *************** *** 1,19 **** /* ! KeywordSkew.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordSkew.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordNuPatch.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordNuPatch.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** KeywordNuPatch.java 26 Feb 2007 15:25:15 -0000 1.4 --- KeywordNuPatch.java 26 Feb 2007 19:35:50 -0000 1.5 *************** *** 1,19 **** /* ! KeywordNuPatch.java ! Copyright (C) 2003, 2006, 2007 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordNuPatch.java ! Copyright (C) 2003, 2006, 2007 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordTextureCoordinates.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordTextureCoordinates.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordTextureCoordinates.java 8 Apr 2004 21:29:26 -0000 1.3 --- KeywordTextureCoordinates.java 26 Feb 2007 19:35:50 -0000 1.4 *************** *** 1,19 **** /* ! KeywordTextureCoordinates.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordTextureCoordinates.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordGeneralPolygon.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordGeneralPolygon.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KeywordGeneralPolygon.java 7 Apr 2003 08:24:30 -0000 1.2 --- KeywordGeneralPolygon.java 26 Feb 2007 19:35:49 -0000 1.3 *************** *** 1,19 **** /* ! KeywordGeneralPolygon.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordGeneralPolygon.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordBasis.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordBasis.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordBasis.java 9 Apr 2003 05:04:58 -0000 1.3 --- KeywordBasis.java 26 Feb 2007 19:35:48 -0000 1.4 *************** *** 1,19 **** /* ! KeywordBasis.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordBasis.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 55,60 **** Matrix4f matrix = readMatrix(st); result = new Basis(matrix); ! } ! else{ // Expect basis name match(st, TK_STRING); --- 55,59 ---- Matrix4f matrix = readMatrix(st); result = new Basis(matrix); ! } else { // Expect basis name match(st, TK_STRING); Index: KeywordPixelVariance.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordPixelVariance.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordPixelVariance.java 11 Apr 2003 22:23:11 -0000 1.3 --- KeywordPixelVariance.java 26 Feb 2007 19:35:50 -0000 1.4 *************** *** 1,19 **** /* ! KeywordPixelVariance.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordPixelVariance.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: AnyKeywordParser.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/AnyKeywordParser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AnyKeywordParser.java 6 Apr 2003 18:49:54 -0000 1.1 --- AnyKeywordParser.java 26 Feb 2007 19:35:48 -0000 1.2 *************** *** 1,19 **** /* ! AnyKeywordParser.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! AnyKeywordParser.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordDisplacement.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordDisplacement.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** KeywordDisplacement.java 25 Nov 2003 16:34:08 -0000 1.4 --- KeywordDisplacement.java 26 Feb 2007 19:35:49 -0000 1.5 *************** *** 1,19 **** /* ! KeywordDisplacement.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordDisplacement.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: OutsideKeywordParser.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/OutsideKeywordParser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OutsideKeywordParser.java 6 Apr 2003 18:49:54 -0000 1.1 --- OutsideKeywordParser.java 26 Feb 2007 19:35:51 -0000 1.2 *************** *** 1,19 **** /* ! OutsideKeywordParser.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! OutsideKeywordParser.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordMatte.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordMatte.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KeywordMatte.java 7 Apr 2003 08:24:31 -0000 1.2 --- KeywordMatte.java 26 Feb 2007 19:35:49 -0000 1.3 *************** *** 1,19 **** /* ! KeywordMatte.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordMatte.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordMotionEnd.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordMotionEnd.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KeywordMotionEnd.java 7 Apr 2003 08:24:31 -0000 1.2 --- KeywordMotionEnd.java 26 Feb 2007 19:35:50 -0000 1.3 *************** *** 1,19 **** /* ! KeywordMotionEnd.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordMotionEnd.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordDetailRange.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordDetailRange.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KeywordDetailRange.java 7 Apr 2003 08:24:30 -0000 1.2 --- KeywordDetailRange.java 26 Feb 2007 19:35:49 -0000 1.3 *************** *** 1,19 **** /* ! KeywordDetailRange.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordDetailRange.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 52,56 **** match(st, TK_RBRACE); ! parser.setDetailRange(minVisible, lowerTransition, upperTransition, maxVisible); } --- 52,57 ---- match(st, TK_RBRACE); ! parser.setDetailRange(minVisible, lowerTransition, upperTransition, ! maxVisible); } Index: KeywordScreenWindow.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordScreenWindow.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordScreenWindow.java 11 Apr 2003 04:22:33 -0000 1.3 --- KeywordScreenWindow.java 26 Feb 2007 19:35:50 -0000 1.4 *************** *** 1,19 **** /* ! KeywordScreenWindow.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordScreenWindow.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: KeywordDeclare.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordDeclare.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordDeclare.java 7 Apr 2003 08:24:26 -0000 1.3 --- KeywordDeclare.java 26 Feb 2007 19:35:49 -0000 1.4 *************** *** 1,19 **** /* ! KeywordDeclare.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! KeywordDeclare.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You ... [truncated message content] |
From: Gerardo H. <ma...@us...> - 2007-02-26 19:36:00
|
Update of /cvsroot/jrman/drafts/src/org/jrman/shaders In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30698/src/org/jrman/shaders Modified Files: DisplacementBumpy.java DisplacementShader.java Imager.java LightAmbientlight.java LightDistantlight.java Log Message: Check for Catmull Clark scheme before trying to instance a Subdivision Mesh. Started reformatting source code to fit in 80 columns, remove tabs and ugly formatting done by Eclipse. Index: LightAmbientlight.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/shaders/LightAmbientlight.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LightAmbientlight.java 25 Nov 2003 16:34:08 -0000 1.3 --- LightAmbientlight.java 26 Feb 2007 19:35:52 -0000 1.4 *************** *** 1,19 **** /* ! LightAmbientlight.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! LightAmbientlight.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 38,44 **** protected void initDefaults() { defaultParameters.addParameter( ! new UniformScalarFloat(new Declaration("intensity", "uniform float"), 1f)); defaultParameters.addParameter( ! new UniformScalarTuple3f(new Declaration("lightcolor", "uniform color"), 1f, 1f, 1f)); } --- 38,48 ---- protected void initDefaults() { defaultParameters.addParameter( ! new UniformScalarFloat(new Declaration("intensity", ! "uniform float"), ! 1f)); defaultParameters.addParameter( ! new UniformScalarTuple3f(new Declaration("lightcolor", ! "uniform color"), ! 1f, 1f, 1f)); } *************** *** 47,55 **** } ! public boolean shade(ShaderVariables sv, Point3fGrid P, Vector3fGrid N, float angle) { super.shade(sv, P, N, angle); ! UniformScalarFloat paramIntensity = (UniformScalarFloat) getParameter(sv, "intensity"); float intensity = paramIntensity.getValue(); ! UniformScalarTuple3f paramLightcolor = (UniformScalarTuple3f) getParameter(sv, "lightcolor"); paramLightcolor.getValue(c1); c1.x *= intensity; --- 51,62 ---- } ! public boolean shade(ShaderVariables sv, Point3fGrid P, Vector3fGrid N, ! float angle) { super.shade(sv, P, N, angle); ! UniformScalarFloat paramIntensity = ! (UniformScalarFloat) getParameter(sv, "intensity"); float intensity = paramIntensity.getValue(); ! UniformScalarTuple3f paramLightcolor = ! (UniformScalarTuple3f) getParameter(sv, "lightcolor"); paramLightcolor.getValue(c1); c1.x *= intensity; Index: Imager.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/shaders/Imager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Imager.java 25 Nov 2003 16:34:08 -0000 1.3 --- Imager.java 26 Feb 2007 19:35:52 -0000 1.4 *************** *** 1,19 **** /* ! Imager.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Imager.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: DisplacementBumpy.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/shaders/DisplacementBumpy.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DisplacementBumpy.java 13 Apr 2004 20:37:03 -0000 1.6 --- DisplacementBumpy.java 26 Feb 2007 19:35:52 -0000 1.7 *************** *** 1,20 **** /* ! DisplacementBumpy.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ package org.jrman.shaders; import org.jrman.grid.FloatGrid; --- 1,21 ---- /* ! DisplacementBumpy.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ + package org.jrman.shaders; import org.jrman.grid.FloatGrid; *************** *** 38,54 **** new UniformScalarFloat(new Declaration("Km", "uniform float"), 1f)); defaultParameters.addParameter( ! new UniformScalarString(new Declaration("texturename", "string"), "")); defaultParameters.addParameter( ! new UniformScalarFloat(new Declaration("blur", "uniform float"),0f)); } public void shade(ShaderVariables sv) { super.shade(sv); ! UniformScalarFloat paramKm = (UniformScalarFloat) getParameter(sv, "Km"); final float Km = paramKm.getValue(); UniformScalarString paramTexturename = (UniformScalarString) getParameter(sv, "texturename"); final String texturename = paramTexturename.getValue(); ! UniformScalarFloat paramBlur = (UniformScalarFloat) getParameter(sv, "blur"); final float blur = paramBlur.getValue(); if (!texturename.equals("")) --- 39,59 ---- new UniformScalarFloat(new Declaration("Km", "uniform float"), 1f)); defaultParameters.addParameter( ! new UniformScalarString(new Declaration("texturename", "string"), ! "")); defaultParameters.addParameter( ! new UniformScalarFloat(new Declaration("blur", "uniform float"), ! 0f)); } public void shade(ShaderVariables sv) { super.shade(sv); ! UniformScalarFloat paramKm = ! (UniformScalarFloat) getParameter(sv, "Km"); final float Km = paramKm.getValue(); UniformScalarString paramTexturename = (UniformScalarString) getParameter(sv, "texturename"); final String texturename = paramTexturename.getValue(); ! UniformScalarFloat paramBlur = ! (UniformScalarFloat) getParameter(sv, "blur"); final float blur = paramBlur.getValue(); if (!texturename.equals("")) Index: DisplacementShader.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/shaders/DisplacementShader.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DisplacementShader.java 11 Jan 2006 06:23:23 -0000 1.7 --- DisplacementShader.java 26 Feb 2007 19:35:52 -0000 1.8 *************** *** 1,19 **** /* ! DisplacementShader.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! DisplacementShader.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 39,45 **** DisplacementShader result; String className = ! "Displacement" + name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase(); try { ! result = (DisplacementShader) Class.forName(className).newInstance(); } catch (Exception e) { try { --- 39,47 ---- DisplacementShader result; String className = ! "Displacement" + name.substring(0, 1).toUpperCase() + ! name.substring(1).toLowerCase(); try { ! result = (DisplacementShader) ! Class.forName(className).newInstance(); } catch (Exception e) { try { *************** *** 49,53 **** .newInstance(); } catch (Exception e2) { ! throw new IllegalArgumentException("Unknown displacement shader: " + name); } } --- 51,56 ---- .newInstance(); } catch (Exception e2) { ! throw new IllegalArgumentException("Unknown displacement shader: " ! + name); } } Index: LightDistantlight.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/shaders/LightDistantlight.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LightDistantlight.java 16 Sep 2004 04:16:42 -0000 1.5 --- LightDistantlight.java 26 Feb 2007 19:35:52 -0000 1.6 *************** *** 1,19 **** /* ! LightDistantlight.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! LightDistantlight.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ |
Update of /cvsroot/jrman/drafts/src/org/jrman/render In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30698/src/org/jrman/render Modified Files: Bucket.java DummyBucket.java ImageStore.java MemoryBucket.java Micropolygon.java RenderCanvas.java Renderer.java RendererBoundingBox.java RendererHidden.java RendererNull.java Sample.java SamplePoint.java Sampler.java ShaderVariables.java SimpleMicropolygon.java SmoothMicropolygon.java ZStore.java Log Message: Check for Catmull Clark scheme before trying to instance a Subdivision Mesh. Started reformatting source code to fit in 80 columns, remove tabs and ugly formatting done by Eclipse. Index: ZStore.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/ZStore.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ZStore.java 17 Aug 2003 22:05:39 -0000 1.1 --- ZStore.java 26 Feb 2007 19:35:52 -0000 1.2 *************** *** 1,19 **** /* ! ZStore.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! ZStore.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 35,39 **** } ! public void setDepths(float[] bucketDepths, int x, int y, int w, int h, int rowLength) { for (int row = 0; row < h; row++) { if (y + row < 0 || y + row >= vSize) --- 35,40 ---- } ! public void setDepths(float[] bucketDepths, int x, int y, ! int w, int h, int rowLength) { for (int row = 0; row < h; row++) { if (y + row < 0 || y + row >= vSize) Index: Bucket.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/Bucket.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Bucket.java 1 Feb 2007 20:30:14 -0000 1.12 --- Bucket.java 26 Feb 2007 19:35:52 -0000 1.13 *************** *** 1,19 **** /* ! Bucket.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Bucket.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: ShaderVariables.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/ShaderVariables.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ShaderVariables.java 6 Jul 2005 22:53:24 -0000 1.14 --- ShaderVariables.java 26 Feb 2007 19:35:52 -0000 1.15 *************** *** 1,19 **** /* ! ShaderVariables.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! ShaderVariables.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 116,148 **** Color3f[] c = (Color3f[]) Ci.data; Color3f[] o = (Color3f[]) Oi.data; ! if (attributes.getShadingInterpolation() == ShadingInterpolation.CONSTANT) { for (int col = 0; col < columns - 1; col++) for (int row = 0; row < rows - 1; row++) { int offset = row * columns + col; SimpleMicropolygon mp = new SimpleMicropolygon(); ! if (mp ! .init( ! p[offset], ! p[offset + 1], ! p[offset + columns], ! c[offset].x, ! c[offset].y, ! c[offset].z, ! o[offset].x, ! o[offset].y, ! o[offset].z)) rh.addToBuckets(mp); mp = new SimpleMicropolygon(); ! if (mp ! .init( ! p[offset + columns + 1], ! p[offset + 1], ! p[offset + columns], ! c[offset + columns + 1].x, ! c[offset + columns + 1].y, ! c[offset + columns + 1].z, ! o[offset + columns + 1].x, ! o[offset + columns + 1].y, ! o[offset + columns + 1].z)) rh.addToBuckets(mp); } --- 116,145 ---- Color3f[] c = (Color3f[]) Ci.data; Color3f[] o = (Color3f[]) Oi.data; ! if (attributes.getShadingInterpolation() == ! ShadingInterpolation.CONSTANT) { for (int col = 0; col < columns - 1; col++) for (int row = 0; row < rows - 1; row++) { int offset = row * columns + col; SimpleMicropolygon mp = new SimpleMicropolygon(); ! if (mp.init(p[offset], ! p[offset + 1], ! p[offset + columns], ! c[offset].x, ! c[offset].y, ! c[offset].z, ! o[offset].x, ! o[offset].y, ! o[offset].z)) rh.addToBuckets(mp); mp = new SimpleMicropolygon(); ! if (mp.init(p[offset + columns + 1], ! p[offset + 1], ! p[offset + columns], ! c[offset + columns + 1].x, ! c[offset + columns + 1].y, ! c[offset + columns + 1].z, ! o[offset + columns + 1].x, ! o[offset + columns + 1].y, ! o[offset + columns + 1].z)) rh.addToBuckets(mp); } *************** *** 152,203 **** int offset = row * columns + col; SmoothMicropolygon mp = new SmoothMicropolygon(); ! if (mp ! .init( ! p[offset], ! p[offset + 1], ! p[offset + columns], ! c[offset].x, ! c[offset].y, ! c[offset].z, ! c[offset + 1].x, ! c[offset + 1].y, ! c[offset + 1].z, ! c[offset + columns].x, ! c[offset + columns].y, ! c[offset + columns].z, ! o[offset].x, ! o[offset].y, ! o[offset].z, ! o[offset + 1].x, ! o[offset + 1].y, ! o[offset + 1].z, ! o[offset + columns].x, ! o[offset + columns].y, ! o[offset + columns].z)) rh.addToBuckets(mp); mp = new SmoothMicropolygon(); ! if (mp ! .init( ! p[offset + columns + 1], ! p[offset + 1], ! p[offset + columns], ! c[offset + columns + 1].x, ! c[offset + columns + 1].y, ! c[offset + columns + 1].z, ! c[offset + 1].x, ! c[offset + 1].y, ! c[offset + 1].z, ! c[offset + columns].x, ! c[offset + columns].y, ! c[offset + columns].z, ! o[offset + columns + 1].x, ! o[offset + columns + 1].y, ! o[offset + columns + 1].z, ! o[offset + 1].x, ! o[offset + 1].y, ! o[offset + 1].z, ! o[offset + columns].x, ! o[offset + columns].y, ! o[offset + columns].z)) rh.addToBuckets(mp); } --- 149,196 ---- int offset = row * columns + col; SmoothMicropolygon mp = new SmoothMicropolygon(); ! if (mp.init(p[offset], ! p[offset + 1], ! p[offset + columns], ! c[offset].x, ! c[offset].y, ! c[offset].z, ! c[offset + 1].x, ! c[offset + 1].y, ! c[offset + 1].z, ! c[offset + columns].x, ! c[offset + columns].y, ! c[offset + columns].z, ! o[offset].x, ! o[offset].y, ! o[offset].z, ! o[offset + 1].x, ! o[offset + 1].y, ! o[offset + 1].z, ! o[offset + columns].x, ! o[offset + columns].y, ! o[offset + columns].z)) rh.addToBuckets(mp); mp = new SmoothMicropolygon(); ! if (mp.init(p[offset + columns + 1], ! p[offset + 1], ! p[offset + columns], ! c[offset + columns + 1].x, ! c[offset + columns + 1].y, ! c[offset + columns + 1].z, ! c[offset + 1].x, ! c[offset + 1].y, ! c[offset + 1].z, ! c[offset + columns].x, ! c[offset + columns].y, ! c[offset + columns].z, ! o[offset + columns + 1].x, ! o[offset + columns + 1].y, ! o[offset + columns + 1].z, ! o[offset + 1].x, ! o[offset + 1].y, ! o[offset + 1].z, ! o[offset + columns].x, ! o[offset + columns].y, ! o[offset + columns].z)) rh.addToBuckets(mp); } Index: Micropolygon.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/Micropolygon.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Micropolygon.java 13 Jul 2005 04:13:40 -0000 1.22 --- Micropolygon.java 26 Feb 2007 19:35:52 -0000 1.23 *************** *** 1,19 **** /* ! Micropolygon.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! Micropolygon.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ Index: Sampler.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/Sampler.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Sampler.java 24 Dec 2006 05:25:57 -0000 1.28 --- Sampler.java 26 Feb 2007 19:35:52 -0000 1.29 *************** *** 72,76 **** public static class MaskElement { - float z; --- 72,75 ---- *************** *** 84,88 **** count = 0; } - } --- 83,86 ---- *************** *** 104,109 **** for (int row = 0; row < height; row++) for (int column = 0; column < width; column++) ! samplePoints[row * width + column] = new SamplePoint(this, ! column / pixelWidth + (row / pixelHeight) * bucketWidth); pixelsVisibility = new MaskElement[bucketWidth * bucketHeight]; for (int i = 0; i < pixelsVisibility.length; i++) --- 102,109 ---- for (int row = 0; row < height; row++) for (int column = 0; column < width; column++) ! samplePoints[row * width + column] = ! new SamplePoint(this, ! column / pixelWidth + ! (row / pixelHeight) * bucketWidth); pixelsVisibility = new MaskElement[bucketWidth * bucketHeight]; for (int i = 0; i < pixelsVisibility.length; i++) *************** *** 141,145 **** public void getColors(float[] dst, int dstOffset, int rowLength, int bands, ! int bandOffset) { int destOffset = dstOffset + bandOffset; rowLength *= bands; --- 141,145 ---- public void getColors(float[] dst, int dstOffset, int rowLength, int bands, ! int bandOffset) { int destOffset = dstOffset + bandOffset; rowLength *= bands; Index: ImageStore.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/ImageStore.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ImageStore.java 20 Dec 2003 15:35:05 -0000 1.7 --- ImageStore.java 26 Feb 2007 19:35:52 -0000 1.8 *************** *** 1,19 **** /* ! ImageStore.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! ImageStore.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 41,51 **** this.vSize = vSize; if (display.getMode() == Display.Mode.RGB) ! image = new BufferedImage(hSize, vSize, BufferedImage.TYPE_INT_RGB); else ! image = new BufferedImage(hSize, vSize, BufferedImage.TYPE_INT_ARGB); raster = image.getRaster(); } ! public void setPixels(int[] pixels, int x, int y, int w, int h, int rowLength) { for (int row = 0; row < h; row++) { if (y + row < 0 || y + row >= vSize) --- 41,54 ---- this.vSize = vSize; if (display.getMode() == Display.Mode.RGB) ! image = new BufferedImage(hSize, vSize, ! BufferedImage.TYPE_INT_RGB); else ! image = new BufferedImage(hSize, vSize, ! BufferedImage.TYPE_INT_ARGB); raster = image.getRaster(); } ! public void setPixels(int[] pixels, int x, int y, int w, int h, ! int rowLength) { for (int row = 0; row < h; row++) { if (y + row < 0 || y + row >= vSize) Index: MemoryBucket.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/MemoryBucket.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** MemoryBucket.java 20 Feb 2007 03:33:36 -0000 1.12 --- MemoryBucket.java 26 Feb 2007 19:35:52 -0000 1.13 *************** *** 1,19 **** /* ! MemoryBucket.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ --- 1,19 ---- /* ! MemoryBucket.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez ! ! This program is free software; you can redistribute it and/or ! modify it under the terms of the GNU General Public License ! as published by the Free Software Foundation; either version 2 ! of the License, or (at your option) any later version. ! ! 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 A 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. */ *************** *** 85,89 **** tmp = new Micropolygon[1024]; else ! tmp = new Micropolygon[micropolygonCount * 2]; System.arraycopy(micropolygons, 0, tmp, 0, micropolygonCount); micropolygons = tmp; --- 85,89 ---- tmp = new Micropolygon[1024]; else ! tmp = new Micropolygon[micropolygonCount * 2]; System.arraycopy(micropolygons, 0, tmp, 0, micropolygonCount); micropolygons = tmp; Index: RendererHidden.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/RendererHidden.java,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** RendererHidden.java 26 Feb 2007 15:25:15 -0000 1.79 --- RendererHidden.java 26 Feb 2007 19:35:52 -0000 1.80 *************** *** 124,131 **** Transform screenToRaster = Global.getTransform("raster"); if (cameraToScreen instanceof PerspectiveTransform) ! cameraToRaster = ((PerspectiveTransform) cameraToScreen).preConcat(screenToRaster); else cameraToRaster = screenToRaster.concat(cameraToScreen); ! eyePlane = Plane.createWithPointAndNormal(new Point3f(), new Vector3f(0f, 0f, -1f)); createClippingVolume(); createBuckets(); --- 124,133 ---- Transform screenToRaster = Global.getTransform("raster"); if (cameraToScreen instanceof PerspectiveTransform) ! cameraToRaster = ! ((PerspectiveTransform) cameraToScreen).preConcat(screenToRaster); else cameraToRaster = screenToRaster.concat(cameraToScreen); ! eyePlane = Plane.createWithPointAndNormal(new Point3f(), ! new Vector3f(0f, 0f, -1f)); createClippingVolume(); createBuckets(); *************** *** 139,147 **** } ! private void internalAddPrimitive( ! Primitive primitive, ! int curColumn, ! int curRow, ! boolean check) { Transform objectToCamera = primitive.getObjectToCamera(); if (objectToCamera == null) { --- 141,148 ---- } ! private void internalAddPrimitive(Primitive primitive, ! int curColumn, ! int curRow, ! boolean check) { Transform objectToCamera = primitive.getObjectToCamera(); if (objectToCamera == null) { *************** *** 156,170 **** primitive.setObjectToCamera(objectToCamera); } ! if (!addPrimitive(primitive, 0, objectToCamera, curColumn, curRow, check)) ! System.err.println("Can't split primitive at eye plane: " + primitive); } ! private boolean addPrimitive( ! Primitive primitive, ! int recursionLevel, ! Transform objectToCamera, ! int curColumn, ! int curRow, ! boolean check) { BoundingVolume bv = primitive.getBoundingVolume(); float db = primitive.getAttributes().getDisplacementBound(); --- 157,172 ---- primitive.setObjectToCamera(objectToCamera); } ! if (!addPrimitive(primitive, 0, objectToCamera, curColumn, curRow, ! check)) ! System.err.println("Can't split primitive at eye plane: " + ! primitive); } ! private boolean addPrimitive(Primitive primitive, ! int recursionLevel, ! Transform objectToCamera, ! int curColumn, ! int curRow, ! boolean check) { BoundingVolume bv = primitive.getBoundingVolume(); float db = primitive.getAttributes().getDisplacementBound(); *************** *** 194,213 **** for (int i = 0; i < sub.length; i++) if (!addPrimitive(sub[i], ! recursionLevel + 1, ! objectToCamera, ! curColumn, ! curRow, ! check)) result = false; return result; } ! private void placeInBucket( ! Primitive primitive, ! BoundingVolume bve, ! BoundingVolume bv, ! int column, ! int row, ! boolean check) { primitive.setDistance(bve.getMinZ()); bve = bve.transform(cameraToRaster); --- 196,214 ---- for (int i = 0; i < sub.length; i++) if (!addPrimitive(sub[i], ! recursionLevel + 1, ! objectToCamera, ! curColumn, ! curRow, ! check)) result = false; return result; } ! private void placeInBucket(Primitive primitive, ! BoundingVolume bve, ! BoundingVolume bv, ! int column, ! int row, ! boolean check) { primitive.setDistance(bve.getMinZ()); bve = bve.transform(cameraToRaster); *************** *** 226,234 **** } ! private void doPlaceInBucket( ! Primitive primitive, ! int curColumn, ! int curRow, ! boolean check) { Bounds2f bounds = primitive.getRasterBounds(); if (!bounds.intersects(rasterWindow)) --- 227,234 ---- } ! private void doPlaceInBucket(Primitive primitive, ! int curColumn, ! int curRow, ! boolean check) { Bounds2f bounds = primitive.getRasterBounds(); if (!bounds.intersects(rasterWindow)) *************** *** 236,250 **** float minX = bounds.getMinX() - rasterWindow.getMinX(); float minY = bounds.getMinY() - rasterWindow.getMinY(); ! int column = Calc.clamp((int) (minX / bucketWidth), 0, bucketColumns - 1); int row = Calc.clamp((int) (minY / bucketHeight), 0, bucketRows - 1); if (check && row <= curRow) { float maxY = bounds.getMaxY() - rasterWindow.getMinY(); ! int maxRow = Calc.clamp((int) Math.ceil(maxY / bucketHeight), 0, bucketRows - 1); if (maxRow < curRow) return; row = curRow; float maxX = bounds.getMaxX() - rasterWindow.getMinX(); ! int maxColumn = ! Calc.clamp((int) Math.ceil(maxX / bucketWidth), 0, bucketColumns - 1); if (column <= curColumn && curColumn <= maxColumn) { getBucket(curColumn, curRow).addPrimitive(primitive); --- 236,252 ---- float minX = bounds.getMinX() - rasterWindow.getMinX(); float minY = bounds.getMinY() - rasterWindow.getMinY(); ! int column = Calc.clamp((int) (minX / bucketWidth), 0, ! bucketColumns - 1); int row = Calc.clamp((int) (minY / bucketHeight), 0, bucketRows - 1); if (check && row <= curRow) { float maxY = bounds.getMaxY() - rasterWindow.getMinY(); ! int maxRow = Calc.clamp((int) Math.ceil(maxY / bucketHeight), 0, ! bucketRows - 1); if (maxRow < curRow) return; row = curRow; float maxX = bounds.getMaxX() - rasterWindow.getMinX(); ! int maxColumn = Calc.clamp((int) Math.ceil(maxX / bucketWidth), 0, ! bucketColumns - 1); if (column <= curColumn && curColumn <= maxColumn) { getBucket(curColumn, curRow).addPrimitive(primitive); *************** *** 263,267 **** public void addToBuckets(Micropolygon mp) { ! if (mp.getMaxX() < rasterWindowMin.x || mp.getMaxY() < rasterWindowMin.y) return; float mpMinX = mp.getMinX() - rasterWindowMin.x; --- 265,270 ---- public void addToBuckets(Micropolygon mp) { ! if (mp.getMaxX() < rasterWindowMin.x || ! mp.getMaxY() < rasterWindowMin.y) return; float mpMinX = mp.getMinX() - rasterWindowMin.x; *************** *** 275,279 **** for (int col = minColumn; col <= maxColumn; col++) for (int row = minRow; row <= maxRow; row++) ! if (col >= 0 && col < bucketColumns && row >= 0 && row < bucketRows) getBucket(col, row).addMicropolygon(mp); } --- 278,283 ---- for (int col = minColumn; col <= maxColumn; col++) for (int row = minRow; row <= maxRow; row++) ! if (col >= 0 && col < bucketColumns && row >= 0 && ! row < bucketRows) getBucket(col, row).addMicropolygon(mp); } *************** *** 296,335 **** Display.Type displayType = frame.getDisplay().getType(); ImageStore imageStore = ! new ImageStore( ! frame.getHorizontalResolution(), ! frame.getVerticalResolution(), ! frame.getDisplay()); ZStore zStore = null; if (displayMode == Display.Mode.Z) { ! zStore = ! new ZStore(frame.getHorizontalResolution(), frame.getVerticalResolution()); ShadowMap.flushShadowMap(frame.getDisplay().getName()); } Framebuffer fb = null; ! if (displayType == Display.Type.FRAMEBUFFER || frame.isFramebufferAlways()) { ! fb = new Framebuffer(frame.getDisplay().getName(), imageStore.getImage()); fb.setVisible(true); } int gridSize = frame.getGridSize(); ! ShaderVariables shaderVariables = new ShaderVariables(worldToCamera.getInverse()); int gridCount = 0; ! Sampler sampler = ! new Sampler( ! bucketWidth, ! bucketHeight, ! frame.getHorizontalSamplingRate(), ! frame.getVerticalSamplingRate()); Filter filter = frame.getFilter(); ! samplesFilter.init( ! (int) Math.ceil(filter.getHorizontalWidth() * sampler.getPixelWidth()), ! (int) Math.ceil(filter.getVerticalWidth() * sampler.getPixelHeight()), filter.getHorizontalWidth(), filter.getVerticalWidth()); ! float[] samples = ! new float[sampler.getWidth() ! * bucketColumns ! * (sampler.getHeight() + vFilterExtra + vPixelLess * sampler.getPixelHeight()) ! * 4]; float[] filteredSamples = new float[bucketWidth * bucketHeight * 4]; int[] pixels = new int[bucketWidth * bucketHeight]; --- 300,339 ---- Display.Type displayType = frame.getDisplay().getType(); ImageStore imageStore = ! new ImageStore(frame.getHorizontalResolution(), ! frame.getVerticalResolution(), ! frame.getDisplay()); ZStore zStore = null; if (displayMode == Display.Mode.Z) { ! zStore = new ZStore(frame.getHorizontalResolution(), ! frame.getVerticalResolution()); ShadowMap.flushShadowMap(frame.getDisplay().getName()); } Framebuffer fb = null; ! if (displayType == Display.Type.FRAMEBUFFER || ! frame.isFramebufferAlways()) { ! fb = new Framebuffer(frame.getDisplay().getName(), ! imageStore.getImage()); fb.setVisible(true); } int gridSize = frame.getGridSize(); ! ShaderVariables shaderVariables = ! new ShaderVariables(worldToCamera.getInverse()); int gridCount = 0; ! Sampler sampler = new Sampler(bucketWidth, ! bucketHeight, ! frame.getHorizontalSamplingRate(), ! frame.getVerticalSamplingRate()); Filter filter = frame.getFilter(); ! samplesFilter.init((int) Math.ceil(filter.getHorizontalWidth() * ! sampler.getPixelWidth()), ! (int) Math.ceil(filter.getVerticalWidth() * ! sampler.getPixelHeight()), filter.getHorizontalWidth(), filter.getVerticalWidth()); ! float[] samples = new float[sampler.getWidth() * bucketColumns ! * (sampler.getHeight() + vFilterExtra + ! vPixelLess * sampler.getPixelHeight()) ! * 4]; float[] filteredSamples = new float[bucketWidth * bucketHeight * 4]; int[] pixels = new int[bucketWidth * bucketHeight]; *************** *** 370,384 **** if (surface == null) surface = ! SurfaceShader.createShader( ! "fakedlight", ! new ParameterList(), ! attr); surface.shade(shaderVariables); VolumeShader vs = attr.getAtmosphere(); if (vs != null) ! vs.shade( ! shaderVariables, ! frame.getNearClipping(), ! frame.getFarClipping()); shaderVariables.transform(cameraToRaster); shaderVariables.getMicropolygons(this); --- 374,386 ---- if (surface == null) surface = ! SurfaceShader.createShader("fakedlight", ! new ParameterList(), ! attr); surface.shade(shaderVariables); VolumeShader vs = attr.getAtmosphere(); if (vs != null) ! vs.shade(shaderVariables, ! frame.getNearClipping(), ! frame.getFarClipping()); shaderVariables.transform(cameraToRaster); shaderVariables.getMicropolygons(this); *************** *** 402,492 **** sampler.sampleBucket(bucket); discardBucket(column, row); ! if (displayMode == Display.Mode.RGB || displayMode == Display.Mode.RGBA) { ! sampler.getColors( ! samples, ! (column * sampler.getWidth() ! + (row == 0 ? 0 : 1) ! * (vFilterExtra + vPixelLess * sampler.getPixelHeight()) ! * bucketColumns ! * sampler.getWidth()) ! * 4, ! bucketColumns * sampler.getWidth(), ! 4, ! 0); ! samplesFilter.doFilter( ! samples, ! (column * sampler.getWidth() ! - (column == 0 ! ? 0 ! : (hFilterExtra + hPixelLess * sampler.getPixelWidth()))) ! * 4, ! bucketColumns * sampler.getWidth(), ! filteredSamples, ! 0, ! bucketWidth, ! bucketWidth - (column == 0 ? hPixelLess : 0), ! bucketHeight - (row == 0 ? vPixelLess : 0), ! sampler.getPixelWidth(), ! sampler.getPixelHeight(), ! 4); colorsToPixels(filteredSamples, pixels); ! imageStore.setPixels( ! pixels, ! column * bucketWidth - (column == 0 ? 0 : hPixelLess) + (int) rmin.x, ! row * bucketHeight - (row == 0 ? 0 : vPixelLess) + (int) rmin.y, ! bucketWidth ! - (column == 0 ? hPixelLess : 0) ! - (column == bucketColumns - 1 ? wExtra : 0), ! bucketHeight ! - (row == 0 ? vPixelLess : 0) ! - (row == bucketRows - 1 ? hExtra : 0), ! bucketWidth); if (fb != null) ! fb.refresh( ! column * bucketWidth ! - (column == 0 ? 0 : hPixelLess) ! + (int) rmin.x, ! row * bucketHeight - (row == 0 ? 0 : vPixelLess) + (int) rmin.y, ! bucketWidth - (column == 0 ? hPixelLess : 0), ! bucketHeight - (row == 0 ? vPixelLess : 0)); } else if (displayMode == Display.Mode.Z) { sampler.getDepths(depths); ! zStore.setDepths( ! depths, ! column * bucketWidth + (int) rmin.x, ! row * bucketHeight + (int) rmin.y, ! bucketWidth, ! bucketHeight, ! bucketWidth); } if (frame.isShowProgressEnabled()) { ! int percent = (row * bucketColumns + column + 1) * 100 / buckets.length; if (percent > percentComplete) { percentComplete = percent; ! System.out.print( ! "\r" ! + frame.getDisplay().getName() ! + " (frame " ! + frame.getFrameNumber() ! + "): " ! + percentComplete ! + "% complete"); } } } ! System.arraycopy( ! samples, ! (bucketHeight * sampler.getPixelHeight() ! - (row == 0 ? (vFilterExtra + vPixelLess * sampler.getPixelHeight()) : 0)) ! * bucketColumns ! * sampler.getWidth() ! * 4, ! samples, ! 0, ! (vFilterExtra + vPixelLess * sampler.getPixelHeight()) ! * bucketColumns ! * sampler.getWidth() ! * 4); } if (frame.isShowProgressEnabled()) --- 404,495 ---- sampler.sampleBucket(bucket); discardBucket(column, row); ! if (displayMode == Display.Mode.RGB || ! displayMode == Display.Mode.RGBA) { ! sampler.getColors(samples, ! (column * sampler.getWidth() ! + (row == 0 ? 0 : 1) ! * (vFilterExtra + vPixelLess * ! sampler.getPixelHeight()) ! * bucketColumns * sampler.getWidth()) *4, ! bucketColumns * sampler.getWidth(), ! 4, ! 0); ! samplesFilter.doFilter(samples, ! (column * sampler.getWidth() ! - (column == 0 ? 0 ! : (hFilterExtra + hPixelLess * ! sampler.getPixelWidth()))) ! * 4, ! bucketColumns * sampler.getWidth(), ! filteredSamples, ! 0, ! bucketWidth, ! bucketWidth - (column == 0 ? ! hPixelLess : 0), ! bucketHeight - (row == 0 ? ! vPixelLess : 0), ! sampler.getPixelWidth(), ! sampler.getPixelHeight(), ! 4); colorsToPixels(filteredSamples, pixels); ! imageStore.setPixels(pixels, ! column * bucketWidth - ! (column == 0 ? 0 : hPixelLess) + ! (int) rmin.x, ! row * bucketHeight - ! (row == 0 ? 0 : vPixelLess) + ! (int) rmin.y, ! bucketWidth - ! (column == 0 ? hPixelLess : 0) - ! (column == bucketColumns - 1 ? ! wExtra : 0), ! bucketHeight - ! (row == 0 ? vPixelLess : 0) - ! (row == bucketRows - 1 ? hExtra : 0), ! bucketWidth); if (fb != null) ! fb.refresh(column * bucketWidth - ! (column == 0 ? 0 : hPixelLess) + ! (int) rmin.x, ! row * bucketHeight - ! (row == 0 ? 0 : vPixelLess) + (int) rmin.y, ! bucketWidth - (column == 0 ? hPixelLess : 0), ! bucketHeight - (row == 0 ? vPixelLess : 0)); } else if (displayMode == Display.Mode.Z) { sampler.getDepths(depths); ! zStore.setDepths(depths, ! column * bucketWidth + (int) rmin.x, ! row * bucketHeight + (int) rmin.y, ! bucketWidth, ! bucketHeight, ! bucketWidth); } if (frame.isShowProgressEnabled()) { ! int percent = (row * bucketColumns + column + 1) * ! 100 / buckets.length; if (percent > percentComplete) { percentComplete = percent; ! System.out.print("\r" ! + frame.getDisplay().getName() ! + " (frame " ! + frame.getFrameNumber() ! + "): " ! + percentComplete ! + "% complete"); } } } ! System.arraycopy(samples, ! (bucketHeight * sampler.getPixelHeight() - ! (row == 0 ? ! (vFilterExtra + vPixelLess * ! sampler.getPixelHeight()) : 0)) ! * bucketColumns * sampler.getWidth() * 4, ! samples, ! 0, ! (vFilterExtra + vPixelLess * ! sampler.getPixelHeight()) * ! bucketColumns * sampler.getWidth() * 4); } if (frame.isShowProgressEnabled()) *************** *** 496,500 **** if (displayType == Display.Type.FILE) try { ! if (displayMode == Display.Mode.RGB || displayMode == Display.Mode.RGBA) { String name = frame.getDisplay().getName(); String currentDirectory = parser.getCurrentDirectory(); --- 499,504 ---- if (displayType == Display.Type.FILE) try { ! if (displayMode == Display.Mode.RGB || ! displayMode == Display.Mode.RGBA) { String name = frame.getDisplay().getName(); String currentDirectory = parser.getCurrentDirectory(); *************** *** 505,515 **** ImageIO.write(imageStore.getImage(), ext, file); } else if (displayMode == Display.Mode.Z) ! ShadowMap.writeShadowMap( ! frame.getDisplay().getName(), ! worldToCamera, ! cameraToRaster, ! frame.getHorizontalResolution(), ! frame.getVerticalResolution(), ! zStore.getDepths()); } catch (Exception e) { System.err.println("Error writing image file: " + e); --- 509,518 ---- ImageIO.write(imageStore.getImage(), ext, file); } else if (displayMode == Display.Mode.Z) ! ShadowMap.writeShadowMap(frame.getDisplay().getName(), ! worldToCamera, ! cameraToRaster, ! frame.getHorizontalResolution(), ! frame.getVerticalResolution(), ! zStore.getDepths()); } catch (Exception e) { System.err.println("Error writing image file: " + e); *************** *** 524,529 **** if (frame.endOfFrameStatisticsEnabled()) { System.out.println("*** Frame Statistics ***"); ! System.out.println( ! "World parse time: " + Format.time(worldParseEnd - worldParseStart)); display("spheres", parser.getSphereCount()); display("cylinders", parser.getCylinderCount()); --- 527,532 ---- if (frame.endOfFrameStatisticsEnabled()) { System.out.println("*** Frame Statistics ***"); ! System.out.println("World parse time: " + ! Format.time(worldParseEnd - worldParseStart)); display("spheres", parser.getSphereCount()); display("cylinders", parser.getCylinderCount()); *************** *** 544,563 **** System.out.println("Patches/second: " + primitivePatchCount / time); System.out.println("Invisible patches: " + invisiblePatchCount); ! System.out.println( ! "Patches culled: " + invisiblePatchCount * 100f / primitivePatchCount + "%"); System.out.println("Root count: " + sampler.getRootCount()); System.out.println("Pixel count: " + sampler.getPixelCount()); System.out.println("MP Root count: " + sampler.getMPRootCount()); ! System.out.println( ! "gridCount = " ! + gridCount ! + " in " ! + time ! + " seconds\n" ! + gridCount / time ! + "grids/second"); System.out.println("Total micropolygons: " + Micropolygon.count); ! System.out.println("Micropolygons/second: " + Micropolygon.count / time); ! System.out.println("---------------------------------------------------"); clippedPrimitivesCount = 0; primitivePatchCount = 0; --- 547,567 ---- System.out.println("Patches/second: " + primitivePatchCount / time); System.out.println("Invisible patches: " + invisiblePatchCount); ! System.out.println("Patches culled: " + ! invisiblePatchCount * 100f / primitivePatchCount ! + "%"); System.out.println("Root count: " + sampler.getRootCount()); System.out.println("Pixel count: " + sampler.getPixelCount()); System.out.println("MP Root count: " + sampler.getMPRootCount()); ! System.out.println("gridCount = " ! + gridCount ! + " in " ! + time ! + " seconds\n" ! + gridCount / time ! + "grids/second"); System.out.println("Total micropolygons: " + Micropolygon.count); ! System.out.println("Micropolygons/second: " + ! Micropolygon.count / time); ! System.out.println("---------------------------------------------"); clippedPrimitivesCount = 0; primitivePatchCount = 0; *************** *** 601,605 **** int alpha = qt.quantize(alphaFloat); offset = row * bucketWidth + col; ! result[offset] = ((alpha << 24) | (red << 16) | (green << 8) | blue); } } --- 605,610 ---- int alpha = qt.quantize(alphaFloat); offset = row * bucketWidth + col; ! result[offset] = ! ((alpha << 24) | (red << 16) | (green << 8) | blue); } } *************** *** 620,630 **** Point3f lowerLeft = new Point3f(min.x, min.y, focalLength); Point3f lowerRight = new Point3f(max.x, min.y, focalLength); ! clippingVolume.addPlane( ! Plane.createWithThreePoints(origin, upperLeft, upperRight)); ! clippingVolume.addPlane( ! Plane.createWithThreePoints(origin, upperRight, lowerRight)); ! clippingVolume.addPlane( ! Plane.createWithThreePoints(origin, lowerRight, lowerLeft)); ! clippingVolume.addPlane(Plane.createWithThreePoints(origin, lowerLeft, upperLeft)); } else { Point3f upperLeft = new Point3f(min.x, max.y, 1f); --- 625,640 ---- Point3f lowerLeft = new Point3f(min.x, min.y, focalLength); Point3f lowerRight = new Point3f(max.x, min.y, focalLength); ! clippingVolume.addPlane(Plane.createWithThreePoints(origin, ! upperLeft, ! upperRight)); ! clippingVolume.addPlane(Plane.createWithThreePoints(origin, ! upperRight, ! lowerRight)); ! clippingVolume.addPlane(Plane.createWithThreePoints(origin, ! lowerRight, ! lowerLeft)); ! clippingVolume.addPlane(Plane.createWithThreePoints(origin, ! lowerLeft, ! upperLeft)); } else { Point3f upperLeft = new Point3f(min.x, max.y, 1f); *************** *** 636,658 **** Point3f originLowerLeft = new Point3f(min.x, min.y, 0f); Point3f originLowerRight = new Point3f(max.x, min.y, 0f); ! clippingVolume.addPlane( ! Plane.createWithThreePoints(originUpperLeft, upperLeft, upperRight)); ! clippingVolume.addPlane( ! Plane.createWithThreePoints(originUpperRight, upperRight, lowerRight)); ! clippingVolume.addPlane( ! Plane.createWithThreePoints(originLowerRight, lowerRight, lowerLeft)); ! clippingVolume.addPlane( ! Plane.createWithThreePoints(originLowerLeft, lowerLeft, upperLeft)); } float near = frame.getNearClipping(); clippingVolume.addPlane( ! Plane.createWithPointAndNormal( ! new Point3f(0f, 0f, near), ! new Vector3f(0f, 0f, -1f))); float far = frame.getFarClipping(); clippingVolume.addPlane( ! Plane.createWithPointAndNormal( ! new Point3f(0f, 0f, far), ! new Vector3f(0f, 0f, 1f))); } --- 646,672 ---- Point3f originLowerLeft = new Point3f(min.x, min.y, 0f); Point3f originLowerRight = new Point3f(max.x, min.y, 0f); ! clippingVolume.addPlane(Plane.createWithThreePoints(originUpperLeft, ! upperLeft, ! upperRight)); ! clippingVolume.addPlane(Plane.createWithThreePoints( ! originUpperRight, ! upperRight, ! lowerRight)); ! clippingVolume.addPlane(Plane.createWithThreePoints( ! originLowerRight, ! lowerRight, ! lowerLeft)); ! clippingVolume.addPlane(Plane.createWithThreePoints(originLowerLeft, ! lowerLeft, ! upperLeft)); } float near = frame.getNearClipping(); clippingVolume.addPlane( ! Plane.createWithPointAndNormal(new Point3f(0f, 0f, near), ! new Vector3f(0f, 0f, -1f))); float far = frame.getFarClipping(); clippingVolume.addPlane( ! Plane.createWithPointAndNormal(new Point3f(0f, 0f, far), ! new Vector3f(0f, 0f, 1f))); } *************** *** 663,679 **** int xResolution = frame.getHorizontalResolution(); int yResolution = frame.getVerticalResolution(); ! ... [truncated message content] |
From: Gerardo H. <ma...@us...> - 2007-02-26 19:35:59
|
Update of /cvsroot/jrman/drafts/src/org/jrman/primitive In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30698/src/org/jrman/primitive Modified Files: BicubicPatch.java BilinearPatch.java Cone.java CubicCurve.java Cylinder.java DelayedReadArchive.java Disk.java Hyperboloid.java LinearCurve.java Paraboloid.java Point.java PointsPolygons.java Primitive.java Sphere.java SubdivisionMesh.java Torus.java Log Message: Check for Catmull Clark scheme before trying to instance a Subdivision Mesh. Started reformatting source code to fit in 80 columns, remove tabs and ugly formatting done by Eclipse. Index: Torus.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/Torus.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Torus.java 25 Dec 2006 07:50:37 -0000 1.10 --- Torus.java 26 Feb 2007 19:35:52 -0000 1.11 *************** *** 50,62 **** private float thetaMax; ! public Torus( ! float majorRadius, ! float minorRadius, ! float phiMin, ! float phiMax, ! float thetaMin, ! float thetaMax, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.majorRadius = majorRadius; --- 50,61 ---- private float thetaMax; ! public Torus(float majorRadius, ! float minorRadius, ! float phiMin, ! float phiMax, ! float thetaMin, ! float thetaMax, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.majorRadius = majorRadius; *************** *** 132,176 **** if ((thetaMax - thetaMin) * majorRadius > (phiMax - phiMin) * minorRadius) { ! result[0] = ! new Torus( ! majorRadius, ! minorRadius, ! phiMin, ! phiMax, ! thetaMin, ! (thetaMin + thetaMax) / 2f, ! bilinearInterpolateParameters(0f, .5f, 0f, 1f), ! attributes); ! result[1] = ! new Torus( ! majorRadius, ! minorRadius, ! phiMin, ! phiMax, ! (thetaMin + thetaMax) / 2f, ! thetaMax, ! bilinearInterpolateParameters(.5f, 1f, 0f, 1f), ! attributes); } else { ! result[0] = ! new Torus( ! majorRadius, ! minorRadius, ! phiMin, ! (phiMin + phiMax) / 2f, ! thetaMin, ! thetaMax, ! bilinearInterpolateParameters(0f, 1f, 0f, .5f), ! attributes); ! result[1] = ! new Torus( ! majorRadius, ! minorRadius, ! (phiMin + phiMax) / 2f, ! phiMax, ! thetaMin, ! thetaMax, ! bilinearInterpolateParameters(0f, 1f, .5f, 1f), ! attributes); } return result; --- 131,171 ---- if ((thetaMax - thetaMin) * majorRadius > (phiMax - phiMin) * minorRadius) { ! result[0] = new Torus(majorRadius, ! minorRadius, ! phiMin, ! phiMax, ! thetaMin, ! (thetaMin + thetaMax) / 2f, ! bilinearInterpolateParameters(0f, .5f, ! 0f, 1f), ! attributes); ! result[1] = new Torus(majorRadius, ! minorRadius, ! phiMin, ! phiMax, ! (thetaMin + thetaMax) / 2f, ! thetaMax, ! bilinearInterpolateParameters(.5f, 1f, ! 0f, 1f), ! attributes); } else { ! result[0] = new Torus(majorRadius, ! minorRadius, ! phiMin, ! (phiMin + phiMax) / 2f, ! thetaMin, ! thetaMax, ! bilinearInterpolateParameters(0f, 1f, ! 0f, .5f), ! attributes); ! result[1] = new Torus(majorRadius, ! minorRadius, ! (phiMin + phiMax) / 2f, ! phiMax, ! thetaMin, ! thetaMax, ! bilinearInterpolateParameters(0f, 1f, ! .5f, 1f), ! attributes); } return result; Index: LinearCurve.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/LinearCurve.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LinearCurve.java 30 Dec 2006 16:32:23 -0000 1.6 --- LinearCurve.java 26 Feb 2007 19:35:51 -0000 1.7 *************** *** 288,305 **** } - /* - protected void dice_v(ShaderVariables shaderVariables) { - FloatGrid g = shaderVariables.v; - int vSize = Grid.getVSize(); - float vStep = 1f / (vSize - 1); - float v = 0; - for (int i = 0; i < vSize; i++) { - g.set(0, i, v); - g.set(1, i, v); - v += vStep; - } - } - */ - } --- 288,291 ---- Index: SubdivisionMesh.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/SubdivisionMesh.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SubdivisionMesh.java 26 Feb 2007 15:25:15 -0000 1.1 --- SubdivisionMesh.java 26 Feb 2007 19:35:52 -0000 1.2 *************** *** 47,52 **** VaryingScalarTuple3f points; ! public SubdivisionMesh(String scheme, ! int[] nvertices, int[] vertices, String[] tags, --- 47,51 ---- VaryingScalarTuple3f points; ! public SubdivisionMesh(int[] nvertices, int[] vertices, String[] tags, *************** *** 56,62 **** ParameterList parameters, Attributes attributes) { - if (!scheme.equals("catmull-clark")) - throw new IllegalArgumentException("Subdivison scheme " + scheme + - " not supported"); this.parameters = parameters; this.attributes = attributes; --- 55,58 ---- Index: PointsPolygons.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/PointsPolygons.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PointsPolygons.java 26 Feb 2007 15:25:15 -0000 1.7 --- PointsPolygons.java 26 Feb 2007 19:35:52 -0000 1.8 *************** *** 39,47 **** VaryingScalarTuple3f points; ! public PointsPolygons( ! int[] nVertices, ! int[] vertices, ! ParameterList parameters, ! Attributes attributes) { this.parameters = parameters; this.attributes = attributes; --- 39,46 ---- VaryingScalarTuple3f points; ! public PointsPolygons(int[] nVertices, ! int[] vertices, ! ParameterList parameters, ! Attributes attributes) { this.parameters = parameters; this.attributes = attributes; *************** *** 51,55 **** parameters.removeParameter("P"); } ! public BoundingVolume getBoundingVolume() { MutableBounds3f mb = new MutableBounds3f(); --- 50,54 ---- parameters.removeParameter("P"); } ! public BoundingVolume getBoundingVolume() { MutableBounds3f mb = new MutableBounds3f(); *************** *** 65,69 **** int offset = 0; for (int i = 0; i < nVertices.length; i++) { ! result[i] = new Polygon(i, nVertices[i], offset, parameters, attributes); offset += nVertices[i]; } --- 64,69 ---- int offset = 0; for (int i = 0; i < nVertices.length; i++) { ! result[i] = new Polygon(i, nVertices[i], offset, ! parameters, attributes); offset += nVertices[i]; } *************** *** 83,87 **** private int offset; ! Polygon(int pos, int n, int offset, ParameterList parameters, Attributes attributes) { this.pos = pos; this.n = n; --- 83,88 ---- private int offset; ! Polygon(int pos, int n, int offset, ParameterList parameters, ! Attributes attributes) { this.pos = pos; this.n = n; *************** *** 104,112 **** int[] posIndex = new int[1]; posIndex[0] = pos; ! int[] indexes = new int[] { vertices[offset], 0, vertices[offset], 0 }; for (int i = 1; i < n - 1; i++) { indexes[1] = vertices[offset + i]; indexes[3] = vertices[offset + i + 1]; ! ParameterList pl = parameters.selectValues(posIndex, indexes, indexes); pl.addParameter(points.selectValues(indexes)); result[i - 1] = new BilinearPatch(pl, attributes); --- 105,115 ---- int[] posIndex = new int[1]; posIndex[0] = pos; ! int[] indexes = new int[] { vertices[offset], 0, ! vertices[offset], 0 }; for (int i = 1; i < n - 1; i++) { indexes[1] = vertices[offset + i]; indexes[3] = vertices[offset + i + 1]; ! ParameterList pl = ! parameters.selectValues(posIndex, indexes, indexes); pl.addParameter(points.selectValues(indexes)); result[i - 1] = new BilinearPatch(pl, attributes); Index: Sphere.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/Sphere.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Sphere.java 25 Dec 2006 07:50:37 -0000 1.23 --- Sphere.java 26 Feb 2007 19:35:52 -0000 1.24 *************** *** 44,55 **** private float thetaMax; ! public Sphere( ! float radius, ! float phiMin, ! float phiMax, ! float thetaMin, ! float thetaMax, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.radius = radius; --- 44,54 ---- private float thetaMax; ! public Sphere(float radius, ! float phiMin, ! float phiMax, ! float thetaMin, ! float thetaMax, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.radius = radius; *************** *** 123,163 **** Primitive[] result = new Primitive[2]; if (thetaMax - thetaMin > phiMax - phiMin) { ! result[0] = ! new Sphere( ! radius, ! phiMin, ! phiMax, ! thetaMin, ! (thetaMin + thetaMax) / 2f, ! bilinearInterpolateParameters(0f, .5f, 0f, 1f), ! attributes); ! result[1] = ! new Sphere( ! radius, ! phiMin, ! phiMax, ! (thetaMin + thetaMax) / 2f, ! thetaMax, ! bilinearInterpolateParameters(.5f, 1f, 0f, 1f), ! attributes); } else { ! result[0] = ! new Sphere( ! radius, ! phiMin, ! (phiMin + phiMax) / 2f, ! thetaMin, ! thetaMax, ! bilinearInterpolateParameters(0f, 1f, 0f, .5f), ! attributes); ! result[1] = ! new Sphere( ! radius, ! (phiMin + phiMax) / 2f, ! phiMax, ! thetaMin, ! thetaMax, ! bilinearInterpolateParameters(0f, 1f, .5f, 1f), ! attributes); } return result; --- 122,158 ---- Primitive[] result = new Primitive[2]; if (thetaMax - thetaMin > phiMax - phiMin) { ! result[0] = new Sphere(radius, ! phiMin, ! phiMax, ! thetaMin, ! (thetaMin + thetaMax) / 2f, ! bilinearInterpolateParameters(0f, .5f, ! 0f, 1f), ! attributes); ! result[1] = new Sphere(radius, ! phiMin, ! phiMax, ! (thetaMin + thetaMax) / 2f, ! thetaMax, ! bilinearInterpolateParameters(.5f, 1f, ! 0f, 1f), ! attributes); } else { ! result[0] = new Sphere(radius, ! phiMin, ! (phiMin + phiMax) / 2f, ! thetaMin, ! thetaMax, ! bilinearInterpolateParameters(0f, 1f, ! 0f, .5f), ! attributes); ! result[1] = new Sphere(radius, ! (phiMin + phiMax) / 2f, ! phiMax, ! thetaMin, ! thetaMax, ! bilinearInterpolateParameters(0f, 1f, ! .5f, 1f), ! attributes); } return result; Index: Hyperboloid.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/Hyperboloid.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Hyperboloid.java 25 Dec 2006 07:50:37 -0000 1.10 --- Hyperboloid.java 26 Feb 2007 19:35:51 -0000 1.11 *************** *** 33,198 **** public class Hyperboloid extends Quadric { ! private static Point3f tmp = new Point3f(); ! ! private static Vector3f vtmp = new Vector3f(); ! ! private static Point3f p1 = new Point3f(); ! ! private static Point3f p2 = new Point3f(); ! ! private static Vector3f v1 = new Vector3f(); ! ! private static Vector3f v2 = new Vector3f(); ! ! private float x1; ! ! private float y1; ! ! private float z1; ! ! private float x2; ! ! private float y2; ! ! private float z2; ! ! private float thetaMin; ! ! private float thetaMax; ! ! public Hyperboloid( ! float x1, ! float y1, ! float z1, ! float x2, ! float y2, ! float z2, ! float thetaMin, ! float thetaMax, ! ParameterList parameters, ! Attributes attributes) { ! super(parameters, attributes); ! this.x1 = x1; ! this.y1 = y1; ! this.z1 = z1; ! this.x2 = x2; ! this.y2 = y2; ! this.z2 = z2; ! this.thetaMin = thetaMin; ! this.thetaMax = thetaMax; ! } ! ! public BoundingVolume getBoundingVolume() { ! ! float cosTMin = (float) Math.cos(thetaMin); ! float sinTMin = (float) Math.sin(thetaMin); ! float cosTMax = (float) Math.cos(thetaMax); ! float sinTMax = (float) Math.sin(thetaMax); ! float x1Min = x1 * cosTMin - y1 * sinTMin; ! float y1Min = x1 * sinTMin + y1 * cosTMin; ! ! float gamma1Min = (float) Math.atan2(y1Min, x1Min); ! if (gamma1Min < 0) ! gamma1Min += (float) Math.PI * 2f; ! float gamma1Max = gamma1Min + (thetaMax - thetaMin); ! ! float r1 = (float) Math.sqrt((x1 * x1) + (y1 * y1)); ! float[] values1 = analizeAngleCase(r1, gamma1Min, gamma1Max); ! float x11Min = values1[0]; ! float x11Max = values1[1]; ! float y11Min = values1[2]; ! float y11Max = values1[3]; ! ! float x2Min = x2 * cosTMin - y2 * sinTMin; ! float y2Min = x2 * sinTMin + y2 * cosTMin; ! ! float gamma2Min = (float) Math.atan2(y2Min, x2Min); ! if (gamma2Min < 0) ! gamma2Min += (float) Math.PI * 2f; ! float gamma2Max = gamma2Min + (thetaMax - thetaMin); ! ! float r2 = (float) Math.sqrt((x2 * x2) + (y2 * y2)); ! float[] values2 = analizeAngleCase(r2, gamma2Min, gamma2Max); ! float x22Min = values2[0]; ! float x22Max = values2[1]; ! float y22Min = values2[2]; ! float y22Max = values2[3]; ! ! float xMin = Math.min(x11Min, x22Min); ! float xMax = Math.max(x11Max, x22Max); ! float yMin = Math.min(y11Min, y22Min); ! float yMax = Math.max(y11Max, y22Max); ! float zMin = Math.min(z1, z2); ! float zMax = Math.max(z1, z2); ! ! Bounds3f b3f = new Bounds3f(xMin, xMax, yMin, yMax, zMin, zMax); ! return b3f; ! } ! ! private boolean passAngle(float angle, float minAngle, float maxAngle) { ! return minAngle < angle && angle < maxAngle; ! } ! ! private float[] analizeAngleCase(float r, float gammaMin, ! float gammaMax) { ! ! float[] values = new float[4]; ! float cosGammaMin = (float) Math.cos(gammaMin); ! float sinGammaMin = (float) Math.sin(gammaMin); ! float cosGammaMax = (float) Math.cos(gammaMax); ! float sinGammaMax = (float) Math.sin(gammaMax); ! float xMin = Math.min(r * cosGammaMin, r * cosGammaMax); ! float xMax = Math.max(r * cosGammaMin, r * cosGammaMax); ! float yMin = Math.min(r * sinGammaMin, r * sinGammaMax); ! float yMax = Math.max(r * sinGammaMin, r * sinGammaMax); ! ! if (passAngle((float) Math.PI / 2f, gammaMin, gammaMax) ! || passAngle( ! (float) Math.PI / 2f + (float) Math.PI * 2f, ! gammaMin, ! gammaMax)) { ! yMax = r; ! } ! if (passAngle((float) Math.PI, gammaMin, gammaMax) ! || passAngle( ! (float) Math.PI + (float) Math.PI * 2f, ! gammaMin, ! gammaMax)) { ! xMin = -r; ! } ! if (passAngle((float) Math.PI * 3f / 2f, gammaMin, gammaMax) ! || passAngle( ! (float) Math.PI * 3f / 2f + (float) Math.PI * 2f, ! gammaMin, ! gammaMax)) { ! yMin = -r; ! } ! if (passAngle(0f, gammaMin, gammaMax) ! || passAngle( ! (float) Math.PI * 2f, gammaMin, gammaMax)) { ! xMax = r; ! } ! values[0] = xMin; ! values[1] = xMax; ! values[2] = yMin; ! values[3] = yMax; ! return values; ! } ! ! public Primitive[] split() { ! ! float r1 = (float) Math.sqrt((x1 * x1) + (y1 * y1)); ! float r2 = (float) Math.sqrt((x2 * x2) + (y2 * y2)); ! float r = ! (float) Math.sqrt( ! (x2 - x1) * (x2 - x1) ! + (y2 - y1) * (y2 - y1) ! + (z2 - z1) * (z2 - z1)); ! Primitive[] result = new Primitive[2]; ! if ((thetaMax - thetaMin) * (float) Math.max(r1, r2) > r) { ! result[0] = ! new Hyperboloid( ! x1, y1, z1, --- 33,187 ---- public class Hyperboloid extends Quadric { + + private static Point3f tmp = new Point3f(); + + private static Vector3f vtmp = new Vector3f(); + + private static Point3f p1 = new Point3f(); + + private static Point3f p2 = new Point3f(); + + private static Vector3f v1 = new Vector3f(); + + private static Vector3f v2 = new Vector3f(); + + private float x1; + + private float y1; + + private float z1; + + private float x2; + + private float y2; + + private float z2; + + private float thetaMin; + + private float thetaMax; + + public Hyperboloid(float x1, + float y1, + float z1, + float x2, + float y2, + float z2, + float thetaMin, + float thetaMax, + ParameterList parameters, + Attributes attributes) { + super(parameters, attributes); + this.x1 = x1; + this.y1 = y1; + this.z1 = z1; + this.x2 = x2; + this.y2 = y2; + this.z2 = z2; + this.thetaMin = thetaMin; + this.thetaMax = thetaMax; + } + + public BoundingVolume getBoundingVolume() { + float cosTMin = (float) Math.cos(thetaMin); + float sinTMin = (float) Math.sin(thetaMin); + float cosTMax = (float) Math.cos(thetaMax); + float sinTMax = (float) Math.sin(thetaMax); + float x1Min = x1 * cosTMin - y1 * sinTMin; + float y1Min = x1 * sinTMin + y1 * cosTMin; + + float gamma1Min = (float) Math.atan2(y1Min, x1Min); + if (gamma1Min < 0) + gamma1Min += (float) Math.PI * 2f; + float gamma1Max = gamma1Min + (thetaMax - thetaMin); + + float r1 = (float) Math.sqrt((x1 * x1) + (y1 * y1)); + float[] values1 = analizeAngleCase(r1, gamma1Min, gamma1Max); + float x11Min = values1[0]; + float x11Max = values1[1]; + float y11Min = values1[2]; + float y11Max = values1[3]; + + float x2Min = x2 * cosTMin - y2 * sinTMin; + float y2Min = x2 * sinTMin + y2 * cosTMin; ! float gamma2Min = (float) Math.atan2(y2Min, x2Min); ! if (gamma2Min < 0) ! gamma2Min += (float) Math.PI * 2f; ! float gamma2Max = gamma2Min + (thetaMax - thetaMin); ! ! float r2 = (float) Math.sqrt((x2 * x2) + (y2 * y2)); ! float[] values2 = analizeAngleCase(r2, gamma2Min, gamma2Max); ! float x22Min = values2[0]; ! float x22Max = values2[1]; ! float y22Min = values2[2]; ! float y22Max = values2[3]; ! ! float xMin = Math.min(x11Min, x22Min); ! float xMax = Math.max(x11Max, x22Max); ! float yMin = Math.min(y11Min, y22Min); ! float yMax = Math.max(y11Max, y22Max); ! float zMin = Math.min(z1, z2); ! float zMax = Math.max(z1, z2); ! ! Bounds3f b3f = new Bounds3f(xMin, xMax, yMin, yMax, zMin, zMax); ! return b3f; ! } ! ! private boolean passAngle(float angle, float minAngle, float maxAngle) { ! return minAngle < angle && angle < maxAngle; ! } ! ! private float[] analizeAngleCase(float r, float gammaMin, ! float gammaMax) { ! float[] values = new float[4]; ! float cosGammaMin = (float) Math.cos(gammaMin); ! float sinGammaMin = (float) Math.sin(gammaMin); ! float cosGammaMax = (float) Math.cos(gammaMax); ! float sinGammaMax = (float) Math.sin(gammaMax); ! float xMin = Math.min(r * cosGammaMin, r * cosGammaMax); ! float xMax = Math.max(r * cosGammaMin, r * cosGammaMax); ! float yMin = Math.min(r * sinGammaMin, r * sinGammaMax); ! float yMax = Math.max(r * sinGammaMin, r * sinGammaMax); ! ! if (passAngle((float) Math.PI / 2f, gammaMin, gammaMax) || ! passAngle((float) Math.PI / 2f + (float) Math.PI * 2f, ! gammaMin, ! gammaMax)) { ! yMax = r; ! } ! if (passAngle((float) Math.PI, gammaMin, gammaMax) || ! passAngle((float) Math.PI + (float) Math.PI * 2f, ! gammaMin, ! gammaMax)) { ! xMin = -r; ! } ! if (passAngle((float) Math.PI * 3f / 2f, gammaMin, gammaMax) || ! passAngle((float) Math.PI * 3f / 2f + (float) Math.PI * 2f, ! gammaMin, ! gammaMax)) { ! yMin = -r; ! } ! if (passAngle(0f, gammaMin, gammaMax) || ! passAngle((float) Math.PI * 2f, gammaMin, gammaMax)) { ! xMax = r; ! } ! values[0] = xMin; ! values[1] = xMax; ! values[2] = yMin; ! values[3] = yMax; ! return values; ! } ! ! public Primitive[] split() { ! float r1 = (float) Math.sqrt((x1 * x1) + (y1 * y1)); ! float r2 = (float) Math.sqrt((x2 * x2) + (y2 * y2)); ! float r = ! (float) Math.sqrt((x2 - x1) * (x2 - x1) ! + (y2 - y1) * (y2 - y1) ! + (z2 - z1) * (z2 - z1)); ! Primitive[] result = new Primitive[2]; ! if ((thetaMax - thetaMin) * (float) Math.max(r1, r2) > r) { ! result[0] = new Hyperboloid(x1, y1, z1, *************** *** 205,211 **** 0f, 1f), attributes); ! result[1] = ! new Hyperboloid( ! x1, y1, z1, --- 194,198 ---- 0f, 1f), attributes); ! result[1] = new Hyperboloid(x1, y1, z1, *************** *** 218,225 **** 0f, 1f), attributes); ! } else { ! result[0] = ! new Hyperboloid( ! x1, y1, z1, --- 205,210 ---- 0f, 1f), attributes); ! } else { ! result[0] = new Hyperboloid(x1, y1, z1, *************** *** 232,303 **** 0f, .5f), attributes); ! result[1] = ! new Hyperboloid( ! (x1 + x2) / 2f, ! (y1 + y2) / 2f, ! (z1 + z2) / 2f, ! x2, ! y2, ! z2, ! thetaMin, ! thetaMax, ! bilinearInterpolateParameters(0f, 1f, .5f, 1f), attributes); ! } ! return result; ! } ! ! protected void dice_P(ShaderVariables shaderVariables) { ! int uSize = Grid.getUSize(); ! int vSize = Grid.getVSize(); ! float thetaDelta = (thetaMax - thetaMin) / (uSize - 1); ! float vDelta = 1f / (vSize - 1); ! Point3fGrid P = shaderVariables.P; ! float theta = thetaMin; ! for (int u = 0; u < uSize; u++) { ! float cosTheta = (float) Math.cos(theta); ! float sinTheta = (float) Math.sin(theta); ! float nv = 0f; ! for (int v = 0; v < vSize; v++) { ! float xr = (1f - nv) * x1 + nv * x2; ! float yr = (1f - nv) * y1 + nv * y2; ! float zr = (1f - nv) * z1 + nv * z2; ! tmp.x = xr * cosTheta - yr * sinTheta; ! tmp.y = xr * sinTheta + yr * cosTheta; ! tmp.z = zr; ! P.set(u, v, tmp); ! nv += vDelta; ! } ! theta += thetaDelta; ! } ! } ! ! protected void dice_Ng(ShaderVariables shaderVariables) { ! int uSize = Grid.getUSize(); ! int vSize = Grid.getVSize(); ! float thetaDelta = (thetaMax - thetaMin) / (uSize - 1); ! Vector3fGrid Ng = shaderVariables.Ng; ! for (int u = 0; u < uSize; u++) { ! float theta = thetaMin + thetaDelta * u; ! float cosTheta = (float) Math.cos(theta); ! float sinTheta = (float) Math.sin(theta); ! float x11 = x1 * cosTheta - y1 * sinTheta; ! float x22 = x2 * cosTheta - y2 * sinTheta; ! float y11 = x1 * sinTheta + y1 * cosTheta; ! float y22 = x2 * sinTheta + y2 * cosTheta; ! p1.set(x11, y11, z1); ! p2.set(x22, y22, z2); ! v1.sub(p1, p2); ! for (int v = 0; v < vSize; v++) { ! float nv = (float) v / (vSize - 1); ! float xi = (1f - nv) * x11 + nv * x22; ! float yi = (1f - nv) * y11 + nv * y22; ! v2.set(-yi, xi, 0f); ! vtmp.cross(v1, v2); ! Ng.set(u, v, vtmp); ! } ! } ! } ! } --- 217,286 ---- 0f, .5f), attributes); ! result[1] = new Hyperboloid((x1 + x2) / 2f, ! (y1 + y2) / 2f, ! (z1 + z2) / 2f, ! x2, ! y2, ! z2, ! thetaMin, ! thetaMax, ! bilinearInterpolateParameters(0f, 1f, .5f, 1f), attributes); ! } ! return result; ! } ! ! protected void dice_P(ShaderVariables shaderVariables) { ! int uSize = Grid.getUSize(); ! int vSize = Grid.getVSize(); ! float thetaDelta = (thetaMax - thetaMin) / (uSize - 1); ! float vDelta = 1f / (vSize - 1); ! Point3fGrid P = shaderVariables.P; ! float theta = thetaMin; ! for (int u = 0; u < uSize; u++) { ! float cosTheta = (float) Math.cos(theta); ! float sinTheta = (float) Math.sin(theta); ! float nv = 0f; ! for (int v = 0; v < vSize; v++) { ! float xr = (1f - nv) * x1 + nv * x2; ! float yr = (1f - nv) * y1 + nv * y2; ! float zr = (1f - nv) * z1 + nv * z2; ! tmp.x = xr * cosTheta - yr * sinTheta; ! tmp.y = xr * sinTheta + yr * cosTheta; ! tmp.z = zr; ! P.set(u, v, tmp); ! nv += vDelta; ! } ! theta += thetaDelta; ! } ! } ! ! protected void dice_Ng(ShaderVariables shaderVariables) { ! int uSize = Grid.getUSize(); ! int vSize = Grid.getVSize(); ! float thetaDelta = (thetaMax - thetaMin) / (uSize - 1); ! Vector3fGrid Ng = shaderVariables.Ng; ! for (int u = 0; u < uSize; u++) { ! float theta = thetaMin + thetaDelta * u; ! float cosTheta = (float) Math.cos(theta); ! float sinTheta = (float) Math.sin(theta); ! float x11 = x1 * cosTheta - y1 * sinTheta; ! float x22 = x2 * cosTheta - y2 * sinTheta; ! float y11 = x1 * sinTheta + y1 * cosTheta; ! float y22 = x2 * sinTheta + y2 * cosTheta; ! p1.set(x11, y11, z1); ! p2.set(x22, y22, z2); ! v1.sub(p1, p2); ! for (int v = 0; v < vSize; v++) { ! float nv = (float) v / (vSize - 1); ! float xi = (1f - nv) * x11 + nv * x22; ! float yi = (1f - nv) * y11 + nv * y22; ! v2.set(-yi, xi, 0f); ! vtmp.cross(v1, v2); ! Ng.set(u, v, vtmp); ! } ! } ! } ! } Index: Disk.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/Disk.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Disk.java 25 Dec 2006 07:50:37 -0000 1.11 --- Disk.java 26 Feb 2007 19:35:51 -0000 1.12 *************** *** 48,59 **** private float rMin; ! public Disk( ! float height, ! float thetaMin, ! float thetaMax, ! float rMin, ! float rMax, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.height = height; --- 48,58 ---- private float rMin; ! public Disk(float height, ! float thetaMin, ! float thetaMax, ! float rMin, ! float rMax, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.height = height; *************** *** 108,149 **** if ((thetaMax - thetaMin) * (rMax + rMin) / 2f > rMax - rMin) { ! result[0] = ! new Disk( ! height, ! thetaMin, ! (thetaMin + thetaMax) / 2f, ! rMin, ! rMax, ! bilinearInterpolateParameters(0f, .5f, 0f, 1f), ! attributes); ! result[1] = ! new Disk( ! height, ! (thetaMin + thetaMax) / 2f, ! thetaMax, ! rMin, ! rMax, ! bilinearInterpolateParameters(.5f, 1f, 0f, 1f), ! attributes); ! } ! else{ ! result[0] = ! new Disk( ! height, ! thetaMin, ! thetaMax, ! rMin, ! (rMax + rMin)/2f, ! bilinearInterpolateParameters(0f, 1f, .5f, 1f), ! attributes); ! result[1] = ! new Disk( ! height, ! thetaMin, ! thetaMax, ! (rMax + rMin)/2f, ! rMax, ! bilinearInterpolateParameters(0f, 1f, 0f, .5f), ! attributes); } return result; --- 107,139 ---- if ((thetaMax - thetaMin) * (rMax + rMin) / 2f > rMax - rMin) { ! result[0] = new Disk(height, ! thetaMin, ! (thetaMin + thetaMax) / 2f, ! rMin, ! rMax, ! bilinearInterpolateParameters(0f, .5f, 0f, 1f), ! attributes); ! result[1] = new Disk(height, ! (thetaMin + thetaMax) / 2f, ! thetaMax, ! rMin, ! rMax, ! bilinearInterpolateParameters(.5f, 1f, 0f, 1f), ! attributes); ! } else{ ! result[0] = new Disk(height, ! thetaMin, ! thetaMax, ! rMin, ! (rMax + rMin)/2f, ! bilinearInterpolateParameters(0f, 1f, .5f, 1f), ! attributes); ! result[1] = new Disk(height, ! thetaMin, ! thetaMax, ! (rMax + rMin)/2f, ! rMax, ! bilinearInterpolateParameters(0f, 1f, 0f, .5f), ! attributes); } return result; Index: CubicCurve.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/CubicCurve.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CubicCurve.java 4 Feb 2007 06:27:13 -0000 1.7 --- CubicCurve.java 26 Feb 2007 19:35:51 -0000 1.8 *************** *** 465,482 **** } - /* - protected void dice_v(ShaderVariables shaderVariables) { - FloatGrid g = shaderVariables.v; - int vSize = Grid.getVSize(); - float vStep = 1f / (vSize - 1); - float v = 0; - for (int i = 0; i < vSize; i++) { - g.set(0, i, v); - g.set(1, i, v); - v += vStep; - } - } - */ - } --- 465,468 ---- Index: Primitive.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/Primitive.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** Primitive.java 30 Dec 2006 13:49:22 -0000 1.40 --- Primitive.java 26 Feb 2007 19:35:52 -0000 1.41 *************** *** 252,256 **** } ! public static void setDefaultParameters(ParameterList parameters, Attributes attributes) { Parameter parameter = parameters.getParameter("u"); if (parameter == null) { --- 252,257 ---- } ! public static void setDefaultParameters(ParameterList parameters, ! Attributes attributes) { Parameter parameter = parameters.getParameter("u"); if (parameter == null) { *************** *** 276,280 **** (VaryingArrayFloat) parameters.getParameter("st"); if (stParam != null) { ! parameters.addParameter(stParam.extract(Global.getDeclaration("s"), 0)); } else { float[] s = new float[4]; --- 277,283 ---- (VaryingArrayFloat) parameters.getParameter("st"); if (stParam != null) { ! parameters.addParameter( ! stParam.extract(Global.getDeclaration("s"), ! 0)); } else { float[] s = new float[4]; *************** *** 291,295 **** s[3] = 1; } ! parameters.addParameter(new VaryingScalarFloat(Global.getDeclaration("s"), s)); } } --- 294,300 ---- s[3] = 1; } ! parameters.addParameter( ! new VaryingScalarFloat(Global.getDeclaration("s"), ! s)); } } *************** *** 299,303 **** (VaryingArrayFloat) parameters.getParameter("st"); if (stParam != null) { ! parameters.addParameter(stParam.extract(Global.getDeclaration("t"), 1)); } else { float[] t = new float[4]; --- 304,310 ---- (VaryingArrayFloat) parameters.getParameter("st"); if (stParam != null) { ! parameters.addParameter( ! stParam.extract(Global.getDeclaration("t"), ! 1)); } else { float[] t = new float[4]; *************** *** 314,318 **** t[3] = 1; } ! parameters.addParameter(new VaryingScalarFloat(Global.getDeclaration("t"), t)); } } --- 321,327 ---- t[3] = 1; } ! parameters.addParameter( ! new VaryingScalarFloat(Global.getDeclaration("t"), ! t)); } } *************** *** 324,332 **** } ! protected ParameterList bilinearInterpolateParameters( ! float uMin, ! float uMax, ! float vMin, ! float vMax) { return parameters.bilinearInterpolate(uMin, uMax, vMin, vMax); } --- 333,340 ---- } ! protected ParameterList bilinearInterpolateParameters(float uMin, ! float uMax, ! float vMin, ! float vMax) { return parameters.bilinearInterpolate(uMin, uMax, vMin, vMax); } *************** *** 335,339 **** float width = rasterBounds.getWidth() - screenDisplacementWidth; float height = rasterBounds.getHeight() - screenDisplacementHeight; ! boolean ready = width * height <= gridSize * attributes.getShadingRate(); if (!ready) return false; --- 343,348 ---- float width = rasterBounds.getWidth() - screenDisplacementWidth; float height = rasterBounds.getHeight() - screenDisplacementHeight; ! boolean ready = width * height <= ! gridSize * attributes.getShadingRate(); if (!ready) return false; Index: Point.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/Point.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Point.java 24 Dec 2006 05:25:57 -0000 1.9 --- Point.java 26 Feb 2007 19:35:52 -0000 1.10 *************** *** 52,62 **** private float z; ! public Point( ! float width, ! float x, ! float y, ! float z, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.x = x; --- 52,61 ---- private float z; ! public Point(float width, ! float x, ! float y, ! float z, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.x = x; *************** *** 67,78 **** public BoundingVolume getBoundingVolume() { ! Bounds3f result = ! new Bounds3f( ! x - width / 2f, ! x + width / 2f, ! y - width / 2f, ! y + width / 2f, ! z - width / 2f, ! z + width / 2f); return result; } --- 66,75 ---- public BoundingVolume getBoundingVolume() { ! Bounds3f result = new Bounds3f(x - width / 2f, ! x + width / 2f, ! y - width / 2f, ! y + width / 2f, ! z - width / 2f, ! z + width / 2f); return result; } *************** *** 109,113 **** float twidth = v.length(); float halfWidth = twidth / 2f; ! float height = (float) (Math.sqrt(twidth * twidth - halfWidth * halfWidth)) / 2f; v.set(0f, 0f, -1f); Point3fGrid P = shaderVariables.P; --- 106,111 ---- float twidth = v.length(); float halfWidth = twidth / 2f; ! float height = (float) ! (Math.sqrt(twidth * twidth - halfWidth * halfWidth)) / 2f; v.set(0f, 0f, -1f); Point3fGrid P = shaderVariables.P; Index: Paraboloid.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/Paraboloid.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Paraboloid.java 25 Dec 2006 07:50:37 -0000 1.10 --- Paraboloid.java 26 Feb 2007 19:35:52 -0000 1.11 *************** *** 54,68 **** private float maxTheta; ! public Paraboloid( ! float radius, ! float zMin, ! float zMax, ! float thetaMin, ! float thetaMax, ! float minZ, ! float maxZ, ! float maxTheta, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.radius = radius; --- 54,67 ---- private float maxTheta; ! public Paraboloid(float radius, ! float zMin, ! float zMax, ! float thetaMin, ! float thetaMax, ! float minZ, ! float maxZ, ! float maxTheta, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.radius = radius; *************** *** 120,177 **** public Primitive[] split() { Primitive[] result = new Primitive[2]; ! float r = ! Math.max( ! radius * (float) Math.sqrt(zMin / maxZ), ! radius * (float) Math.sqrt(zMax / maxZ)); if ((thetaMax - thetaMin) * r > zMax - zMin) { ! result[0] = ! new Paraboloid( ! radius, ! zMin, ! zMax, ! thetaMin, ! (thetaMin + thetaMax) / 2f, ! minZ, ! maxZ, ! maxTheta, ! bilinearInterpolateParameters(0f, .5f, 0f, 1f), ! attributes); ! result[1] = ! new Paraboloid( ! radius, ! zMin, ! zMax, ! (thetaMin + thetaMax) / 2f, ! thetaMax, ! minZ, ! maxZ, ! maxTheta, ! bilinearInterpolateParameters(.5f, 1f, 0f, 1f), ! attributes); } else { ! result[0] = ! new Paraboloid( ! radius, ! zMin, ! (zMin + zMax) / 2f, ! thetaMin, ! thetaMax, ! minZ, ! maxZ, ! maxTheta, ! bilinearInterpolateParameters(0f, 1f, 0f, .5f), ! attributes); ! result[1] = ! new Paraboloid( ! radius, ! (zMin + zMax) / 2f, ! zMax, ! thetaMin, ! thetaMax, ! minZ, ! maxZ, ! maxTheta, ! bilinearInterpolateParameters(0f, 1f, .5f, 1f), ! attributes); } return result; --- 119,170 ---- public Primitive[] split() { Primitive[] result = new Primitive[2]; ! float r = Math.max(radius * (float) Math.sqrt(zMin / maxZ), ! radius * (float) Math.sqrt(zMax / maxZ)); if ((thetaMax - thetaMin) * r > zMax - zMin) { ! result[0] = new Paraboloid(radius, ! zMin, ! zMax, ! thetaMin, ! (thetaMin + thetaMax) / 2f, ! minZ, ! maxZ, ! maxTheta, ! bilinearInterpolateParameters(0f, .5f, ! 0f, 1f), ! attributes); ! result[1] = new Paraboloid(radius, ! zMin, ! zMax, ! (thetaMin + thetaMax) / 2f, ! thetaMax, ! minZ, ! maxZ, ! maxTheta, ! bilinearInterpolateParameters(.5f, 1f, ! 0f, 1f), ! attributes); } else { ! result[0] = new Paraboloid(radius, ! zMin, ! (zMin + zMax) / 2f, ! thetaMin, ! thetaMax, ! minZ, ! maxZ, ! maxTheta, ! bilinearInterpolateParameters(0f, 1f, ! 0f, .5f), ! attributes); ! result[1] = new Paraboloid(radius, ! (zMin + zMax) / 2f, ! zMax, ! thetaMin, ! thetaMax, ! minZ, ! maxZ, ! maxTheta, ! bilinearInterpolateParameters(0f, 1f, ! .5f, 1f), ! attributes); } return result; *************** *** 215,225 **** vtmp.x = r * cosTheta * dZ; vtmp.y = r * sinTheta * dZ; ! vtmp.z = ! -0.5f ! * radius ! * radius ! * dZ ! / maxZ ! * (sinTheta * sinTheta + cosTheta * cosTheta); Ng.set(u, v, vtmp); } --- 208,213 ---- vtmp.x = r * cosTheta * dZ; vtmp.y = r * sinTheta * dZ; ! vtmp.z = -0.5f * radius * radius * dZ / maxZ ! * (sinTheta * sinTheta + cosTheta * cosTheta); Ng.set(u, v, vtmp); } Index: Cone.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/Cone.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Cone.java 25 Dec 2006 07:50:37 -0000 1.9 --- Cone.java 26 Feb 2007 19:35:51 -0000 1.10 *************** *** 50,62 **** private float height; ! public Cone( ! float radius, ! float zmin, ! float zmax, ! float thetaMin, ! float thetaMax, ! float height, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.radius = radius; --- 50,61 ---- private float height; ! public Cone(float radius, ! float zmin, ! float zmax, ! float thetaMin, ! float thetaMax, ! float height, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.radius = radius; *************** *** 115,159 **** radius * (1 - zmin / height)); if ((thetaMax - thetaMin) * r > zmax - zmin) { ! result[0] = ! new Cone( ! radius, ! zmin, ! zmax, ! thetaMin, ! (thetaMin + thetaMax) / 2f, ! height, ! bilinearInterpolateParameters(0f, .5f, 0f, 1f), ! attributes); ! result[1] = ! new Cone( ! radius, ! zmin, ! zmax, ! (thetaMin + thetaMax) / 2f, ! thetaMax, ! height, ! bilinearInterpolateParameters(.5f, 1f, 0f, 1f), ! attributes); } else { ! result[0] = ! new Cone( ! radius, ! zmin, ! (zmin + zmax) / 2f, ! thetaMin, ! thetaMax, ! height, ! bilinearInterpolateParameters(0f, 1f, 0f, .5f), ! attributes); ! result[1] = ! new Cone( ! radius, ! (zmin + zmax) / 2f, ! zmax, ! thetaMin, ! thetaMax, ! height, ! bilinearInterpolateParameters(0f, 1f, .5f, 1f), ! attributes); } return result; --- 114,150 ---- radius * (1 - zmin / height)); if ((thetaMax - thetaMin) * r > zmax - zmin) { ! result[0] = new Cone(radius, ! zmin, ! zmax, ! thetaMin, ! (thetaMin + thetaMax) / 2f, ! height, ! bilinearInterpolateParameters(0f, .5f, 0f, 1f), ! attributes); ! result[1] = new Cone(radius, ! zmin, ! zmax, ! (thetaMin + thetaMax) / 2f, ! thetaMax, ! height, ! bilinearInterpolateParameters(.5f, 1f, 0f, 1f), ! attributes); } else { ! result[0] = new Cone(radius, ! zmin, ! (zmin + zmax) / 2f, ! thetaMin, ! thetaMax, ! height, ! bilinearInterpolateParameters(0f, 1f, 0f, .5f), ! attributes); ! result[1] = new Cone(radius, ! (zmin + zmax) / 2f, ! zmax, ! thetaMin, ! thetaMax, ! height, ! bilinearInterpolateParameters(0f, 1f, .5f, 1f), ! attributes); } return result; Index: BilinearPatch.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/BilinearPatch.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** BilinearPatch.java 24 Dec 2006 05:25:57 -0000 1.10 --- BilinearPatch.java 26 Feb 2007 19:35:51 -0000 1.11 *************** *** 80,91 **** if (ul > vl) { result[0] = ! new BilinearPatch(bilinearInterpolateParameters(0f, .5f, 0f, 1f), attributes); result[1] = ! new BilinearPatch(bilinearInterpolateParameters(.5f, 1f, 0f, 1f), attributes); } else { result[0] = ! new BilinearPatch(bilinearInterpolateParameters(0f, 1f, 0f, .5f), attributes); result[1] = ! new BilinearPatch(bilinearInterpolateParameters(0f, 1f, .5f, 1f), attributes); } return result; --- 80,99 ---- if (ul > vl) { result[0] = ! new BilinearPatch(bilinearInterpolateParameters(0f, .5f, ! 0f, 1f), ! attributes); result[1] = ! new BilinearPatch(bilinearInterpolateParameters(.5f, 1f, ! 0f, 1f), ! attributes); } else { result[0] = ! new BilinearPatch(bilinearInterpolateParameters(0f, 1f, ! 0f, .5f), ! attributes); result[1] = ! new BilinearPatch(bilinearInterpolateParameters(0f, 1f, ! .5f, 1f), ! attributes); } return result; Index: Cylinder.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/Cylinder.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Cylinder.java 25 Dec 2006 07:50:37 -0000 1.9 --- Cylinder.java 26 Feb 2007 19:35:51 -0000 1.10 *************** *** 48,59 **** float thetaMax; ! public Cylinder( ! float radius, ! float zmin, ! float zmax, ! float thetaMin, ! float thetaMax, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.radius = radius; --- 48,58 ---- float thetaMax; ! public Cylinder(float radius, ! float zmin, ! float zmax, ! float thetaMin, ! float thetaMax, ! ParameterList parameters, ! Attributes attributes) { super(parameters, attributes); this.radius = radius; *************** *** 99,139 **** Primitive[] result = new Primitive[2]; if ((thetaMax - thetaMin) * radius > zmax - zmin) { ! result[0] = ! new Cylinder( ! radius, ! zmin, ! zmax, ! thetaMin, ! (thetaMin + thetaMax) / 2f, ! bilinearInterpolateParameters(0f, .5f, 0f, 1f), ! attributes); ! result[1] = ! new Cylinder( ! radius, ! zmin, ! zmax, ! (thetaMin + thetaMax) / 2f, ! thetaMax, ! bilinearInterpolateParameters(.5f, 1f, 0f, 1f), ! attributes); } else { ! result[0] = ! new Cylinder( ! radius, ! zmin, ! (zmin + zmax) / 2f, ! thetaMin, ! thetaMax, ! bilinearInterpolateParameters(0f, 1f, 0f, .5f), ! attributes); ! result[1] = ! new Cylinder( ! radius, ! (zmin + zmax) / 2f, ! zmax, ! thetaMin, ! thetaMax, ! bilinearInterpolateParameters(0f, 1f, .5f, 1f), ! attributes); } return result; --- 98,134 ---- Primitive[] result = new Primitive[2]; if ((thetaMax - thetaMin) * radius > zmax - zmin) { ! result[0] = new Cylinder(radius, ! zmin, ! zmax, ! thetaMin, ! (thetaMin... [truncated message content] |
From: Gerardo H. <ma...@us...> - 2007-02-26 15:25:22
|
Update of /cvsroot/jrman/drafts/src/org/jrman/primitive In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16144/src/org/jrman/primitive Modified Files: PointsPolygons.java Added Files: SubdivisionMesh.java Log Message: Started working on SubdivisionMeshes. Started migration to Java 5. Index: PointsPolygons.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/PointsPolygons.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PointsPolygons.java 24 Dec 2006 05:25:57 -0000 1.6 --- PointsPolygons.java 26 Feb 2007 15:25:15 -0000 1.7 *************** *** 1,5 **** /* ! PointsPolygon.java ! Copyright (C) 2004 Gerardo Horvilleur Martinez This program is free software; you can redistribute it and/or --- 1,5 ---- /* ! PointsPolygons.java ! Copyright (C) 2004, 2007 Gerardo Horvilleur Martinez This program is free software; you can redistribute it and/or --- NEW FILE: SubdivisionMesh.java --- /* SubdivisionMesh.java Copyright (C) 2007 Gerardo Horvilleur Martinez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 A 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. */ package org.jrman.primitive; import javax.vecmath.Point3f; import org.jrman.attributes.Attributes; import org.jrman.geom.BoundingVolume; import org.jrman.geom.ConvexHull3f; import org.jrman.geom.MutableBounds3f; import org.jrman.parameters.ParameterList; import org.jrman.parameters.VaryingScalarTuple3f; public class SubdivisionMesh extends Primitive { static Point3f tmpPoint = new Point3f(); int[] nvertices; int[] vertices; String[] tags; int[] nargs; int[] intargs; float[] floatargs; VaryingScalarTuple3f points; public SubdivisionMesh(String scheme, int[] nvertices, int[] vertices, String[] tags, int[] nargs, int[] intargs, float[] floatargs, ParameterList parameters, Attributes attributes) { if (!scheme.equals("catmull-clark")) throw new IllegalArgumentException("Subdivison scheme " + scheme + " not supported"); this.parameters = parameters; this.attributes = attributes; this.nvertices = nvertices; this.vertices = vertices; this.tags = tags; this.nargs = nargs; this.intargs = intargs; this.floatargs = floatargs; points = (VaryingScalarTuple3f) parameters.getParameter("P"); parameters.removeParameter("P"); } public BoundingVolume getBoundingVolume() { MutableBounds3f mb = new MutableBounds3f(); for (int i = 0, n = points.getCount(); i < n; i++) { points.getValue(i, tmpPoint); mb.addPoint(tmpPoint); } return mb; } public Primitive[] split() { return null; } public boolean isReadyToBeDiced(int gridsize) { return false; } } |
From: Gerardo H. <ma...@us...> - 2007-02-26 15:25:22
|
Update of /cvsroot/jrman/drafts/src/org/jrman/parser/keywords In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16144/src/org/jrman/parser/keywords Modified Files: AbstractKeywordParser.java KeywordMotionBegin.java KeywordNuPatch.java KeywordPointsPolygons.java KeywordProcedural.java KeywordSubdivisionMesh.java Log Message: Started working on SubdivisionMeshes. Started migration to Java 5. Index: KeywordProcedural.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordProcedural.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordProcedural.java 12 Sep 2004 00:10:47 -0000 1.3 --- KeywordProcedural.java 26 Feb 2007 15:25:15 -0000 1.4 *************** *** 1,5 **** /* KeywordProcedural.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez This program is free software; you can redistribute it and/or --- 1,5 ---- /* KeywordProcedural.java ! Copyright (C) 2003, 2007 Gerardo Horvilleur Martinez This program is free software; you can redistribute it and/or *************** *** 30,48 **** // Expect args ! parseArray(st); String[] args = new String[arraySize]; System.arraycopy(strings, 0, args, 0, arraySize); // Expect bounds ! parseArray(st); if (arraySize != 6) throw new Exception("Invalid number of arguments for bounding box: " + arraySize); ! float xmin = numbers[0]; ! float xmax = numbers[1]; ! float ymin = numbers[2]; ! float ymax = numbers[3]; ! float zmin = numbers[4]; ! float zmax = numbers[5]; if (s.equals("DelayedReadArchive")) { if (args.length != 1) --- 30,48 ---- // Expect args ! parseStringArray(st); String[] args = new String[arraySize]; System.arraycopy(strings, 0, args, 0, arraySize); // Expect bounds ! parseFloatArray(st); if (arraySize != 6) throw new Exception("Invalid number of arguments for bounding box: " + arraySize); ! float xmin = floats[0]; ! float xmax = floats[1]; ! float ymin = floats[2]; ! float ymax = floats[3]; ! float zmin = floats[4]; ! float zmax = floats[5]; if (s.equals("DelayedReadArchive")) { if (args.length != 1) Index: KeywordMotionBegin.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordMotionBegin.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KeywordMotionBegin.java 7 Apr 2003 08:24:25 -0000 1.2 --- KeywordMotionBegin.java 26 Feb 2007 15:25:15 -0000 1.3 *************** *** 25,29 **** public void parse(Tokenizer st) throws Exception { ! float[] times = readFloatArray(st); parser.motionBegin(times); --- 25,31 ---- public void parse(Tokenizer st) throws Exception { ! parseFloatArray(st); ! float[] times = new float[arraySize]; ! System.arraycopy(floats, 0, times, 0, arraySize); parser.motionBegin(times); Index: KeywordPointsPolygons.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordPointsPolygons.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** KeywordPointsPolygons.java 20 Dec 2004 03:22:52 -0000 1.7 --- KeywordPointsPolygons.java 26 Feb 2007 15:25:15 -0000 1.8 *************** *** 38,42 **** // Expect parameter list ! ParameterList parameterList = parseParameterList(st); parser.addPointsPolygons(nVertices, vertices, parameterList); } --- 38,43 ---- // Expect parameter list ! ParameterList parameterList = parseParameterList(st); ! parser.addPointsPolygons(nVertices, vertices, parameterList); } Index: KeywordSubdivisionMesh.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordSubdivisionMesh.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KeywordSubdivisionMesh.java 7 Apr 2003 08:24:24 -0000 1.2 --- KeywordSubdivisionMesh.java 26 Feb 2007 15:25:15 -0000 1.3 *************** *** 1,5 **** /* KeywordSubdivisionMesh.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez This program is free software; you can redistribute it and/or --- 1,5 ---- /* KeywordSubdivisionMesh.java ! Copyright (C) 2003, 2007 Gerardo Horvilleur Martinez This program is free software; you can redistribute it and/or *************** *** 20,23 **** --- 20,24 ---- package org.jrman.parser.keywords; + import org.jrman.parameters.ParameterList; import org.jrman.parser.Tokenizer; *************** *** 27,51 **** // Expect scheme match(st, TK_STRING); // Expect nvertices ! parseArray(st); // Expect vertices ! parseArray(st); // Expect tags ! parseArray(st); // Expect nargs ! parseArray(st); // Expect intargs ! parseArray(st); // Expect floatargs ! parseArray(st); // Expect parameter list ! parseParameterList(st); } --- 28,69 ---- // Expect scheme match(st, TK_STRING); + String scheme = st.sval; // Expect nvertices ! parseIntegerArray(st); ! int[] nvertices = new int[arraySize]; ! System.arraycopy(integers, 0, nvertices, 0, arraySize); // Expect vertices ! parseIntegerArray(st); ! int[] vertices = new int[arraySize]; ! System.arraycopy(integers, 0, vertices, 0, arraySize); // Expect tags ! parseStringArray(st); ! String[] tags = new String[arraySize]; ! System.arraycopy(strings, 0, tags, 0, arraySize); // Expect nargs ! parseIntegerArray(st); ! int[] nargs = new int[arraySize]; ! System.arraycopy(integers, 0, nargs, 0, arraySize); // Expect intargs ! parseIntegerArray(st); ! int[] intargs = new int[arraySize]; ! System.arraycopy(intargs, 0, intargs, 0, arraySize); // Expect floatargs ! parseFloatArray(st); ! float[] floatargs = new float[arraySize]; ! System.arraycopy(floatargs, 0, floatargs, 0, arraySize); // Expect parameter list ! ParameterList parameterList = parseParameterList(st); ! ! parser.addSubdivisionMesh(scheme, nvertices, vertices, ! tags, nargs, intargs, floatargs, ! parameterList); } Index: AbstractKeywordParser.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/AbstractKeywordParser.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AbstractKeywordParser.java 4 Jul 2005 06:32:04 -0000 1.14 --- AbstractKeywordParser.java 26 Feb 2007 15:25:15 -0000 1.15 *************** *** 20,24 **** package org.jrman.parser.keywords; - import java.io.IOException; import java.io.StreamTokenizer; import java.util.ArrayList; --- 20,23 ---- *************** *** 55,59 **** final static int TK_RBRACE = ']'; ! protected static float[] numbers = new float[5000]; protected static int[] integers = new int[5000]; --- 54,58 ---- final static int TK_RBRACE = ']'; ! protected static float[] floats = new float[5000]; protected static int[] integers = new int[5000]; *************** *** 70,74 **** public static void reset() { ! numbers = new float[5000]; integers = new int[5000]; strings = new String[10]; --- 69,73 ---- public static void reset() { ! floats = new float[5000]; integers = new int[5000]; strings = new String[10]; *************** *** 116,120 **** } ! protected Bounds3f readBounds(Tokenizer st) throws IOException, Exception { boolean array = false; int token = st.nextToken(); --- 115,119 ---- } ! protected Bounds3f readBounds(Tokenizer st) throws Exception { boolean array = false; int token = st.nextToken(); *************** *** 206,210 **** } ! protected Color3f parseColor(Tokenizer st) throws IOException, Exception { boolean array = false; int token = st.nextToken(); --- 205,209 ---- } ! protected Color3f parseColor(Tokenizer st) throws Exception { boolean array = false; int token = st.nextToken(); *************** *** 233,276 **** } ! protected float[] readFloatArray(Tokenizer st) throws Exception, IOException { ! List floats = new ArrayList(); // Expect array start match(st, TK_LBRACE); ! // Expect a variable length sequence of numbers ! while (st.nextToken() == TK_NUMBER) ! floats.add(new Float(st.nval)); st.pushBack(); - float[] result = new float[floats.size()]; - for (int i = 0; i < floats.size(); i++) - result[i] = ((Float) floats.get(i)).floatValue(); // Expect array end match(st, TK_RBRACE); - return result; } ! /* ! protected Map parseParameterList(Tokenizer st) throws Exception { ! List list = new ArrayList(); ! // Expect list of key & value pairs while (st.nextToken() == TK_STRING) { ! list.add(st.sval); ! int token = st.nextToken(); ! if (token == TK_LBRACE) { ! st.pushBack(); ! list.add(parseArray(st)); ! } else if (token == TK_NUMBER) { ! List array = new ArrayList(); ! array.add(new Float((float) st.nval)); ! list.add(array); ! } else if (token == TK_STRING) { ! List array = new ArrayList(); ! array.add(st.sval); ! list.add(array); } } st.pushBack(); ! return parser.translateParameterList(list); } - */ protected void parseArray(Tokenizer st) throws Exception { --- 232,288 ---- } ! protected void parseIntegerArray(Tokenizer st) throws Exception { ! arraySize = 0; // Expect array start match(st, TK_LBRACE); ! // Expect a variable length sequence of integers ! while (st.nextToken() == TK_NUMBER) { ! if (arraySize == integers.length) { ! int[] tmp = new int[integers.length * 2]; ! System.arraycopy(integers, 0, tmp, 0, integers.length); ! integers = tmp; ! } ! integers[arraySize++] = (int) st.nval; ! } st.pushBack(); // Expect array end match(st, TK_RBRACE); } ! protected void parseFloatArray(Tokenizer st) throws Exception { ! arraySize = 0; ! // Expect array start ! match(st, TK_LBRACE); ! // Expect a variable length sequence of floats ! while (st.nextToken() == TK_NUMBER) { ! if (arraySize == floats.length) { ! float[] tmp = new float[floats.length * 2]; ! System.arraycopy(floats, 0, tmp, 0, floats.length); ! floats = tmp; ! } ! floats[arraySize++] = st.nval; ! } ! st.pushBack(); ! // Expect array end ! match(st, TK_RBRACE); ! } ! ! protected void parseStringArray(Tokenizer st) throws Exception { ! arraySize = 0; ! // Expect array start ! match(st, TK_LBRACE); ! // Expect a variable length sequence of strings while (st.nextToken() == TK_STRING) { ! if (arraySize == strings.length) { ! String[] tmp = new String[strings.length * 2]; ! System.arraycopy(strings, 0, tmp, 0, strings.length); ! strings = tmp; } + strings[arraySize++] = st.sval; } st.pushBack(); ! // Expect array end ! match(st, TK_RBRACE); } protected void parseArray(Tokenizer st) throws Exception { *************** *** 283,292 **** switch (token) { case TK_NUMBER : ! if (arraySize == numbers.length) { ! float[] tmp = new float[numbers.length * 2]; ! System.arraycopy(numbers, 0, tmp, 0, numbers.length); ! numbers = tmp; } ! numbers[arraySize++] = st.nval; break; case TK_STRING : --- 295,304 ---- switch (token) { case TK_NUMBER : ! if (arraySize == floats.length) { ! float[] tmp = new float[floats.length * 2]; ! System.arraycopy(floats, 0, tmp, 0, floats.length); ! floats = tmp; } ! floats[arraySize++] = st.nval; break; case TK_STRING : *************** *** 304,325 **** } - protected void parseIntegerArray(Tokenizer st) throws Exception { - arraySize = 0; - // Expect array start - match(st, TK_LBRACE); - // Expect a variable length sequence of integers - while (st.nextToken() == TK_NUMBER) { - if (arraySize == integers.length) { - int[] tmp = new int[integers.length * 2]; - System.arraycopy(integers, 0, tmp, 0, integers.length); - integers = tmp; - } - integers[arraySize++] = (int) st.nval; - } - st.pushBack(); - // Expect array end - match(st, TK_RBRACE); - } - private Declaration getDeclaration(String name) { Declaration declaration = Global.getDeclaration(name); --- 316,319 ---- *************** *** 356,360 **** parseArray(st); } else if (token == TK_NUMBER) { ! numbers[0] = st.nval; arraySize = 1; } else if (token == TK_STRING) { --- 350,354 ---- parseArray(st); } else if (token == TK_NUMBER) { ! floats[0] = st.nval; arraySize = 1; } else if (token == TK_STRING) { *************** *** 362,366 **** arraySize = 1; } ! parameters.addParameter(declaration.buildParameter(numbers, strings, arraySize)); } st.pushBack(); --- 356,362 ---- arraySize = 1; } ! parameters.addParameter(declaration.buildParameter(floats, ! strings, ! arraySize)); } st.pushBack(); Index: KeywordNuPatch.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordNuPatch.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeywordNuPatch.java 29 Mar 2004 16:47:30 -0000 1.3 --- KeywordNuPatch.java 26 Feb 2007 15:25:15 -0000 1.4 *************** *** 1,5 **** /* KeywordNuPatch.java ! Copyright (C) 2003 Gerardo Horvilleur Martinez This program is free software; you can redistribute it and/or --- 1,5 ---- /* KeywordNuPatch.java ! Copyright (C) 2003, 2006, 2007 Gerardo Horvilleur Martinez This program is free software; you can redistribute it and/or *************** *** 35,41 **** // Expect u knot ! parseArray(st); float[] uknot = new float[arraySize]; ! System.arraycopy(numbers, 0, uknot, 0, arraySize); // Expect u min --- 35,41 ---- // Expect u knot ! parseFloatArray(st); float[] uknot = new float[arraySize]; ! System.arraycopy(floats, 0, uknot, 0, arraySize); // Expect u min *************** *** 56,62 **** // Expect v knot ! parseArray(st); float[] vknot = new float[arraySize]; ! System.arraycopy(numbers, 0, vknot, 0, arraySize); // Expect v min --- 56,62 ---- // Expect v knot ! parseFloatArray(st); float[] vknot = new float[arraySize]; ! System.arraycopy(floats, 0, vknot, 0, arraySize); // Expect v min |
From: Gerardo H. <ma...@us...> - 2007-02-26 15:25:20
|
Update of /cvsroot/jrman/drafts/src/net/falappa/swing In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16144/src/net/falappa/swing Modified Files: ExtensionFileFilter.java Log Message: Started working on SubdivisionMeshes. Started migration to Java 5. Index: ExtensionFileFilter.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/net/falappa/swing/ExtensionFileFilter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ExtensionFileFilter.java 12 Dec 2003 09:31:45 -0000 1.1 --- ExtensionFileFilter.java 26 Feb 2007 15:25:14 -0000 1.2 *************** *** 38,42 **** MessageFormat.format( messagesBundle.getString("ExtensionFileFilter.description"), //$NON-NLS-1$ ! new String[] { ext.toUpperCase(), ext }); } --- 38,42 ---- MessageFormat.format( messagesBundle.getString("ExtensionFileFilter.description"), //$NON-NLS-1$ ! ext.toUpperCase(), ext ); } |
From: Gerardo H. <ma...@us...> - 2007-02-26 15:25:19
|
Update of /cvsroot/jrman/drafts/src/org/jrman/parser In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16144/src/org/jrman/parser Modified Files: Parser.java Log Message: Started working on SubdivisionMeshes. Started migration to Java 5. Index: Parser.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/Parser.java,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** Parser.java 25 Dec 2006 07:50:37 -0000 1.109 --- Parser.java 26 Feb 2007 15:25:14 -0000 1.110 *************** *** 89,92 **** --- 89,93 ---- import org.jrman.primitive.Primitive; import org.jrman.primitive.Sphere; + import org.jrman.primitive.SubdivisionMesh; import org.jrman.primitive.Torus; import org.jrman.render.Renderer; *************** *** 173,176 **** --- 174,179 ---- private int curveCount; + + private int subdivMeshesCount; public static class State { *************** *** 1515,1518 **** --- 1518,1563 ---- } + public void addSubdivisionMesh(final String scheme, + final int[] nvertices, + final int[] vertices, + final String[] tags, + final int[] nargs, + final int[] intargs, + final float[] floatargs, + final ParameterList parameters) { + if (inAreaLightSource) + return; + if (!inObject) { + renderer.addPrimitive(new SubdivisionMesh(scheme, + nvertices, + vertices, + tags, + nargs, + intargs, + floatargs, + parameters, + getAttributes())); + subdivMeshesCount++; + } else { + final Transform transform = currentAttributes.getTransform(); + currentObjectInstanceList + .addPrimitiveCreator(new ObjectInstanceList.PrimitiveCreator() { + public Primitive create(Attributes attributes) { + subdivMeshesCount++; + return new SubdivisionMesh(scheme, + nvertices, + vertices, + tags, + nargs, + intargs, + floatargs, + parameters, + createAttributes(transform, + attributes)); + } + }); + } + } + public void addDelayedReadArchive(String filename, float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) { *************** *** 1601,1603 **** --- 1646,1652 ---- } + public int getSubdivMeshesCount() { + return subdivMeshesCount; + } + } |
From: Gerardo H. <ma...@us...> - 2007-02-26 15:25:19
|
Update of /cvsroot/jrman/drafts/src/net/falappa/imageio In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16144/src/net/falappa/imageio Modified Files: ImageReaderSpiFileFilter.java ImageViewerPanelSaveAction.java ImageWriterSpiFileFilter.java Log Message: Started working on SubdivisionMeshes. Started migration to Java 5. Index: ImageViewerPanelSaveAction.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/net/falappa/imageio/ImageViewerPanelSaveAction.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ImageViewerPanelSaveAction.java 27 Dec 2006 16:30:18 -0000 1.5 --- ImageViewerPanelSaveAction.java 26 Feb 2007 15:25:14 -0000 1.6 *************** *** 117,121 **** .getString("ImageViewerPanelSaveAction.Overwrite_question_5"), //$NON-NLS-1$ ! new String[] { fileName }); if (JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog (viewerPanel, message, --- 117,121 ---- .getString("ImageViewerPanelSaveAction.Overwrite_question_5"), //$NON-NLS-1$ ! fileName); if (JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog (viewerPanel, message, Index: ImageWriterSpiFileFilter.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/net/falappa/imageio/ImageWriterSpiFileFilter.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ImageWriterSpiFileFilter.java 11 Dec 2003 15:08:06 -0000 1.4 --- ImageWriterSpiFileFilter.java 26 Feb 2007 15:25:14 -0000 1.5 *************** *** 55,59 **** MessageFormat.format( template, ! new String[] { writer.getFormatNames()[0].toUpperCase()})); suffixes= writer.getFileSuffixes(); sb.append(" (*.").append(suffixes[0]); //$NON-NLS-1$ --- 55,59 ---- MessageFormat.format( template, ! writer.getFormatNames()[0].toUpperCase())); suffixes= writer.getFileSuffixes(); sb.append(" (*.").append(suffixes[0]); //$NON-NLS-1$ Index: ImageReaderSpiFileFilter.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/net/falappa/imageio/ImageReaderSpiFileFilter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ImageReaderSpiFileFilter.java 25 Nov 2003 06:00:55 -0000 1.2 --- ImageReaderSpiFileFilter.java 26 Feb 2007 15:25:14 -0000 1.3 *************** *** 56,60 **** MessageFormat.format( template, ! new String[] { reader.getFormatNames()[0].toUpperCase()})); suffixes=reader.getFileSuffixes(); sb.append(" (*.").append(suffixes[0]); //$NON-NLS-1$ --- 56,60 ---- MessageFormat.format( template, ! reader.getFormatNames()[0].toUpperCase())); suffixes=reader.getFileSuffixes(); sb.append(" (*.").append(suffixes[0]); //$NON-NLS-1$ |
From: Gerardo H. <ma...@us...> - 2007-02-26 15:25:19
|
Update of /cvsroot/jrman/drafts/src/org/jrman/render In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16144/src/org/jrman/render Modified Files: RendererHidden.java Log Message: Started working on SubdivisionMeshes. Started migration to Java 5. Index: RendererHidden.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/RendererHidden.java,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** RendererHidden.java 20 Feb 2007 03:33:36 -0000 1.78 --- RendererHidden.java 26 Feb 2007 15:25:15 -0000 1.79 *************** *** 539,542 **** --- 539,543 ---- display("nurbs", parser.getNurbsCount()); display("curves", parser.getCurveCount()); + display("subdivision meshes", parser.getSubdivMeshesCount()); System.out.println("Clipped primitives: " + clippedPrimitivesCount); System.out.println("Total patches: " + primitivePatchCount); |
From: Gerardo H. <ma...@us...> - 2007-02-26 15:25:19
|
Update of /cvsroot/jrman/drafts In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16144 Modified Files: build.xml Log Message: Started working on SubdivisionMeshes. Started migration to Java 5. Index: build.xml =================================================================== RCS file: /cvsroot/jrman/drafts/build.xml,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** build.xml 20 Feb 2007 18:14:02 -0000 1.25 --- build.xml 26 Feb 2007 15:25:14 -0000 1.26 *************** *** 27,31 **** description="compile the source " > <!-- Compile the java code from ${src} into ${build} --> ! <javac srcdir="${src}" destdir="${build}" source="1.4" target="1.4" debug="on"> <classpath refid="project.class.path"/> --- 27,31 ---- description="compile the source " > <!-- Compile the java code from ${src} into ${build} --> ! <javac srcdir="${src}" destdir="${build}" source="1.5" target="1.5" debug="on"> <classpath refid="project.class.path"/> *************** *** 36,40 **** description="generate documentation"> <!-- Generate the API documentation from ${src} into ${doc} --> ! <javadoc sourcepath="${src}" destdir="${doc}" source="1.4" /> </target> --- 36,40 ---- description="generate documentation"> <!-- Generate the API documentation from ${src} into ${doc} --> ! <javadoc sourcepath="${src}" destdir="${doc}" source="1.5" /> </target> |
From: Gerardo H. <ma...@us...> - 2007-02-21 02:43:19
|
Update of /cvsroot/jrman/drafts/sampleData In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24817 Modified Files: jarra1.rib Log Message: Turned jar to hide crack. Index: jarra1.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/jarra1.rib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** jarra1.rib 12 Jun 2003 18:36:02 -0000 1.3 --- jarra1.rib 21 Feb 2007 02:43:16 -0000 1.4 *************** *** 7,10 **** --- 7,11 ---- Attribute "displacementbound" "sphere" .1 TransformBegin + Rotate 180 0 1 0 Scale 6 6 6 Basis "bezier" 3 "bezier" 3 |
From: Gerardo H. <ma...@us...> - 2007-02-21 00:33:28
|
Update of /cvsroot/jrman/drafts/sampleData In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv3533/sampleData Modified Files: headus.com-killeroo.rib killeroo-data.rib Log Message: Placed credit for Killeroo data in the right file. Updated README.TXT for release 0.4. Index: killeroo-data.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/killeroo-data.rib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** killeroo-data.rib 17 Feb 2007 03:07:57 -0000 1.1 --- killeroo-data.rib 21 Feb 2007 00:33:22 -0000 1.2 *************** *** 1,2 **** --- 1,6 ---- + ##RenderMan RIB-Structure 1.0 + ##Creator iges2rib v1.0 2000/02/12 12:11:45 + ## This file is included with permission of http://www.headus.com/ + AttributeBegin Declare "mapname" "string" Index: headus.com-killeroo.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/headus.com-killeroo.rib,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** headus.com-killeroo.rib 20 Feb 2007 18:11:06 -0000 1.15 --- headus.com-killeroo.rib 21 Feb 2007 00:33:22 -0000 1.16 *************** *** 1,6 **** - ##RenderMan RIB-Structure 1.0 - ##Creator iges2rib v1.0 2000/02/12 12:11:45 - ## This file is included with permission of http://www.headus.com/ - MakeTexture "killeroo-textures/pat344_0.12.jpg" "killeroo-textures/pat344_0.12.txr" "clamp" "clamp" "gaussian" 2 2 MakeTexture "killeroo-textures/pat345_0.23.jpg" "killeroo-textures/pat345_0.23.txr" "clamp" "clamp" "gaussian" 2 2 --- 1,2 ---- |
From: Gerardo H. <ma...@us...> - 2007-02-21 00:33:27
|
Update of /cvsroot/jrman/drafts/jrMan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv3533/jrMan Modified Files: README.TXT Log Message: Placed credit for Killeroo data in the right file. Updated README.TXT for release 0.4. Index: README.TXT =================================================================== RCS file: /cvsroot/jrman/drafts/jrMan/README.TXT,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** README.TXT 16 Nov 2005 03:20:46 -0000 1.11 --- README.TXT 21 Feb 2007 00:33:22 -0000 1.12 *************** *** 61,68 **** --- 61,72 ---- shadowTest.rib noiseShadersTest.rib + headus.com-killeroo.rib (all the other .rib files in the model directory are data files used by the above scenes). + Note: the data for the "Killeroo" (killeroo-data.rib) is used with permission + from http://www.headus.com. This data is not distributed under the GPL. + Renderman features implemented in jrMan 0.4: *************** *** 88,91 **** --- 92,96 ---- PatchMesh NuPatch + Curves * Surface shaders: *************** *** 131,134 **** --- 136,168 ---- + New features in release 0.4: + ---------------------------- + - NURBS + - Curves + - PatchMesh + - Rational bicubic patches + - Support for all the bicubic patch basis + - TextureCoordinates + - Delayed ReadArchive + - Bug fixes (and speed improvements in some cases) in the occlusion + culling code + - A complete rewrite of the code to handle surface parameters (more + flexible, smaller RAM footprint) + - Smooth interpolation (for shading micropolygons) + - "st" parameters on Polygons + - Better area calculation for Mipmapped textures. + - "blur" parameter on textures. + - pnoise (for shaders) + - smaller RAM footprint for PointsPolygons + - "fixed" null normals bug (could sometimes happen in bicubic patches) + - Correct handling of u, v, s and t parameters in bicubic patches, + patch meshes, and PointsPolygons + - Handle correctly polygon "N" parameter in rib + - Many optimizations (both time and space) + - alpha in "RGBA" output images + - a new GUI + + + Renderman features not yet implemented in jrMan 0.4: ---------------------------------------------------- *************** *** 140,144 **** * Trim curves * Subdivision surfaces - * Curves * General Polygons --- 174,177 ---- *************** *** 156,159 **** --- 189,193 ---- "jrman"or "jrman.bat" script. + Creating RIB files for jrMan: ----------------------------- |
From: Gerardo H. <ma...@us...> - 2007-02-20 18:14:07
|
Update of /cvsroot/jrman/drafts In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32345 Modified Files: build.xml Log Message: Added target "all" to build.xml. Index: build.xml =================================================================== RCS file: /cvsroot/jrman/drafts/build.xml,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** build.xml 20 Feb 2007 03:33:35 -0000 1.24 --- build.xml 20 Feb 2007 18:14:02 -0000 1.25 *************** *** 215,217 **** --- 215,219 ---- <delete file="${dist}.tar.gz"/> </target> + + <target name="all" depends="clean,zip,targz" /> </project> |
From: Gerardo H. <ma...@us...> - 2007-02-20 18:11:18
|
Update of /cvsroot/jrman/drafts/sampleData In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30880/sampleData Modified Files: headus.com-killeroo.rib Log Message: Corrections in killeroos rib. Index: headus.com-killeroo.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/headus.com-killeroo.rib,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** headus.com-killeroo.rib 20 Feb 2007 05:07:06 -0000 1.14 --- headus.com-killeroo.rib 20 Feb 2007 18:11:06 -0000 1.15 *************** *** 97,106 **** Format 1024 1024 1 Display "killeroo.shdw" "file" "z" - #Display "killeroo.shdw" "framebuffer" "rgb" PixelSamples 1 1 PixelFilter "box" 1 1 Projection "orthographic" ScreenWindow -700 300 -200 512 - #LightSource "distantlight" 10 "intensity" 1 Clipping 4000 8000 Translate 0 0 5000 --- 97,104 ---- *************** *** 143,152 **** FrameBegin 2 - Display "grass.png" "framebuffer" "rgb" PixelFilter "gaussian" 2 2 Display "killeroo" "framebuffer" "rgba" PixelSamples 8 8 Exposure 1 2.2 - #Format 950 614 1 Format 1900 1228 1 Projection "perspective" "fov" [ 17 ] --- 141,148 ---- |