A mapper module that slices an unstructured or irregular 3D model with a plane, producing a secondary 2D slice projected flat down the normal of the slice plane, for projection into secondary 2D view window.
module plane_proj <src_file="planep.c"> { Mesh+Iparam &in { nnodes+req; }; Plane_Grid+Xform+Iparam &plane { points+req; }; omethod+notify_val plane_proj_update<status=1> = "plane_proj_update"; Node_Data+Vector+Float+Oparam out; float+Oparam dist; };
plane_proj is a low-level mapper module that takes a 3D slice of data and returns a 2D plane projected flat along the normal of the slice plane. This 2D plane can be used for projection into an ancillary 2D view. This low-level module should not normally be used. The functional macro plane_proj2, and the user macros plane_project and plane_project_ARR are all easier to use and provide more functionality.
The plane_proj module is used in the plane_project and plane_project_ARR user macros. These macros are variations on the standard slice_plane module, which slices a 3D model by using a simple plane tool. This low-level module is used to extend the basic functionality by generating a transformed version of the slice plane with Z=0. The module modifies the actual mesh coordinates, rather than manipulating the Xform block of the field. This allows for any input structure or incoming transform.
The low-level module implementation contains a new C method. The source code provided can also serve as an example of how to manipulate transformation matrices within a mapper module.
&in
Mesh representing the 3D slice taken from the original model. This will be typically generated by using the DVplane_dist module to generate distances from a plane and the DViso module to calculate an isosurface at a specified distance from the plane. These operations are performed automatically be the plane_proj2 macro and all higher level user macros.
&plane
Mesh representing the plane originally used to generate the 3D slice given as the input. The plane input is necessary so that the 3D slice can be correctly projected onto a 2D plane.
out
Node data containing the new 2D coordinates generated by the low-level module. The plane_proj module projects each node in the input data onto the 2D plane and outputs the generated coordinates as a new set of node data. The plane_proj2 module uses this data to generate a 2D mesh that can be visualized as normal.
dist
Floating point value that outputs the scalar distance used in the plane equation.
The low-level plane_proj module is used in the plane_proj2 functional macro. This macro is in turned used by the user macros plane_project and plane_project_ARR. These user macros also use the PlaneProjectUI user interface macro.
Two example applications are provided with this project. PlaneProjectEg demonstrates the use of the standard user macro by reading in a set of data and using the plane_project macro to slice the data and generate a 2D projection of that slice. PlaneProjectArrEg demonstrates the use of the array based user macro in a similar way.
iac_proj/planep/plp_mods.v contains the V definitions of the plane_proj low-level module and the plane_proj2 functional macro.
The user macros provided with this project are derived from the standard AVS module "Slice Plane". These macros are based on the same underlying system, but substitute the slice plane processing module and adds a new 2D output port. Please refer to the documentation for that module for further information on the use of the macros.
The low-level PlaneProjectMods library containing the module does not specify a process. By default the express process will be used.
Ian Curington Advanced Visual Systems, Ltd. Hanworth Lane, Chertsey Surrey, UK KT16 9JX ianc@avs.com
Andrew Dodd International AVS Centre
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL
Standard AVS slice_plane module