1
0
mirror of git://projects.qi-hardware.com/ben-scans.git synced 2024-11-22 09:16:15 +02:00
ben-scans/solidify/face.h
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

44 lines
804 B
C

/*
* face.h - Data structure and handling of one face of a part
*
* Written 2010 by Werner Almesberger
* Copyright 2010 by Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef FACE_H
#define FACE_H
#include "array.h"
/*
* 2D transformation:
*
* x' = x*a[0][0]+y*a[0][1]+b[0]
* y' = x*a[1][0]+y*a[1][1]+b[1]
*/
struct matrix {
double a[2][2];
double b[2];
};
struct face {
struct array *a;
int sx, sy; /* size */
int z_ref;
double fx, fy; /* inclination factor */
struct matrix m;
};
struct face *read_face(const char *name);
#endif /* FACE_H */