[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz ./TODO gfx/libcoords/Coords.cxx gzz/gfx/gl/...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz ./TODO gfx/libcoords/Coords.cxx gzz/gfx/gl/... |
Date: |
Thu, 03 Oct 2002 12:50:31 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/10/03 12:50:30
Modified files:
. : TODO
gfx/libcoords : Coords.cxx
gzz/gfx/gl : GLVobCoorder.java
gzz/view : xubuoy.py
Log message:
Revert buoy change :(
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.229&tr2=1.230&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcoords/Coords.cxx.diff?tr1=1.29&tr2=1.30&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/GLVobCoorder.java.diff?tr1=1.35&tr2=1.36&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/xubuoy.py.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
Patches:
Index: gzz/TODO
diff -c gzz/TODO:1.229 gzz/TODO:1.230
*** gzz/TODO:1.229 Thu Oct 3 12:25:49 2002
--- gzz/TODO Thu Oct 3 12:50:30 2002
***************
*** 28,33 ****
--- 28,34 ----
benja:
- xupdf:
- text
+ - reload button
- multiple instances of same cell visible as a buoy --> keys?
- special matcher? or pp/VobKeyer?
- really USE hierarchical keys
Index: gzz/gfx/libcoords/Coords.cxx
diff -c gzz/gfx/libcoords/Coords.cxx:1.29 gzz/gfx/libcoords/Coords.cxx:1.30
*** gzz/gfx/libcoords/Coords.cxx:1.29 Thu Oct 3 08:12:53 2002
--- gzz/gfx/libcoords/Coords.cxx Thu Oct 3 12:50:30 2002
***************
*** 274,292 ****
* can't be implemented as a TransformCoordSys.
* <p>
* Parameter layout:
! * x_circle, y_circle, radius, x_projpoint, y_projpoint
*/
class BuoyOnCircleCoords : public CoordSys {
ZVec tr;
public:
BuoyOnCircleCoords() : tr() { }
BuoyOnCircleCoords(ZVec tr) : tr(tr) { }
! enum { NParams = 5 };
virtual void setParams(float *params) {
ZVec ctr(params[0], params[1], 0);
ZVec proj(params[3], params[4], 0);
float radius = params[2];
// Get the anchor of the buoy
ZPt anchor = super->transform(ZPt(0,0,0));
// Now that we have the anchor, project
--- 274,302 ----
* can't be implemented as a TransformCoordSys.
* <p>
* Parameter layout:
! * x_circle, y_circle, radius, x_projpoint, y_projpoint, pointdir
! * <p>
! * Pointdir = 0 -> place at center, pointdir = 1, place
! * normally, -1, place with projpoint = center+(center-projpoint)
! * Linear interp between 0..1, 0..-1
*/
class BuoyOnCircleCoords : public CoordSys {
ZVec tr;
public:
BuoyOnCircleCoords() : tr() { }
BuoyOnCircleCoords(ZVec tr) : tr(tr) { }
! enum { NParams = 6 };
virtual void setParams(float *params) {
+ float pointdir = params[5];
ZVec ctr(params[0], params[1], 0);
ZVec proj(params[3], params[4], 0);
float radius = params[2];
+ if(pointdir < 0) {
+ proj = ctr + (ctr - proj);
+ pointdir = -pointdir;
+ }
+
// Get the anchor of the buoy
ZPt anchor = super->transform(ZPt(0,0,0));
// Now that we have the anchor, project
***************
*** 302,317 ****
DBG(dbg_buoy) << "eq: "<<anchor<<" "<<amc<<" "<<v<<" "<<a<<"
"<<b<<" "<<c<<"\n";
if(det <= 0) {
! tr = ZVec(0,0,0);
DBG(dbg_buoy) << "No solution - zero\n";
! return;
! }
! float ans = (-b + sqrt(det)) / (2*a);
! ZPt pt = proj + ans * v;
- DBG(dbg_buoy) << "solution: "<<pt<<"\n";
- tr = pt;
}
virtual CoordSys *createInverse() {
return new BuoyOnCircleCoords(-tr);
--- 312,330 ----
DBG(dbg_buoy) << "eq: "<<anchor<<" "<<amc<<" "<<v<<" "<<a<<"
"<<b<<" "<<c<<"\n";
+ ZPt pt;
if(det <= 0) {
! pt = ZVec(0,0,0);
DBG(dbg_buoy) << "No solution - zero\n";
! } else {
! float ans = (-b + sqrt(det)) / (2*a);
! pt = proj + ans * v;
! DBG(dbg_buoy) << "solution: "<<pt<<"\n";
! }
!
! tr = ctr + pointdir * (pt-ctr);
! DBG(dbg_buoy) << "final: "<<tr<<"\n";
}
virtual CoordSys *createInverse() {
return new BuoyOnCircleCoords(-tr);
Index: gzz/gzz/gfx/gl/GLVobCoorder.java
diff -c gzz/gzz/gfx/gl/GLVobCoorder.java:1.35
gzz/gzz/gfx/gl/GLVobCoorder.java:1.36
*** gzz/gzz/gfx/gl/GLVobCoorder.java:1.35 Thu Oct 3 07:23:36 2002
--- gzz/gzz/gfx/gl/GLVobCoorder.java Thu Oct 3 12:50:30 2002
***************
*** 29,35 ****
import gzz.client.gl.*;
public class GLVobCoorder extends AffineVobCoorder {
! public static final String rcsid = "$Id: GLVobCoorder.java,v 1.35 2002/10/03
11:23:36 tjl Exp $";
public static boolean dbg = false;
private static void pa(String s) { System.err.println(s); }
--- 29,35 ----
import gzz.client.gl.*;
public class GLVobCoorder extends AffineVobCoorder {
! public static final String rcsid = "$Id: GLVobCoorder.java,v 1.36 2002/10/03
16:50:30 tjl Exp $";
public static boolean dbg = false;
private static void pa(String s) { System.err.println(s); }
***************
*** 126,139 ****
}
public int buoyOnCircle(int into, float cx, float cy,
! float rad, float px, float py) {
floats[nfloats + 0] = cx;
floats[nfloats + 1] = cy;
floats[nfloats + 2] = rad;
floats[nfloats + 3] = px;
floats[nfloats + 4] = py;
int paramInd = nfloats;
! nfloats += 5;
inds[ninds + 0] = 7; // buoy xyz
inds[ninds + 1] = into;
--- 126,141 ----
}
public int buoyOnCircle(int into, float cx, float cy,
! float rad, float px, float py,
! float pointdir) {
floats[nfloats + 0] = cx;
floats[nfloats + 1] = cy;
floats[nfloats + 2] = rad;
floats[nfloats + 3] = px;
floats[nfloats + 4] = py;
+ floats[nfloats + 5] = pointdir;
int paramInd = nfloats;
! nfloats += 6;
inds[ninds + 0] = 7; // buoy xyz
inds[ninds + 1] = into;
Index: gzz/gzz/view/xubuoy.py
diff -c gzz/gzz/view/xubuoy.py:1.12 gzz/gzz/view/xubuoy.py:1.13
*** gzz/gzz/view/xubuoy.py:1.12 Thu Oct 3 12:12:31 2002
--- gzz/gzz/view/xubuoy.py Thu Oct 3 12:50:30 2002
***************
*** 105,111 ****
self.eye = 0.2
self.buoyscale = 400
! def add(self, vs, anchorX, anchorY, importance, buoyparams,
maincs, globalview = None,
globalusefancypaper = 0,
globalshowtessel = 0):
--- 105,111 ----
self.eye = 0.2
self.buoyscale = 400
! def add(self, vs, anchorX, anchorY, importance, floater,
maincs, globalview = None,
globalusefancypaper = 0,
globalshowtessel = 0):
***************
*** 126,135 ****
main_end_cs = vs.coords.coordsys(maincs, -20, mainpoint[0],
mainpoint[1], 0, 0)
# Then, make the buoy coordsys
! cs1 = vs.coords.buoyOnCircle(main_end_cs, *buoyparams)
! vs.matcher.add(cs1, cell.getId()+"__buo")
cs1_zoom= vs.coords.distort(cs1, 0, 0, self.eye, self.eye,
self.buoyscale, self.buoyscale)
vs.matcher.add(cs1_zoom, cell.getId()+"__bulg")
--- 126,138 ----
main_end_cs = vs.coords.coordsys(maincs, -20, mainpoint[0],
mainpoint[1], 0, 0)
+ cs1 = floater.addBuoy(anchorX, anchorY, importance, self.cell.getId(),
0, 0)
+
+
# Then, make the buoy coordsys
! # cs1 = vs.coords.buoyOnCircle(main_end_cs, *buoyparams)
! # vs.matcher.add(cs1, cell.getId()+"__buo")
cs1_zoom= vs.coords.distort(cs1, 0, 0, self.eye, self.eye,
self.buoyscale, self.buoyscale)
vs.matcher.add(cs1_zoom, cell.getId()+"__bulg")
***************
*** 327,333 ****
h = b.hit(self.currentvs.coords, point)
if h:
print "BUOY HIT!\n"
! self.moveToCell(b.cell, *h)
AbstractUpdateManager.chg()
return
h = self.view.hitClip(self.currentvs.coords, point, None)
--- 330,336 ----
h = b.hit(self.currentvs.coords, point)
if h:
print "BUOY HIT!\n"
! self.moveToCell(b.cell, h[0], h[1], redraw=1)
AbstractUpdateManager.chg()
return
h = self.view.hitClip(self.currentvs.coords, point, None)
***************
*** 403,417 ****
def scene(self, vs):
bg(vs)
! fbuoyparams = (self.ctrx, self.ctry, self.rad,
! self.ctrx + 1.5*self.rad, self.ctry)
! bbuoyparams = (self.ctrx, self.ctry, self.rad,
! self.ctrx - 1.5*self.rad, self.ctry)
- print "Context"
! cs1 = vs.coords.translateXYZ(0, self.ctrx, self.ctry, 100)
! vs.matcher.add(cs1, self.cursor.getId()+"__FOO")
if self.modes[0].movefocus:
--- 406,430 ----
def scene(self, vs):
bg(vs)
! # projx = self.ctrx + 1.5*self.rad
! # fbuoyparams = (self.ctrx, self.ctry, self.rad,
! # projx, self.ctry, 1)
! # bbuoyparams = (self.ctrx, self.ctry, self.rad,
! # projx, self.ctry, -1)
!
! # print "Context"
!
! # cs1 = vs.coords.buoyOnCircle(0, self.ctrx, self.ctry,
! # self.rad, projx, self.ctry, 0)
! # vs.matcher.add(cs1, self.cursor.getId()+"__buo")
!
! bf = effects.NadirCircleFloater_NoAnchor(vs, (self.ctrx, self.ctry),
self.rad,
! self.nadir, 1)
! bfforw = effects.NadirCircleFloater_NoAnchor(vs, (self.ctrx,
self.ctry), self.rad,
! self.nadir, -1)
! cs1 = bf.addCentralBuoy(self.cursor.getId())
if self.modes[0].movefocus:
***************
*** 453,459 ****
for forwlink in globalforw:
b = XuPDFBuoy(1, (getattr(forwlink, "from"), forwlink.to),
enfoverlap = enfoverlap)
! b.add(vs, 0, 0, 1, fbuoyparams, maincs = cs1_trans,
globalview = self.view,
globalusefancypaper = self.usefancypaper,
globalshowtessel = self.showtessel)
--- 466,472 ----
for forwlink in globalforw:
b = XuPDFBuoy(1, (getattr(forwlink, "from"), forwlink.to),
enfoverlap = enfoverlap)
! b.add(vs, 0, 0, 1, bfforw, maincs = cs1_trans,
globalview = self.view,
globalusefancypaper = self.usefancypaper,
globalshowtessel = self.showtessel)
***************
*** 461,467 ****
for backlink in globalback:
b = XuPDFBuoy(0,(getattr(backlink,"from"), backlink.to),
enfoverlap = enfoverlap)
! b.add(vs, 0, 0, 1, bbuoyparams, maincs = cs1_trans,
globalview = self.view,
globalusefancypaper = self.usefancypaper,
globalshowtessel = self.showtessel)
--- 474,480 ----
for backlink in globalback:
b = XuPDFBuoy(0,(getattr(backlink,"from"), backlink.to),
enfoverlap = enfoverlap)
! b.add(vs, 0, 0, 1, bf, maincs = cs1_trans,
globalview = self.view,
globalusefancypaper = self.usefancypaper,
globalshowtessel = self.showtessel)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz ./TODO gfx/libcoords/Coords.cxx gzz/gfx/gl/...,
Tuomas J. Lukka <=