/[gzz]/gzz/gzz/vob/Box.java
ViewVC logotype

Diff of /gzz/gzz/vob/Box.java

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

revision 1.5 by tjl, Tue Oct 29 14:09:32 2002 UTC revision 1.6 by tjl, Wed Oct 30 19:10:17 2002 UTC
# Line 46  package gzz.vob; Line 46  package gzz.vob;
46   *      }   *      }
47   * </pre>   * </pre>
48   */   */
49  public class Box {  public class Box implements Cloneable {
50      /** The key used to put the unitcoordsys under whcoordsys.      /** The key used to put the unitcoordsys under whcoordsys.
51       */       */
52      static public final Object UNITCOORDSYSKEY = new Object();      static public final Object UNITCOORDSYSKEY = new Object();
# Line 60  public class Box { Line 60  public class Box {
60      int culledwhcoordsys;      int culledwhcoordsys;
61      int unitcoordsys;      int unitcoordsys;
62    
63        public String toString() {
64            return "[Box: "+vs+" "+w+" "+h+" "+whcoordsys+" "+culledwhcoordsys+" "+
65                    unitcoordsys+"]\n";
66        }
67    
68      /** Set this box to a new box.      /** Set this box to a new box.
69       * @param vs The vobscene to use       * @param vs The vobscene to use
# Line 80  public class Box { Line 84  public class Box {
84          this.cullTo = cull;          this.cullTo = cull;
85      }      }
86    
87        /** Activate the unitcoordsys of this box.
88         * Convenience; defined to be equivalent to
89         * <pre>
90         *  vs.activate(getUnitCoordsys())
91         *  </pre>
92         */
93        public void activate() {
94            vs.activate(getUnitCoordsys());
95        }
96    
97      /** Create the unit square coordsys.      /** Create the unit square coordsys.
98       */       */
# Line 100  public class Box { Line 113  public class Box {
113       */       */
114      public int getWHCoordsys() {      public int getWHCoordsys() {
115          if(cullTo >= 0) {          if(cullTo >= 0) {
116              // XXX Fill in when three-component cull is done              if(culledwhcoordsys < 0)
117  //          if(culledwhcoordsys < 0)                  culledwhcoordsys =
118  //              culledwhcoordsys = vs.                      ((gzz.gfx.gl.GLVobCoorder)vs.coords).cull(
119                            whcoordsys, getUnitCoordsys(), cullTo);
120                return culledwhcoordsys;
121          }          }
122          return whcoordsys;          return whcoordsys;
123      }      }
# Line 125  public class Box { Line 140  public class Box {
140          h = bh;          h = bh;
141      }      }
142    
143        public Object clone() {
144            try {
145                return super.clone();
146            } catch(Exception e) {
147                return null;
148            }
149        }
150    
151  }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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