1
0
mirror of git://projects.qi-hardware.com/ben-scans.git synced 2024-11-22 12:52:48 +02:00
Commit Graph

8 Commits

Author SHA1 Message Date
Werner Almesberger
2cc9a9e505 Step sizes are now auto-determined, allowing use of files of any resolution.
- solidify/face.h (struct face): record the x, y, and z step sizes
- solidify/face.c (load_file, read_file): moved file I/O from read_file to
  load_file
- solidify/face.c (adjust_step, read_file): before populating the array,
  determine the x/y and z step sizes
- solidify/solidify.c (main): verify that both faces have the same step
  sizes
- solidify/solidify.c (main): don't use hard-coded z step size
- solidify/solidify.c (main): move call to setlocale() next to gtk_init(),
  to make it clear whose damage we're trying to control
2010-09-24 19:53:06 -03:00
Werner Almesberger
898970b3dd Instead of performing the tranformations stepwise for each point, pre-calculate
them once.

- solidify/matrix.h, solidify/matrix.c: 2D matrix operations
- solidify/Makefile (OBJS): added matrix.o
- solidify/face.h (struct matrix): moved to solidify/matrix.h
- solidify/overlap.c (point, merge_matrix, draw_map): precalculate a single
  vA+b transformation instead of stepwise transforming the vector inside
  the loop
- solidify/overlap.c (do_shift): now that the math is right (or at least
  better), reverse the shift
2010-09-24 16:42:36 -03:00
Werner Almesberger
f3e7c1ec73 Various coordinate transform corrections in overlap.c
- solidify/face.h (struct matrix), solidify/face.c (read_file): also record
  the face's center
- solidify/overlap.c (point): reference faces to the screen center
- solidify/overlap.c (point): use correct model coordinates for z0
  calculation
2010-09-24 03:46:32 -03:00
Werner Almesberger
525e1557ec Use two faces and show how they overlap (in progress)
- solidify/face.h (face_z0): calculate height of z0 plane
- solidify/level.c (draw_image): use face_z0 instead of open-coding the
  calculation
- solidify/overlap.c (draw_image, point): moved per-point processing from
  draw_image() to point()
- solidify/overlap.c (point): show differences between both faces
- solidify/solidify.c (usage, main): load both faces
- solidify/solidify.c (usage, main): accept distance between faces as third
  argument
2010-09-24 00:43:56 -03:00
Werner Almesberger
cef7cd5e18 Added interactive 2D transformation (working towards overlapping)
- solidify/Makefile (OBJS): added overlap.o
- solidify/Makefile (CFLAGS): added -O9 to speed up rotation a little
- solidify/array.h, solidify/array.c (get_bounded): like get(), but returns
  UNDEF if the indices are outside the array
- solidify/face.h (struct face, struct matrix), solidify/face.c (read_file):
  added a 2D transformation matrix to "struct face"
- solidify/overlap.h, solidify/overlap.c: show a face with 2D transformation
2010-09-23 22:17:19 -03:00
Werner Almesberger
598df91d9f Added copyright headers all over the place. (GPLv2+) 2010-09-23 20:13:48 -03:00
Werner Almesberger
6ac06aab7c Control inclination of the z0 plane. (Needs more work.)
- solidify/face.h (struct face), solidify/face.c (read_face),
  solidify/level.c (draw_map, draw_image): introduce inclination of the z0
  plane
- solidify/level.c (draw_map): make blue z == z0 display more continuous
- solidify/level.c (scroll_event): moved z0 shift to scroll_z
- solidify/level.c (scroll_event, scroll_xy): added manipulation of the
  z0 plane's inclination
2010-09-22 19:20:29 -03:00
Werner Almesberger
5f84394774 solidify: fast interactive face to solid converter 2010-09-22 17:04:43 -03:00