<<<<<<<<<<<<<<<<<

linear_extrusion_filter(display)Filterlinear_extrusion_filter(display)

NAME

linear_extrusion_filter - extrude polygons and lines to create new surfaces

DESCRIPTION

Linear_extrusion_filter takes as input a display_data object and extrudes polygons and/or lines to create new surfaces. The extrusion direction is either a user specified direction or in the direction of the object normals.

Polygons are extruded as follows: if the "capping" instance variable is on, each polygon is replicated twice (once in the current position and once in the extrusion direction). If any of the polygon edges is a free edge, i.e., the edge is not used by any other polygon, then the edge sweeps out a new surface (a "skirt"). If capping is "off", then only free edges create new surfaces.

Lines are treated as free edges: that is, each line is swept in the extrusion direction to create a new surface.

NOTE: if the object is to be extruded along the original object normals and no normals are available, then the first polygon is used to generate a normal along which all polygons/lines are extruded.

SUPERCLASS

adjacency_filter

INSTANCE VARIABLES

capping boolean indicates whether the extruded object is to ba capped. By default, capping is "on".

direction vector of size [3] to indicate the extrusion direction. The direction vector is only used if EXTRUDE_ALONG_DIRECTION is set. By default the direction=(0,0,1).

scale_factor used to scale the normals or extrusion direction. By default scale_factor = 1.0.

MESSAGES

extrude_along_normals! new surfaces are created by extruding the input data along the input data's normals.

extrude_along_direction! new surfaces are created by extruding the input

data along a user specified direction.

extrusion_method? return 0 if extrusion along normals, 1 if extrusion along direction. specified direction.

capping_on! turn object capping on.

capping_off! turn object capping off.

capping= value set the capping boolean

capping? get the capping boolean

scale_factor= value set the extrusion scale factor.

scale_factor? get the extrusion scale factor.

direction=(dx,dy,dz) set the extrusion direction (Remember to set extrude_along_direction!)

direction? get the extrusion direction

generate_data! create triangle strips from input data.

EXAMPLE

display_data new: dd points=( 0,0,0, 1,0,0, 0,1,0, 1,1,0, 3,3,0, 3.5,3,0, 3,3.5,0 ) lines=( 5,4,5,6,7,5 ) polygons=( 3,1,2,3, 3,2,4,3

) ; linear_extrusion_filter new: extrude

data_in= dd debugon! ; shrink_filter new:sf data_in= extrude shrink_factor=0.9 ; display_all new: da data_in= sf ; actor new: a modeller= da ; camera new: acamera range= [da bounds?] position= (1,1,1) default! on! ; renderer new: aren actors=[actor instances?] cameras=[camera instances?] render! ;

SEE ALSO

adjacency_filter, triangle_strip_filter, display_filter, display_data


Please send comments and suggestions to
consult@rpi.edu