![]()
The simple examples below are meant to help an application programmer create simple Dive applications using the Dive file format interface , the Dive/Tcl interface, the DIVE Client Interface (DCI) and the Dive functional interface.
To make it easier, we have chosen one application, namely a clock showing the time of day and incrementing its hands every second, minute and hour. This simple example has been implemented using the different techniques. For more elaborate examples the Dive3 reference manual should be consulted.
![]()
Examples:
Passive data file defining the graphics of the clock objects using the
DIVE
file format: clock.vr.
Passive data file defining the graphics of the clock objects using the
VRML file format:
clock.wrl
The clock application implemented as a C program using the Dive functional
interface: clock.c. Using this approach, the application
runs as a separate process that monitors and modifies objects in a DIVE
world.
The clock application implemented with object-based behaviour using the
Dive/Tcl interface: tcl_clock.vr. Using this
approach the behaviour of the application is defined declaratively in the
object itself by Dive/Tcl commands.
Implementing the clock application in Dive/Tcl can be made in severals ways, among which:
The clock application implemented using the Dive/Dci interface: dci_clock.tcl.
In this approach an external application or environment can load Dive/Tcl
commands into a DIVE peer through a socket interface,
as the standard DIVE shell application, divesh.c.
![]()