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

Mcubes_modeller(modeller) LYMB Mcubes_modeller(modeller)

NAME

mcubes_modeller - read marching cubes output files and place in display_data form

DESCRIPTION

The mcubes_modeller object reads a binary marching cubes file. This file consists of points defined by x,y,z,nx,ny,nz (e.g., coordinates and normals). Three points in a row define a triangle. The output of the mcubes_modeller is a display_data, or it can be used as a conventional modeller.

Because the mcubes_modeller is a subclass of new_modeller, it responds to the "data?" message and can be used in the display_data pipeline. In addition, mcubes_modeller also inherits the convenience routines from new_modeller (e.g., output!).

SUPERCLASS

new_modeller

INSTANCE VARIABLES

mcubes_file name of the marching cubes binary file

normals boolean flag controls whether normal information is used or discarded

MESSAGES

mcubes_file= value Set the name of the marching cubes file.

mcubes_file? Get the name of the marching cubes file.

normals_on! Normals read from the marching cubes file are used in output.

normals_off! Normals read from the marching cubes file are not used in output.

normals= value Set the normals flag directly. A value != 0 and normals are created.

normals? Get the value of the normals flag.

EXAMPLES

The following LYMB script uses the mcubes modeller to display a human jaw.

mcubes_modeller new: mc debugon! mcubes_file= `jaw2.tri' ;

actor new: mcubes_actor modeller= mc ; /* * Rendering stuff */ vector new: bbox dimension=6; bbox = ([mc bounds?]); camera new: c1 x_range=([bbox @1 ?],[bbox @2 ?]) y_range=([bbox @3 ?],[bbox @4 ?]) z_range=([bbox @5 ?],[bbox @6 ?]) position=(1,1,1) default! on! ;

environment new: _env variable=`LYMB_RENDERER' ; object# [_env value?] new: aren actors=[actor instances?] cameras=c1 render! ;

SEE ALSO

new_modeller, modeller, display_data, display_filter, shrink_filter, byu, actor, renderer


Please send comments and suggestions to
consult@rpi.edu