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

clipping_filter(display) Display Filters clipping_filter(display)

NAME

clipping_filter - clip display data objects against one or more input planes

DESCRIPTION

The clipping_filter object provides an easy-to-use object space clipping capability for display data. Inputs are a display_data object to be clipped and a display_data object that defines one or more clipping planes (defined by the points and normals in that display_data).

SUPERCLASS

display_filter

INSTANCE VARIABLES

clipping_mode defines how the clipping_filter object clips when more than one clipping plane is present.

MESSAGES

generate_data! causes the input data to be clipped against the input planes if necessary.

union! causes the output to be the union of clipping the entire input against each clipping plane.

intersect! causes the output to be the intersection of clipping the entire input against each clipping plane!;

EXAMPLE

The following script clips a sphere against a cube. Note that the points and normals are those of the eight vertices, not of the six faces.

sphere_modeller new: sphere resolution=4 ;

cube_modeller new: cube;

normal_filter new: normals data_in=cube ;

clipping_filter new: clip data_in=`sphere' sources=`normals' ;

display_polygons new: polys data_in=`clip' ;

camera new: dummy view_plane_normal=(1,0,0) ;

actor new: a modeller=`polys' color=(1,1,0) ;

actor new: b modeller=`cube' color=(0,1,1) ;

renderer new: aren actors=[actor instances?] ;

cue new: rotate start= 0 end= 1 tick_actions=` aren_c1 azimuth: 5; ' ;

scene new: ascene duration=1 cues=`rotate' renderers=`aren' start_actions=` aren render!; ' ;

! clipping sphere against the vertices of a cube clip intersect!; ascene start!;

SEE ALSO

display_data, clipping_filter


Please send comments and suggestions to
consult@rpi.edu