Contents

Document contents :-

CallList

CallList:create(name)

This is a wrapper for GL calllists. This function creates a calllist with the name specified and open it. Any rendering calls are place in the calllist until CallList:endList() is called.

Parameters:

Example:

CallList:create("object")

CallList:endList()

This ends a call list creation. This should be called after you created a new list and have drawn your objects.

Example:

         CallList:create("object")
           -- draw stuff
         CallList:endList() 

CallList:draw(name)

This draws a call list created using create()

Parameters:

Example:

CallList:draw("object")

CallList:delete(name)

This deletes a call list created using create()

Example:

CallList:delete("object")

CallList:clear()

This empties the call list, deleting all items.

Doris

_glErrorCheck(msg)

Check the GL error status glGetError and report any errors.

Parameters:

Example:

_glErrorCheck("after render")


Render

Render:sphere{params}

Create a gluSphere quadric object. Parameter passed is a table containing optional parameters.

Parameters:

Example:

Render:sphere{ radius=3 }

Render:torus{params}

Create a gluDisk quadric object. Parameter passed is a table containing optional parameters.

Parameters:

Example:

Render:torus{ inner=1,outer=3 } 

Render:teapot{params}

Create a glutSolidTeapot quadric object. Parameter passed is a table containing optional parameters.

Parameters:

Example:

Render:teapot{ size=5,solid=1 }


Window

Window

This is a wrapper for Doris window and GLUI code. This is a collection of helper methods to allow window creation from Luas nice table format.

Seperators

Seperators add spaces and lines between the widgets. These can be lines or spaces, horizontally or vertically. space = "h" | "-" | "v" | "|" inserts a space, and line = "h" | "-" | "v" | "|" creates a line either horizontally or vertically. You will have to pick the appropriate one according to your widget layout. You cannot have a space and a line.

Example:

{ space="h" } , { line="v" } or { line="|" }

Window:create{params}

Create a window for the application to use. You must do this first to create a window that can be used by the rest of the GUI.

Parameters:

Example:

winmain = Window:Create{ title="My Doris App" }

SubWindow{params}

Create a subwindow with the main window. Subwindows are what the widgets go into. You must have first created a main window.

Parameters:

Example:

sw=SubWindow{ parent=winmain, side="right" } 

Checkbox{params}

Creates a Checkbox widget. Check boxes are boolean widgets that you can tick on and off. The parameters are passed in a table. eg. Checkbox{ parent=subwindow, text="Solid", value=sphere.solid }

Parameters:

Button{params}

Create a Button widget. Buttons are widgets that create an event when you click on them.

Parameters:

Example:

Button{ parent=subwin, text="Click me!" }

Radiobutton{params}

Create a Radiobutton widget. This type of button goes in a Radiogroup and only one of the buttons in the group may be on at once. The Radiogroup should be the widget interrogated to find out which Radiobutton is currently selected.

Parameters:

Example:

 Radiobutton{ parent=radiogroup1, text="Red" } 

Radiogroup{params}

Create a Radiogroup widget. This is a container widget which holds a group of Radiobutton widgets.

Parameters:

Example:

 Radiogroup{ parent=subwin, text="Colours:", value=1 } 

Text{params}

Create a simple text label. This widget just displays some text.

Parameters:

Example:

 Text{ parent=subwin, text="Hello world" } 

Edit{params}

Create a text and number editing widget. The text in the widget can be edited by the user. The values held can either be a string, an integer number or a float number.

Parameters:

Example:

 Edit{ parent=subwin, value="Hello world", type=text } 

Panel{params}

Create a panel widget container. The is a simple container which can be used to organise widgets into groups. Once a panel has been created other widgets can be put into it.

Parameters:

Example:

 Panel{ parent=subwin, text="Hello world", type="text" } 

Spinner{params}

Create a value spinner. The value in this widget can be edited several ways, ''directly'', like an Edit widget, using ''up and down'' buttons and by ''dragging'' with the mouse.

Parameters:

Example:

 Spinner{ parent=subwin, value=12.34, type="float", limits={0,20} } 

Listbox{params}

Create a list of choices. A drop down list or combi box.

Parameters:

Example:

 Listbox{ parent=subwin, text="title", items={"a","b","c"} } 

Rotator{params}

Create a rotation trackball widget. This creates a spherical widget which can be used to rotate an object in your scene. When you rotate the sphere in the widget, the object attached to the Rotator behaves similarly. The widget is attached to a matrix which it manipulates.
Note: The matrix you attach to the widget must only be used by this widget, ie. you cannot manipulate the matrix value as its value is set directly by GLUI.

Parameters:

Example:

 Rotator{ parent=subwin, text="Scene", value=scene.rotationMatrix } 

Translator{params}

Create a translation widget. This creates a pointer arrow widget which can be used to move objects. When you click and drag the mouse over the widget, the movement is applied to the matrix and any object influenced by the matrix.
Note: The matrix you attach to the widget must only be used by this widget, ie. you cannot manipulate the matrix value as its value is set directly by GLUI.

Parameters:

Example:

Translator{ parent=subwin, text="Scene", type=z, value=scene.transMatrix } 

Rollout{params}

Create a rollout container. This widget is like a Panel except you can open and close it.

Parameters:

Example:

Rollout{ parent=sw, text="Scene", type=z, value=scene.transMatrix }