Viewpoint Bar 
Author Message
 Viewpoint Bar

Hi everyone...

I am using Cosmo 2.1.1 - Is there any way to increase the size (length) of
the text bar that displays the current viewpoint? I have tried looking in
the "preferences" settings, but to no avail.
Thanks. Also - how do i write vrml code which will allow me to create a
"viewpoint" which actually takes the user through a "tour" of all the
available viewpoints in a continous loop?

Thanks a lot.

Regards,
Abraham Thomas



Tue, 08 Oct 2002 03:00:00 GMT  
 Viewpoint Bar

Quote:

> I am using Cosmo 2.1.1 - Is there any way to increase the size (length) of
> the text bar that displays the current viewpoint?

Not that I know of.

Quote:
> Also - how do i write VRML code which will allow me to create a
> "viewpoint" which actually takes the user through a "tour" of all the
> available viewpoints in a continous loop?

There's a simple way, and a complex way. The simple way will use the
browser's natural built in movement from node to node to execute the
transitions. The complex way is to actually animate the motion yourself
(controlling the speed of movement, therefore). The complex way involves
constructing interpolators based on the locations of each pair of
viewpoints, and then sending the "travelling" viewpoint along these
paths.

Simple way: a script has an array of all your viewpoints. The isBound
event from all viewpoints is routed to this script, which tests to see
which one is bound, then binds the next one in sequence (probably after
a delay). The script has to have "directOutput" set to "TRUE", and would
look something like this:

DEF TourScript Script {
  field MFNode MyViews {
    field SFNode ViewOne   IS #[name of Viewpoint node in your file]
    field SFNode ViewTwo   IS #[name of Viewpoint node in your file]
    field SFNode ViewThree IS #[name of Viewpoint node in your file]
    field SFNode ViewFour  IS #[name of Viewpoint node in your file]
    #(etc.)
  }
  eventIn SFBool BoundView
  directOutput TRUE
  url ["javascript:
    function BoundView(value, time) {
      if (value) {
        for i = 0 to */insert here the number of viewpoints minus one/*
{
          if (MyViews[i].isBound) {
            MyViews[i+1].set_bind = TRUE;
            return;
          }
        }
      }
    }"
  ]

Quote:
}

ROUTE [name of view one].isBound TO TourScript.BoundView
ROUTE [name of view two].isBound TO TourScript.BoundView
#etc.

(Of course, this doesn't incorporate the time delay)

And you can set the sequence any way you want, by the order in which you
place the Viewpoints in the array.

- Paul
***********************************
Paul S. Hoffman
Senior Interface Designer, Cognetics Corporation

Company URL - http://www.cognetics.com
Personal URL - http://pluto.njcc.com/~paulsam
609-799-5005 ext.237 - FAX 609-799-8555



Tue, 08 Oct 2002 03:00:00 GMT  
 Viewpoint Bar
From the VRML 2.0 Specification:

"Viewpoint nodes are bindable children nodes (see 4.6.10, Bindable children
nodes) and thus there exists a Viewpoint node stack in the browser in which
the top-most Viewpoint node on the stack is the currently active Viewpoint
node. If a TRUE value is sent to the set_bind eventIn of a Viewpoint node,
it is moved to the top of the Viewpoint node stack and activated. When a
Viewpoint node is at the top of the stack, the user's view is conceptually
re-parented as a child of the Viewpoint node. "

Write a script to alter the set_bind eventIn, in javascript of java.

Use a ROUTE statement to send the event to the Viewpoint node or, perhaps,
change the value of the Viewpoint field directly with the script.

Quote:

>Hi everyone...

>I am using Cosmo 2.1.1 - Is there any way to increase the size (length) of
>the text bar that displays the current viewpoint? I have tried looking in
>the "preferences" settings, but to no avail.
>Thanks. Also - how do i write VRML code which will allow me to create a
>"viewpoint" which actually takes the user through a "tour" of all the
>available viewpoints in a continous loop?

>Thanks a lot.

>Regards,
>Abraham Thomas



Wed, 09 Oct 2002 03:00:00 GMT  
 Viewpoint Bar

Quote:

> Simple way: a script has an array of all your viewpoints. The isBound
> event from all viewpoints is routed to this script, which tests to see
> which one is bound, then binds the next one in sequence (probably after
> a delay). The script has to have "directOutput" set to "TRUE", and would
> look something like this:

> DEF TourScript Script {
>   .... [snip]

I just want anyone else looking at this to realize that there are a
bunch of errors in that script - I just wrote it off the top of my head.
For one thing, the construction of the array is *totally* wrong (for
instance, it should be USE not IS; and the individual nodes need to be
like this: Viewpoint{} USE ...).

It actually might make more sense to ROUTE each viewpoint's isBound
event to a separate Script function that simply sets the bind of the
next one.

I've also got a "smooth-move" PROTO which takes current
location/orientation and plots an interpolation to a pre-set viewpoint
location/orientation. That could probably be used here, triggered by
prox sensors at each viewpoint's location.

- Paul
***********************************
Paul S. Hoffman
Senior Interface Designer, Cognetics Corporation

Company URL - http://www.cognetics.com
Personal URL - http://pluto.njcc.com/~paulsam
609-799-5005 ext.237 - FAX 609-799-8555



Wed, 09 Oct 2002 03:00:00 GMT  
 Viewpoint Bar

Quote:

> ... - how do i write VRML code which will allow me to create a
> "viewpoint" which actually takes the user through a "tour" of all the
> available viewpoints in a continous loop?

Just to keep anyone following this thread up-to-date: I have not had any
success with the techniques I suggested. (I tried having each
viewpoint's isBound event trigger an individual script that binds the
next one, but...) The delay at each viewpoint *NEEDS* to be programmed
into the scripts; otherwise, the event cascade is so fast that the user
immediately ends up at the last Viewppoint in the chain. And for some
reason or other, CosmoPlayer does not orient the viewer correctly when
the new viewpoints are bound.

Next approach: trigger the Scripts from ProximitySensors - that way the
new node won't be bound until the user is definitely transported to a
Viewpoint.

- Paul
***********************************
Paul S. Hoffman
Senior Interface Designer, Cognetics Corporation

Company URL - http://www.cognetics.com
Personal URL - http://pluto.njcc.com/~paulsam
609-799-5005 ext.237 - FAX 609-799-8555



Fri, 11 Oct 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Removing a viewpoint from the viewpoint stack?

2. VWIN32: Smaller title bar and scroll bars? (fwd)

3. VWIN32: Smaller title bar and scroll bars?

4. Progress Bar In Main App Status Bar

5. Progress Bar in Status Bar

6. NetExpress: Icon in title bar / task bar

7. how to generate a progress bar / capacity bar

8. only add a scroll bar when the window is minimized and scroll bar is needed

9. Smalltalk vs. C (A vendor's viewpoint)

10. Help with viewpoints

11. jump to viewpoint

12. Viewpoints AAAAAAAAAAAAAHHHHHHHHh !!!!!!!!!!!!!!!!!!

 

 
Powered by phpBB® Forum Software