README FILE FOR m3d031400

README FILE FOR WORKING WITH THE VISUAL C++ VERSION OF THE 
3D COMPRESSION/DECOMPRESSION CODE

Ioana Martin / IBM T.J. Watson Research Center
Sungjin Kim, Mahnjin Han / Samsung AIT

Created May 28, 1999
Updated Mar 14, 2000

ARCHIVE CONTENTS:
	This archive contains the following directories:

	Compress: 
		Contains the VC++ 6.0 project files for compression of a 3D model by means
		of topological surgery; the Debug and Release version executables are in the 
		corresponding subdirectories. To compress a 3D model in VRML 2.0 format, you
		can simply invoke the compress executable from the DOS prompt or from the
		VC++ environment giving the model file name as an argument. For example,
		from the DOS prompt, you can type:
			mpgc [options] crocodile.wrl
		The compressed model will be placed in a file with the extension .m3d (e.g., 
		crocodile.m3d) in the same directory as the initial model. By invoking
		compress with no arguments you will get a list of the program options and
		usage directions.

	Expand: 
		Contains the VC++ 6.0 project files for decompression of a 3D model by means
		of topological surgery; the Debug and Release version executables are in the 
		corresponding subdirectories. To decompress a 3D model in M3D format, you
		can simply invoke the uncompress executable from the DOS prompt or from the
		VC++ environment giving the model file name as an argument. For example,
		from the DOS prompt, you can type:
			mpge [options] crocodile.m3d
		The compressed model will be placed in a file with the extension -E.wrl
		(e.g., crocodile-E.wrl) in the same directory as the compressed model.
		By invoking uncompress with no arguments you will get a list of the program
		options and usage directions.

	Expand\mpgelib:
		Contains the VC++ 6.0 project files for building a static library file for 
		decompression of a 3D model by means of topological surgery.

	inc: 
		Contains the header files part of the compression/decompression code

	src:
		Contains the C++ files part of the compression/decompression code

	Stl3.13:
		Contains the STL 3.13 library header files used by the
		compression/decompression code
		(you can also download the latest version of the STL library from 
		http://www.sgi.com/Technology/STL).

	debug:
		Contains the Makefile you can use for compiling the code using the GNU
		tools 

	ProgressiveExpand:
		Contains additional code that demonstrates how the original uncompression code
		can be modified to decode a given amount of data at a time. The amount of data
		can be a specified number of triangles (e.g., 100 triangles at a time) or a
		connected component. A graphical user interface is provided to demonstrate this
		functionality. Executables are provided in the Release and Debug subdirectories.
		To run this program, you must first set up a shortcut to the executable. Then, 
		edit the shortcut properties to reflect the following command line parameters as
		in the example below:

		-model:bunny.m3d -triangles:100 -width:8 -height:7 -depth:9 -cx:0.0 -cy:0.2 -cz:0.01

		By selecting one of the expand buttons in the toolbar, the model will be uncompressed
		according to the method selected and displayed progressively, as it is being uncompressed.
		During the uncompression, the user can rotate the model using the right mouse button,
		or toggle between wireframe and shaded representations from the toolbar.

		NOTE: this additional code is intended only as a proof-of-concept. It does not support
		all features present in the original code and it does not provide a full-fledged viewer
		for .m3d models. For example, model properties such as color, normals, and texture are 
		not supported.

	PLError:
		Contains the VC++ 6.0 project files for simulating packet loss on error resilient
                3D model bitstreams.


INSTRUCTIONS FOR CREATING THE VC++ PROJECTS FROM SCRATCH:
	Within the Microsoft Visual C++ 6.0 environment, you can create the projects for compression/
	decompression of 3D models using the source code provided. An example of how you might do that follows:
	From the FILE menu choose: New, then Win32 Console Application, then Empty Project.
	From the PROJECT menu choose: Add To Project, then Files. Select all the files from the src directory
	that you want to add (see lists below).
	From the PROJECT menu choose: Settings; then select the C/C++ tab. As category, choose Preprocessor,
	then under Additional Include Directories add the paths for the Stl3.13 and the inc directories. To the list
	of Preprocessor Definitions add the following three flags: 
		__GNUC__
		__STL_RANGE_ERRORS_H

	IMPORTANT: executables generated using default settings in Release mode under Visual C++ 6.0 have been 
	observed to cause a segmentation violation when tested with a significant number of models. The executables 
	generated in Debug mode, however, perform successfully on the same models. It has been observed that this
	problem disappears if the debug version of the run-time libraries is used (in Release mode). To set the
	run-time library type, choose Settings from the PROJECT menu, then select the C/C++ tab. As category, 
	choose Code Generation, and set the "Use run-time library" field to "debug single-threaded".

LIST OF C++ FILES USED FOR COMPRESSION (listed alphabetically):
	MPG_BBoxQ.CPP
	MPG_BranchTree.CPP
	MPG_Compress.CPP
	MPG_ER.CPP
	MPG_Global.CPP
	MPG_Graph.CPP
	MPG_Heap.CPP
	MPG_Ifs_R.CPP
	MPG_IfsEdit.CPP
	MPG_IfsQ.CPP
	MPG_IfsQ_C.CPP
	MPG_Lex.CPP
	MPG_Mesh.CPP
	MPG_MeshEdit.CPP
	MPG_MeshFs.CPP
	MPG_MeshTs.CPP
	MPG_NormalQ.CPP
	MPG_Partition.CPP
	MPG_Perm.CPP
	MPG_Property_C.CPP
	MPG_QFac.CPP
	MPG_QFpm.CPP
	MPG_Sample_C.CPP
	MPG_SPolygon_C.CPP
	MPG_Stitcher.CPP
	MPG_Stitches.CPP
	MPG_Vector.CPP
	MPG_VGraph.CPP
	MPG_VGraph_C.CPP

LIST OF C++ FILES USED FOR DECOMPRESSION (listed alphabetically):
	MPG_BBoxQ.CPP
	MPG_BranchTree.CPP
	MPG_Expand.CPP
	MPG_Global.CPP
	MPG_Graph.CPP
	MPG_Heap.CPP
	MPG_Ifs_W.CPP
	MPG_IfsEdit.CPP
	MPG_IfsQ.CPP
	MPG_IfsQ_E.CPP
	MPG_Lex.CPP
	MPG_Mesh.CPP
	MPG_MeshEdit.CPP
	MPG_MeshFs.CPP
	MPG_NormalQ.CPP
	MPG_Partition.CPP
	MPG_Perm.CPP
	MPG_Property_E.CPP
	MPG_QFac.CPP
	MPG_QFpm.CPP
	MPG_Sample_E.CPP
	MPG_SPolygon_E.CPP
	MPG_Stitcher.CPP
	MPG_Stitches.CPP
	MPG_Vector.CPP
	MPG_VGraph.CPP
	MPG_VGraph_E.CPP
