topical media & game development

talk show tell print

Appendix: The slides format

In this technical appendix, a simplified description will be given of the slides format. Slides are fragments of a document that may be presented to an audience. Our approach allows for displaying slides in either dynamic HTML or VRML. Slides are encoded using XML.

slides in XML



  <document>
  ...
  <slide id="1">
  <text>
  <line>What about the slide format?</line>
  <break/>
  <line>yeh, what about it"?</line>
  </text>
  <vrml>Sphere { radius 0.5 }</vrml>
  </slide>
  ...
  <slide id="2">
  <vrml>Sphere { radius 0.5 }</vrml>
  </slide>
  ...
  </document>
  
The first slide contains some text and a 3D object. The second slide contains only a 3D object. Inbetween the slides there may be arbitrary text. The slides are converted to VRML using XSLT, the XML transformation language.

VRML PROTOs

To support slides in VRML a small collection of PROTO definitions is used.

protos


The slides contained in a document constitute a slide set. A slide set is a collection of slides that may contain lines of text and possibly 3D objects. For displaying 3D objects in a slide we need no specific PROTO.

The slide PROTO defines an interface which may be used to perform spatial transformations on the slide, like translation, rotation and scaling. The interface also includes a field to declare the content of the slide, that is text or (arbitrary) 3D objects.

The slideset contains a collection of slides, and allows for proceeding to the next slide. A text may contain a sequence of lines and breaks. It supports a simple layout algorithm.

annotated slides

Slides may be annotated with dialogs, as described in section 5. The annotation is compiled to DLP code, which is activated whenever the slide (or level within a slide) to which the annotation belongs is displayed.

To intercept the occurrence of a particular event, such as the display of a slide, we use an observer object which is specified as in the code fragment below.

observer



  :- object observer : [actions].
  var slide = anonymous, level = 0, projector = nil.
  
  observer(X) :- 
     projector := X,
     repeat,
       accept( id, level, update, touched),
     fail.
  
  id(V) :-  slide := V.
  level(V) :- level := V.
  touched(V) :- projector<-touched(V).
  update(V) :- act(V,slide,level).
  :- end_object observer.
  
The observer object has knowledge of, that is inherits from, an object that contains particular actions.

As indicated before, events come from the 3D scene. For example, the touched event results from mouse clicks on a particular object in the scene. On accepting an event, the corresponding method or clause is activated, resulting in either changing the value of a non-logical instance variable, invoking a method, or delegating the call to another object.



(C) Æliens 18/6/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.