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-ROD

source files: [xc]shp.[ch]

SYNTAX

(XG.3D-INSERT-ROD
  :THING <thing>
[ :U-POINTS <num> ]
[ :V-POINTS <num> ]
[ :TRANSFORM <xtfm> ]
[ :X0 <num> ] [ :Y0 <num> ] [ :Z0 <num> ]
[ :X1 <num> ] [ :Y1 <num> ] [ :Z1 <num> ]
[ :RADIUS <num> ]
[ :RADIUS-B <num> ]
[ :WANT-HOLES t ]
[ :RED   <num>] [:GREEN   <num>] [:BLUE   <num>]
[ :RED-B <num>] [:GREEN-B <num>] [:BLUE-B <num>]
)

DESCRIPTION

This call inserts some approximation to a rod into the given thing, between the given two end-points. Among other things, it can be used for essentially drawing fat lines. (NB: A crude way to join a series of rods is to put a ball of the same raius at each endpoint.)

The <thing> must be a 'thing' in the :DRAW <camera> sense, a disembodied propertylist containing a :POINT-RELATION, and (unless only a point-cloud rod is desired) also a :FACET-RELATION. Both must be rank-1.

This call inserts points, linesegments, triangles, or rectangles, according to the nature of the thing provided. (For example, if the thing has :FACET-0/1/2 but not :FACET-3, triangles are inserted.)

If :U-POINTS is specified, the call creates a rod with this many points around the circumference. :U-POINTS must be at least 3.

If :V-POINTS is specified, the call creates a rod with this many points end-to-end. :V-POINTS must be at least 2, and is normally 2.

If :RADIUS is specified, it will do the obvious. It defaults to 1.0.

If :RADIUS-B is specified, it gives the rod different radii at the two ends. It defaults to the same radius at each end if not specified.

If :TRANSFORM is supplied, it must be an instance of CLASS-MATRIX44, and will be used to transform the rod exactly as if by XG.3D-TRANSFORM-THING.

If :WANT-HOLES is set non-NIL, every other triangle/rectangle will be dropped out, in a checkerboard sort of pattern. This is handy when testing rendering, since it lets one see what is happening on the inside of the rod. It also possesses some visual appeal.

If :RED/:GREEN/:BLUE are specified and :POINT-RED/GREEN/BLUE or :FACET-RED/GREEN/BLUE are present in the thing, they will be set as specified (0-1 range).

If :RED-B/:GREEN-B/:BLUE-B are also specified, then if :POINT-RED/GREEN/BLUE are present, the colors are shaded smoothly from :RED/:GREEN/:BLUE at one end to :RED-B/:GREEN-B/:BLUE-B at the other end. This is largely for testing. If :FACET-RED/GREEN/BLUE are present, then alternate polygons (in a checkboard pattern) will be set to :RED/:GREEN/:BLUE and :RED-B/:GREEN-B/:BLUE-B.


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