Clippoly README documents
Objective
I decided to
put together a set of files such that you can run experiments with the
clipping code. Main objective from my side
is to get the library better debugged. The code is copyrighted
with the GNU Library General Public License.
Basically, this means
that you can use and pass around the code, but cannot pretend
you wrote it. Using it in a commercial product is, at least,
difficult.
Environment
You will need a C++ compiler with templates to compile the code;
development work has been done with g++ on Sun sparc, sunos 4.1.X. Most
recent version used is g++ 3.4.2. In the last years development has
been done under Linux and MinGW.
Before compiling, skim through the Makefile. Three differences can
be made:
- Changing the C compiler. Standard is cc. gcc -traditional can be
used on systems with proper header files (this excludes SunOS 4.1.X)
- Adding the notion of a .cc file as a C++ source file. Some
make's (like SGI's) do not standard recognize a .cc file as C++
Files:
In the tar file you can find the test program for the nclip
library. In the tar file is:
- lgpl.texinfo
- texinfo style version of the copyright
statement.
- test.cc
- The wrapper in which we can test. Reads two clockwise oriented
polygons from stdin, and clips those. Results comes on stdout. Examples
format for input can be found in in_file.
- nclip.cc
- The actual clip routine. Only file in the nclip library which is
decent documented.
- nclip.h nclip.cc poly.cc poly.h poly_io.cc poly_io.h posadder.cc
posadder.h
primitives.cc primitives.h set.h
- The rest of the nclip library. Not of real interest, but needed
to get nclip running.
- err.* graph*
- files, part of the
University of Twente Measurement Laboratory in-house library. Not
likely to have big errors. They even come with documentation! (*.3,
nroff (== UNIX man) format) They should be compiled with a K&R C
compiler (like gcc -traditional.)
- CLASSES
- Some documentation about the classes used.