BlueScript: VE Environment

Contents

Description

Procedures for generating environments, audio setups, user profiles.

Documentation

The following objects and procedures are only available to scripts running under the VE library.

Note that many of the following procedures may be available only within specific contexts (e.g. the wall procedure is only available when called from within the body of an env command).

Procedures

audio
Usage
audio name body
Description
Specifies an audio channel.
Examples
1. A simple audio channel
audio default {
    engine mix {}
    output o0 {
        device default 0
    }
    output o1 {
        device default 1
    }
}
Result: none
audio...engine
Usage
engine driver body
Description
Specifies an audio engine to use to render a particular audio channel.

Valid in: audio

audiodevice
Usage
audiodevice name driver [options]
Description
Specifies a platform audio device to initialize and use.
env
Usage
env name body
Description
Defines the environment.
env...desc
Usage
desc string
Description
Specifies a human-readable description of this environment.

Valid in: env

option
Usage
option name value
Description
Sets a generic option for an object.

Valid in: audio, env, output, wall, window

output
Usage
output name body
Description
Specifies an output of an audio channel.

Valid in: audio

Examples
1. A simple output
output eg {
    device default 0
    loc 0.0 0.0 -3.0
    dir 0.0 0.0 1.0
    up 0.0 1.0 0.0
}
Result: none
output...device
Usage
device name [output]
Description
Specifies the audio device to use for this output.

Valid in: output

output...dir
Usage
dir x y z
Description
Specifies the direction in which the audio output faces.

Valid in: output

output...loc
Usage
loc x y z
Description
Specifies the centre of the audio output.

Valid in: output

output...up
Usage
up x y z
Description
Specifies the orientation of the audio output by providing a vector in the "up" direction.

Valid in: output

profile
Usage
profile name body
Description
Specifies the user profile.
Examples
1. A simple profile
profile joe {
    fullname "Joe Blough"
    eyedist 0.04
    module experiment1 {
        correction 0.0 1.0 -2.04
    }
}
Result: none
profile...eyedist
Usage
eyedist d
Description
Specifies the eye separation in physical units.

Valid in: profile

profile...fullname
Usage
fullname string
Description
Specifies the user's full name.

Valid in: profile

profile...module
Usage
module name options
Description
Specifies a module of options for the user profile.

Valid in: profile

A module is simply a way of grouping user profile options. The anticipated model is that if a particular program requires user-specific settings, it defines a new module and searches in that module for the settings it needs. The options contained in a module are specific to whatever uses that module - there are no pre-defined names or values.
Examples
1. A simple profile module
module eg {
    file /tmp/eg
    config 0 11 32
}
Result: none
wall
Usage
wall name body
Description
Describes a wall in the environment.

Valid in: env

Examples
1. A simple wall
wall {
    desc "A simple wall"
    size 1.0 1.0
    base origin
    loc 0.0 0.0 -3.0
    dir 0.0 0.0 1.0
    up 0.0 1.0 0.0
}
Result: none
wall...base
Usage
base (origin|eye)
Description
Specifies the space in which the wall is described.

Valid in: env

Walls are defined either to the origin of the physical space or they are defined relative to the eye. For example, a fixed screen is defined relative to the origin. A head-mounted display would be defined relative to the eye.
wall...desc
Usage
desc string
Description
Specifies a human-readable description of this wall.

Valid in: wall

wall...dir
Usage
dir x y z
Description
Specifies the direction in which the wall faces.

Valid in: wall

wall...loc
Usage
loc x y z
Description
Specifies the centre of the wall.

Valid in: wall

wall...size
Usage
size width height
Description
Specifies the size of a wall in physical units.

Valid in: env

wall...up
Usage
up x y z
Description
Specifies the orientation of the wall by providing a vector in the "up" direction.

Valid in: wall

window
Usage
window name body
Description
Describes a window.

Valid in: wall

Examples
1. A simple window
window eg {
    display :0
    geometry 640x480+0+0
    err 0.0 0.0
    offset 0.0 0.0
    slave auto auto auto
    viewport 0 0 640 480
    distort [m4ident]
    sync
    eye mono
    option noborder 1
}
Result: none
window...async
Usage
async
Description
Marks this window as being asynchronously rendered. That is, the rendering engine will not wait for this window to finish drawing before proceeding to the next frame.

Valid in: window

window...display
Usage
display value
Description
Specifies the destination display for a window.

Valid in: window

window...distort
Usage
distort m
    or
distort {m11 m12 m13 m14} {m21 m22 m23 m24} {m31 m32 m33 m34} {m41 m42 m43 m44}
Description
Specifies an arbitrary distortion matrix for this window.

Valid in: window

If a single argument is offered, it is treated as a VeMatrix4 object. The other syntax is preserved for backwards-compatibility; its future use is strongly discouraged.
window...err
Usage
err x y
Description
Sets the width and height correction values for a window.

Valid in: window

window...eye
Usage
eye (mono|left|right|stereo)
Description
Specifies how the view from this window is to be drawn.

Valid in: window

If a window does not have an "eye" command associated with it, then it will be a "mono" window by default.
window...geometry
Usage
geometry widthxheight[(+|-)x(+|-)y]
Description
Specifies the location and size of a window on a display.

Valid in: window

window...offset
Usage
offset x y
Description
Sets the location correction values for a window.

Valid in: window

window...slave
Usage
slave [node [process [thread]]]
Description
Determines where in a multi-processing environment, rendering for a particular window should take place.

Valid in: window

window...sync
Usage
sync
Description
Marks this window as being synchronously rendered (the default).

Valid in: window

window...viewport
Usage
viewport x y width height
Description
Sets the viewport for the a specific window.

Valid in: window