/[gzz]/gzz/gzz/gfx/gl/GLVobCoorder.java
ViewVC logotype

Diff of /gzz/gzz/gfx/gl/GLVobCoorder.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.59 by tjl, Fri Nov 22 16:33:42 2002 UTC revision 1.60 by mudyc, Tue Nov 26 07:56:10 2002 UTC
# Line 51  public static final String rcsid = "$Id$ Line 51  public static final String rcsid = "$Id$
51    
52      public int getCSAt(int parent, float x, float y, float[] targetcoords) {      public int getCSAt(int parent, float x, float y, float[] targetcoords) {
53          int[] inds = GL.getAllCSAt(ninds, this.inds, floats, parent, x, y);          int[] inds = GL.getAllCSAt(ninds, this.inds, floats, parent, x, y);
54    
55            if (dbg) {
56                for (int i=0; i<inds.length; i++) {
57                    pa("original: "+getCoordSystemStr(inds[i]));
58                    pa("parent: "+ getCoordSystemStr(getParent(inds[i])));
59                }
60            }
61    
62          for(int i=0; i<inds.length; i++)          for(int i=0; i<inds.length; i++)
63              if(isNearestActiveAncestor(inds[i], parent)) {              if(isNearestActiveAncestor(inds[i], parent)) {
64                  int cs = inds[i];                  int cs = inds[i];
# Line 85  public static final String rcsid = "$Id$ Line 93  public static final String rcsid = "$Id$
93          return inds[cs+1];          return inds[cs+1];
94      }      }
95    
96        // For at least debugging purposes.
97        public String getCoordSystemStr(int cs) {
98            if (cs < 0 || cs >= 5000) return "Out of index!";
99            String cs_str = null;
100    
101            switch(inds[cs]) {
102            case 1: cs_str = "Affine"; break;
103            case 2: cs_str = "Rotation"; break;
104            case 3: cs_str = "Distort"; break;
105            case 4: cs_str = "Rotation xyz"; break;
106            case 5: cs_str = "Rotation xyz"; break;
107            case 6: cs_str = "Translation xyz"; break;
108            case 7: cs_str = "BuoyOnCircle"; break;
109            case 8: cs_str = "Concat"; break;
110            case 9: cs_str = "Nadir"; break;
111            case 10: cs_str = "Culling"; break;
112            case 11: cs_str = "Box"; break;
113            case 12: cs_str = "unitSq"; break;
114            case 14: cs_str = "OrthoBox"; break;
115            case 15: cs_str = "Invert"; break;
116            }
117            if (cs_str == null) return "CoordSystem: "+cs+" not defined.";
118            else return cs_str;
119        }
120    
121    
122      public int affineCoordsys(      public int affineCoordsys(
123              int into, float depth,              int into, float depth,
124              float cx, float cy,              float cx, float cy,

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.60

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26