If the input data set is a structured point set or structured grid set, the geometry representation depends upon the instance variable Extent, which is a 6-vector, describes a geometry based on the (imin,imax,jmin,jmax,kmin,kmax) values. Depending on the values provided, the geometry may either be a point, line, surface, or volume.
If the input data set is an unstructered grid set, extent is currently ignored and the geometry created consists of all 0D, 1D, 2D elements in the mesh, plus the faces of any 3D elements that are not used by two 3D elements.
extent? Get the extent of the geometry.
/* * read in the data */ string new: data_name=case1;
plot3d_reader new: areader file_prefix=data_name read! ; /* * Set up the data set */
string new: data_set = data_name + "_gridset01";
object# data_set compute_properties! ; /* * set up some displays: outline and plane */ data_outline new: outline data_in= data_set ; display_lines new: draw_outline data_in=outline ; actor new: outline_actor modeller= draw_outline ;
data_geometry new: plane data_in= data_set extent= (1,100,1,100,1,1) ; display_all new: draw_plane data_in= plane ; actor new: plane_actor modeller= draw_plane ;
/* * Rendering stuff */ vector new: bbox dimension=6; bbox = ([object# data_set bounds?]); camera new: acamera position=(1,1,1) x_range=([bbox @1 ?],[bbox @2 ?]) y_range=([bbox @3 ?],[bbox @4 ?]) z_range=([bbox @5 ?],[bbox @6 ?]) default! on! ;
light new: alight position=(30,30,50) on! ;
logic new: test; environment new: _env variable="LYMB_RENDERER"; test = [_env defined?] false: "#Environment variable LYMB_RENDERER must be set." false: "parser exit!;"
; string new: current_renderer = [_env value?];
object# current_renderer new: main_renderer actors=([actor instances?]) lights=alight cameras=acamera render! ;