gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] fenfire/org/fenfire/view View2D.java


From: Benja Fallenstein
Subject: [Gzz-commits] fenfire/org/fenfire/view View2D.java
Date: Thu, 24 Apr 2003 14:21:04 -0400

CVSROOT:        /cvsroot/fenfire
Module name:    fenfire
Changes by:     Benja Fallenstein <address@hidden>      03/04/24 14:21:00

Modified files:
        org/fenfire/view: View2D.java 

Log message:
        try to improve View2D.render() javadoc

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/org/fenfire/view/View2D.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: fenfire/org/fenfire/view/View2D.java
diff -u fenfire/org/fenfire/view/View2D.java:1.3 
fenfire/org/fenfire/view/View2D.java:1.4
--- fenfire/org/fenfire/view/View2D.java:1.3    Thu Apr 24 14:07:28 2003
+++ fenfire/org/fenfire/view/View2D.java        Thu Apr 24 14:21:00 2003
@@ -11,20 +11,30 @@
     /** Render this view.
      *  The view is a rectangular area of the whole 2D plane.
      *  (For PP canvases, which are infinitely large, we
-     *  could never render the whole plane.)
+     *  could never render the whole plane.) This rectangular
+     *  area, called the <em>box</em>, is placed on some
+     *  point of the screen.
      *  <p>
-     *  
-     *  
-     * There are several coordinate systems here, due to the situation; let's
-     * clarify.
-     * Notate screen coordinates by x, 
-     * coordinates in the virtual plane by p and
-     * coordinates in the frame by f.
-     * Now, x = box2screen(f) and p = box2paper(f).
-     * For instance, if rendering a paperquad, it would 
-     * be based in the frame coordinates f: the physical
-     * points would be rendered at x, and p would
-     * be used for the texture coordinates.
+     *  We represent this using two transformations:
+     *  <code>box2screen</code>, which simply determines where
+     *  the box is placed, and <code>box2plane</code>, which
+     *  determines the box to place. The latter is a box
+     *  coordinate system (transformation); this determines 
+     *  the width and height of the area. By using
+     *  translations and scalings, we can represent
+     *  the panning and zooming of the box. (We could also
+     *  rotate by using rotation transformations, and so on.)
+     *  <p>
+     *  You can think of the following three coordinate systems:
+     *  <ul>
+     *  <li><code>box</code>: The coordinate system
+     *      into which the rectangular area is placed.</li>
+     *  <li><code>paper</code>: The coordinate system
+     *      of the virtual plane.</li>
+     *  <li><code>screen</code>: The screen coordinate system.</li>
+     *  </ul>
+     *  Then, <code>box2paper</code> and <code>box2screen</code>
+     *  are transformations between these coordinate systems.
      *
      * @param vs The vobscene to render into
      * @param plane The defining object of this view (the focus, plane id or 
somesuch).
@@ -36,14 +46,14 @@
      * @param box2screen The transformation from the frame
      *                         (which is the box of this transformation)
      *                         to the screen coordinates.
-     * @param box2paper The transformation from the frame
+     * @param box2plane The transformation from the frame
      *                         (again, the box of this transformation)
      *                         to the plane/paper/view2d coordinates.
      */
     public abstract void render(VobScene vs, 
                Object plane,
                int matchingParent,
-                   int box2screen, int box2paper
+                   int box2screen, int box2plane
                        );
 
     /** Get the size of this plane.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]