NAME
general_cone -- create unit to ..
PROTOTYPE
unitptr general_cone( int iOperands, int iSlices, char *pcFmt, unitptr uHost)
ARGUMENTS
- int iOperands
- if nonzero, the unit will have a scalar output field and will call its operands iSlices+2 times: before drawing the bottom face (output = -1), before drawing each slice (outputs 0,1,..iSlices-1), and before drawing the top face (output=iSlices). Depending on options, further output fields may provide additional geometry information about the current slice. This allows, e.g., individual coloring of the slices.
- int iSlices
- nr of slices
- char *pcFmt
- - not documented in source --
- unitptr uHost
- host unit
RETURN VALUE:
A pointer to the created unit or NULL in the case of an error.
INTERFACE OF CREATED UNIT:
- X_in[1]:
- (input field 0) total height of generalized cone
along its spine.
If pcFmt contains a %z, X_in
will be changed to a packed input field of iSlices
pins, allowing to specify iSlices heights separately.
If pcFmt contains a %v, X_in
will be changed to a packed input field of 3*.iSlices
pins, allowing to specify a path of iSlices points
along which the base polygon is moved.
- Y_in[1]:
- (input field 1) total twist angle between
bottom and top
If pcFmt contains a %a, Y_in will be changed to
a packed field of iSlices pins, allowing to specify for
each slice a twist angle separately.
- Z_in[2]:
- (input field 2) scaling factors from bottom
to top
If pcFmt contains a %s, Z_in will be changed to
a packed field of 2*iSlices pins, allowing to specify for
each slice a pair of scaling factors separately.
Depending on pcFmt, further input fields may be
present to specify further properties of the shape.
The following options are provided:
- %nP
- specify base shape as polygon of n points to
be specified at a packed input field of 2n pins
If n is omitted, n=4 and a rectangle (initialized
to the unit square) is assumed.
- %w:hP
- specify base shape as a rectangle of width w
and height h (8 input pins)
- %w:hR
- specify base shape as a rectangle of width w
and height h (2 input pins)
- %r:nC
- specify base shape to be a circle of radius
r, approximated by n points. An input field
with a single scalar pin for the radius
is provided.
- %r1:r2:nC
- specify base shape to be an ellipse of radii
r1,r2, approximated by n points. An input field
with two scalar pins for the radii
is provided.
- %np
- specify polygonal hole of n points, given
as n pairs in an 2n dimensional input field.
- %x:y:r:nc
- specify circular `hole'' at position x,y
radius r and using n sides to approximate the
circle. No input field. If x and or y is absent,
default values of 0 are assumed.
- %n:mh
- specify n circular holes at positions xi,yi
and with radii ri. These data are given as a
sequence of n triples at a 3n dimensional
input field. m specifies the nr of edges
used to approximate the circle.
- %b
- render bottom face
- %t
- render top face
The first input field specifies the base polygon outline.
Depending on pcFmt, there is another input field for each
hole in the base polygon.
EXECUTION OF CREATED UNIT:
INITIALIZATION:
DESCRIPTION:
CONTROL MODES:
EXAMPLES:
STATUS:
Preliminary.
SEE ALSO:
FILE
/amnt/loge/users/nistaff02/nistaff/rhaschke/nst7/man/../o.linux//../foldersrc/nst_solid2.c