Installation and Usage
Installing the PAR (Perl Archive) Package (Win32 only)
In order to use the executable (produced by PAR's pp) you don't have to install anything.
Just download the .exe file and the "gadget.raw" file (a default object), put them in the same directory and start the application.
The "gadget.raw" is the default RAW object (thanks to George Papaioannou for the object) that Pure Perl RayCaster tries to load
when the application is being started (must be found in the same directory as the .exe), when no file is given as input.
Installing from Source
Some basic information on how to install from source.
You will need Perl (version 5) already installed. On Windows you can get ActivePerl. On UNIX (or UNIX like systems) you probably already have Perl already (or you know how to get it).
Pure Perl RayCaster uses wxPerl for the GUI. Some quick notes on how to install wxPerl (you can follow the instructions at wxPerl official site). wxPerl is available from CPAN and as ppm (for ActivePerl), so it is very easy to install. A quick one:
- Win32:
You can install WxPerl in Windows by using ppm.
Open a Windows command prompt and enter:
>ppm ppm>install Wx ppm>exit >exit
- Unix (or Unix like) systems:
You can install WxPerl through CPAN. Enter the following line in a terminal (with superuser privileges):
#perl -MCPAN -e "install Wx"
You might need some libraries preinstalled on your system (usually available through your package system, if any) for the installation to work right.
Usage
If you are using the PAR version put the .exe and the gadget.raw in the same directory and run the executable.If you are using the source, enter the following in a terminal (or windows command prompt) to run application:
perl pureRaycaster.plYou can specify some options as arguments in a command line (no matter which distribution you are using, either the .exe or the .pl), if you wish.
Options currently supported are:
- -s
Smooth shadows will be calculated (slower, off by default) - -c red|blue|green
Choose a color theme to be used in the ray casting (default blue) - -w NUM (where NUM is an integer between 20 - 1024)
Specify the width of the output window for ray casting in pixels (default 266). - -f FILENAME
Enter a different file (in RAW format) holding an object you want to display. (default gadget.raw)
Two examples:
perl pureRaycaster.pl -w 100 -sor if using the .exe:
purePerlRayCaster.exe -w 100 -sWill load the default object (gadget.raw) and will use the default (blue) color to create the ray casting output on a window that has 100 pixels width. Smooth shadows will be calculated.
perl pureRaycaster.pl -c red -w 640 -f diamond.rawWill load object in diamond.raw file and use red color to create the ray casting output on a window that has 640 pixels width. No smooth shadows will be calculated.