Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.



  [ :frustum-material <xmtl>   ]
  [ :field-material   <xmtl>   ]
  [ :text-material    <xmtl>   ]
  [ :lights           <xmtl>   ]
  [ :viewport-spot-y  <flonum> ]


This call may be used to add a nonstandard <widget> to the control panel. It creates things to hold the graphic representation of the <widget>, constructs a thinglist, adds lighting, constructs a camera sized to have same width as the control panel area on the screen, with same aspect ratio as the <widget>, sets the camera to display the <widget>, and adds the new camera to the bottom of the panel widget stack.

The <widget> must be an xlisp object which will respond to

(send <widget> :insert
   :body-thing body-thing
   :field-thing field-thing
   :text-thing text-thing

by inserting a graphic representation of itself into the supplied things, and returning a thinglist.

If :FRUSTUM-MATERIAL is supplied, it is the material for the body of the <widget>. The standard gui panel convention distinguishes by color between menu entries which take one 'up' the displaytree, 'down' the display tree, which manipulate the object 'here' in the display tree, and which manipulate 'system' values. The global variables XG.3D.GUI-UP-MATERIAL, XG.3D.GUI-HERE-MATERIAL, XG.3D.GUI-DOWN-MATERIAL and XG.3D.GUI-SYSTEM-MATERIAL hold material for each of these widget types. The default frustum material is XG.3D.GUI-HERE-MATERIAL. By convention, 'up' widgets are at the top of the panel, followed by 'here' widgets and 'down' widgets. 'System' widgets may either be at the bottom of the column, or may take over the complete column.

If :FIELD-MATERIAL is supplied, it is the material for the background of any text or sliders etc on the <widget>. The global variable XG.3D.GUI-FIELD-MATERIAL holds the default field material.

If :TEXT-MATERIAL is supplied, it is the material for any text any text displayed the <widget>. The global variable XG.3D.GUI-TEXT-MATERIAL holds the default text material.

If :LIGHTS is supplied, it is a list of lights with which to display the <widget>. The global variable XG.3D.GUI-LIGHTS holds the default widget lightlist.

If :VIEWPORT-SPOT-Y is provided, the widget will be placed as specified, otherwise (the usual case) they accumulate top to bottom in the panel screen area.

This call returns the widget created, although you usually don't need the return value.

Go to the first, previous, next, last section, table of contents.