Description of the DX Module |
The DX2Web module appears in the Import/Export menu of DataExplorer. The module consists of two inputs and one output.
Properties menu of dx2web |
|
The first input is the object that is being converted to WebOOGL and the second input is the pathname of the file that you wish to output to. DX2Web will check to make sure a .off ending is placed on the outfile. If no extension is placed it will automatically terminate the outfile with .off otherwise it will return an error.
DX2Web module code
The code for the DX2Web module is based on Alerk Amin's DX to rayshade code located on the CS 490 web page. It recursively breaks down a complex object into groups and fields. Groups are recursively broken down further until a field is found. Fields are parsed into two files:- vertices- holds the vertices, color and opacities
- faces- holds the connections of the vertices
note that files named faces or vertices will be overwritten if they already exist. Finally, the two files are combined into the output file specified in the module.
The DX2web module can handle the following type of primitive objects
- Triangles
- Quads
- Cubes
- Tetrahedra
It will not support - Meshes
- Lines
- Bezier Curves (polylines)
In addition transformed object are not supported. And the opacity of all objects is set to 1 (opaque).
source code is available for more detailed information.