[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: PCB+GL+3D (Z-coord) Eye-candy



On Wed, 2009-10-14 at 07:54 -0400, Ethan Swint wrote:
> > Just proof of concept stuff...
> >
> > http://www2.eng.cam.ac.uk/~pcjc2/geda/pcb+gl_3d/
> >
> > There isn't anything clever here.. just the same PCB+GL translucent
> > rendering I had before, but with a 3D virtual trackball to rotate the
> > viewport.
> >
> >    
> Very cool!  How do you set the origin for the viewport?

The origin for rotation is the centre of the visible screen. The old pan
and zoom actions (scroll bars etc..) are used to adjust the piece of the
board being previewed. Still a bit of a mix of paradigms, (2D + 3D), but
it seems to work well enough for a demo.

> One thing you 
> might want to do is to provide a number box for azimuth, elevation, and 
> z-angle, and z-distance (optional, for zoom) from the origin to the 
> camera.  That's the easiest way to reset your view when things get 
> squirrelly from the oval graphic control or revisit an angle that you 
> liked previously.

Good idea, thanks.

Btw.. here are the diffstats - I was surprised how little went into the
3D, and how much the trackball stuff. Fortunately I didn't have to write
the "src/hid/common/trackball.[ch]" stuff!:


commit e51da0c0c469a172ee0785569e24031b771bf19d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Oct 14 14:43:27 2009 +0100

    Shiny 3D eye-candy
    
    Experiments in progress - don't expect this to work yet!

 src/draw.c                      |   88 ++++++++++++++++++---------
 src/hid/gtk/gtkhid-main.c       |   22 ++++++-
 src/hid/gtk/gui-output-events.c |  130 +++++++++++++++++++++------------------
 3 files changed, 146 insertions(+), 94 deletions(-)

commit 3937d586f92bad93f657945a39af7ce14a3f4521
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Oct 14 14:43:21 2009 +0100

    Add support for depth to triangle rendering routines.
    
    Nasty global depth_state variable should be replaced!

 src/hid/common/hidgl.c |    9 ++++++++-
 src/hid/common/hidgl.h |    7 ++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

commit cbed9fbbee5a189d574575fc2bb8ba05d1c8bb3c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Oct 14 14:43:19 2009 +0100

    Add debug catch to triangle handling
    
    If for any reason we are about to run off the end of the
    triangle array, deliberately segfault so gdb can catch where.

 src/hid/common/hidgl.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

commit 4f134e44178d857a053b357a60a8835c1e7c8270
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Oct 14 14:40:48 2009 +0100

    Use trackball to allow rotation of 3D view

 src/hid/gtk/gui-output-events.c |   64 +++++++++++++++++++++++++++++++-------
 src/hid/gtk/gui-top-window.c    |    9 +++++-
 src/hid/gtk/gui.h               |    2 +
 3 files changed, 62 insertions(+), 13 deletions(-)

commit d4095396743490248f7530704b36502a5b28feff
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Oct 14 14:40:47 2009 +0100

    Add virtual trackball code

 src/Makefile.am             |    7 +-
 src/hid/common/trackball.c  |  324 +++++++++++++++++++++++++++++++++++++++++
 src/hid/common/trackball.h  |   78 ++++++++++
 src/hid/gtk/gui-trackball.c |  334 +++++++++++++++++++++++++++++++++++++++++++
 src/hid/gtk/gui-trackball.h |   66 +++++++++
 5 files changed, 808 insertions(+), 1 deletions(-)


Best wishes,

Peter.



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user