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.

XG.3D-INSERT-FRUSTUM-HOLE

source files: [xc]shp.[ch]

SYNTAX

(XG.3D-INSERT-FRUSTUM-HOLE
  :THING <thing>
[ :OMIT-BOTTOM t ]
[ :X <num> ] [ :Y <num> ] [ :Z <num> ]
[ :SCALE <num> ]
[ :SCALE-X <num> ] [ :SCALE-Y <num> ] [ :SCALE-Z <num> ]
)

DESCRIPTION

This is a very simple-minded hack to insert a slope-sided hole in something that is presumed to be a frustum originally built by XG.3D-INSERT-FRUSTUM, although this isn't terribly critical. It is intended just to create little sunken areas in a widget to contain sliders, text or whatever.

If :OMIT-BOTTOM is set non-NIL, no bottom is inserted in the hole created. This is usually done if you want the bottom in a separate thing, to color it differently and/or to give it separate hook functions.

The hole will be :SCALE-X by :SCALE-Y in size, centered on :X and :Y, and 0.1 * :SCALE-Z deep.

The current algorithm simply looks for a single quadralateral in the given thing which contains the specified hole in a X-Y sense (that is, ignoring Z), slices that quadralateral into four quadralaterals arranged like so:

+----------------------+
|                      |
+------+------+--------+
|      | HOLE |        |
+------+------+--------+
|                      |
+----------------------+

and then inserts 45-degree bevels down into the hole to the depth 0.1 * :SCALE-Z.

The <thing> must be a 'thing' in the :DRAW <camera> sense, a disembodied propertylist containing a :POINT-RELATION, and also a :FACET-RELATION. Both must be rank-1.

Thus, a total of twelve new points and seven new facets are inserted in <thing>.

Currently, it is an error if no existing facet X-Y-contains the given hole.


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