Subject: Various programming bits...

From: Chris Hand <[email-masked]>
Date: Wed, 22 Jul 92 00:27:09 BST

I'm a little confused about some of the functions in
demo3.c.

I've modified this file to allow me to steer the hand around
reliably using the "joypad" on the glove (the jitter I'm
getting on the glove's position data makes it pretty much
unusable).  What I want is for the viewpoint ("eyepoint") 
to follow the hand around.

I've tried setting current_view->ex,ey,ez to the co-ords
and setting "review" to 1, but this does nothing.  Calling
compute_view_factors() directly results in the viewpoint
being stuck looking into the palm of the hand at
very close range (took me a while to figure that out!).

What is the purpose of polar_compute() ??  Since it operates
on a load of global variables it is difficult to see what it's
doing and when -- is it just a hack to allow the viewpoint
rotation?  What are longitude, latitude and centre_roll for?
How do I prevent my changes to the viewpoint from being 
overwritten inside polar_compute() ??

Also, what is the "preferred" way of accessing the glove data:
through glove_read() or through pointer_read()??  I notice
that although pointer_read() is called in demo3.c, pointer_init()
is not.  Is this what's supposed to happen?

Cheers,

Chris

---

From: Dave Stampe-Psy+Eng <dstamp@watserv1>
Date: Tue, 21 Jul 92 23:05:02 -0400

The new release has capabilities for moving the viewpoint and glove
while linking them to the "body" position, which you can drive around
with the mouse.

polar_compute() just controls viewpoint and position to let you "spin"
around a point in space, giving the illusion of tumbling objects, and
is very useful for debugging as well.

In demo3, there is no way to read glove data except with glove_read().
In the next release, there is a pointer_read() routine to let you get
glove positions and gestures in _world_ coordinates.  So this ought to
fix a lot of problems and make implementation easy.  We also had a 
5-room demo loaded with objects (about 450 polys) with automatic
tasks etc. so this should be neat.

- Dave Stampe

---

From: Daniel Demaggio <[email-masked]>
Date: Wed, 22 Jul 92 20:04:10 -0400

Hi guys!
    I've been hacking away and I've made some cool changes to
the Demo.  But first, a few answers for Chris:`

 1) The demo arrow keys allow you to rotate your viewpoint
as if you were on a sphere.  It has to call polar_compute
to keep track of this and put it in terms of the viewer. Without
something like polar_compute, the viewpoint would be much like
a camera: tilt, swivel, etc.  If all your objects are in the
center of the universe, they would scroll right off the screen
as you looked to one side. With polar_compute, you see the
objects from all different angles.  IMHO pretty cool.
 2) The reason setting current_view->ex,y,z doesn't work is
because polar_compute starts off with longitude and latitude
and computes the current_view.  Look carefully at the polar_
compute routine and it will be apparent.

  But the real reason for this post is that I have made a lot
of changes to make the demo easier to use.  For instance, there
is a 'mode' variable.  You hit 'r' and it puts it into Rotate
mode.  Now, when you grab an object with the mouse, you
control it's rotation.  When you let up on the mouse, you
are still in rotate mode and can grab another object.  Makes
fiddling with the METALMAN a lot easier.  Similarly, you can
move, change color, change surface type, etc. just by
clicking. You can also hit 'R' to go into velocity rotate
mode (like Twirl).  The major simplification is that you
don't have to navigate menus, just press keys.
  I have also added a crude animation frame editor. You can't
load new objects while animating or bad things will happen.
But what you do is position the guy, hit a key to go to the
next frame, then re-position.  It will animate from one
frame to the other, creating in-between frames by
interpolation.  It looks great.

  If anybody wants to see it, E-mail me.  It requires a mouse
as it is right now (but who doesn't have a mouse these days?)

      -=- Dan DeMaggio -=- [email-masked] -=-
"That is really incredible. That is truly incredible.  That is so
incredibly incredible that I think I'd like to steal it." -Zaphod