Skip to content

School Project - Graphic - Wireframe Viewer

Notifications You must be signed in to change notification settings

BenSouchet/wireframe-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fdf a.k.a wireframe

fdf is a program developed for my learning course at 42 school to view topological maps in a 3D space. Several options are available (see Keyboard shortcuts section for more infos) :

  • Zoom and unzoom
  • Move the map on the 3D space
  • Rotate the map (on the three axes of rotation)
  • Edit the display color of the maps
  • Navigate between all preloader maps you launched

Infos : In the "maps" folder you will find examples maps with which you can launch the program.

Install & launch

git clone https://github.com/BenjaminSouchet/Fdf ~/Fdf
cd ~/Fdf && ./fdf maps/good/mars.fdf

You have to launch the program with parameter(s). It's map(s) you would like to open at the execution of the program. Parameter(s) as to be the name(s) of valid filename(s).

Some Examples :

Open only one map ⇣

./fdf maps/good/pyramide.fdf

Open several maps ⇣

./fdf maps/good/pyramide.fdf maps/good/mars.fdf

Open all maps of a folder ⇣

./fdf maps/good/*

Keyboard shortcuts

Description  Key(s) 
Close the program (aka quit/exit)  esc 
Reset all the changes made for this map  clear 
Change the display color of the current map (aka change color)  shift 
Increase the global size of the map (aka zoom)  + 
Decrease the global size of the map (aka unzoom)  - 
Move the map to the up (aka move up)  ▲ 
Move the map to the down (aka move down)  ▼ 
Move the map to the left (aka width move left)  ◄ 
Move the map to the right (aka move right)  ► 
Clockwise rotation on the X axe  W 
Counter clockwise rotation on the X axe  S 
Clockwise rotation on the Y axe  D 
Counter clockwise rotation on the Y axe  A 
Clockwise rotation on the Z axe  E 
Counter clockwise rotation on the Z axe  Q 
Previous preloader map*  page 
up
Next preloader map*  page 
down
*Only available if you lauched the program with more than one map.*

Bad maps & errors

This program have a very complexe errors checker, so if you launch Fdf with bad maps you will see the type, the line and the column position of all errors of the bad map.

Example :

Let's try with maps of the "maps/bad" subfolder ⇣

./fdf maps/bad/*

You will show this in your shell ⇣

error: maps/bad/01.fdf (line 4 col 37)    --> Invalid Hexadecimal color code
error: maps/bad/02.fdf                    --> Lines aren't of the same length
error: maps/bad/03.fdf                    --> Lines aren't of the same length
error: maps/bad/04.fdf (line 5 col 18)    --> A sign must be followed only by digit(s)
error: maps/bad/05.fdf (line 5 col 36)    --> A sign must be followed only by digit(s)
error: maps/bad/06.fdf (line 4 col 38)    --> Invalid character
error: maps/bad/07.fdf (line 4 col 23)    --> A sign must be followed only by digit(s)
error: maps/bad/08.fdf (line 4 col 8)     --> Invalid character
error: maps/bad/09.fdf (line 3 col 38)    --> Invalid character
error: maps/bad/10.fdf                    --> No data in the input file
error: maps/bad/11.fdf                    --> No data in the input file
error: maps/bad/12.fdf                    --> No data in the input file
error: maps/bad/13.fdf (line 2 col 38)    --> Invalid Hexadecimal color code
error: maps/bad/14.fdf (line 2 col 38)    --> Invalid Hexadecimal color code
error: maps/bad/15.fdf (line 4 col 3)     --> Invalid character

Contact & contribute

If you want to contact me, or fix/improve FdF, just send me a mail at [email protected]