Introduce a solid data type and use it, mainly in overlap()
- solidify/solid.h: definition of a solid made from two opposing faces
- solidify/overlap.h (overlap), solidify/overlap.c (draw_image,
scroll_event, overlap): operate on solid instead of face
- solidify/overlap.c (sx, sy, draw_image, overlap): helper functions sx()
and sy() to determine canvas size
- solidify/overlap.c (BORDER, sx, sy): added a border around the piece,
to help with positioning
- solidify/solidify.c (clicked, gui_buttons, gui, main): use solid instead
of faces
2010-09-24 05:41:35 +03:00
|
|
|
/*
|
|
|
|
* solid.h - Data structure and handling of a solid made of two opposing faces
|
|
|
|
*
|
|
|
|
* 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 SOLID_H
|
|
|
|
#define SOLID_H
|
|
|
|
|
|
|
|
struct solid {
|
|
|
|
struct face *a, *b;
|
|
|
|
double dist;
|
|
|
|
};
|
|
|
|
|
2010-09-24 12:22:48 +03:00
|
|
|
|
|
|
|
void povray(const struct solid *s);
|
|
|
|
|
Introduce a solid data type and use it, mainly in overlap()
- solidify/solid.h: definition of a solid made from two opposing faces
- solidify/overlap.h (overlap), solidify/overlap.c (draw_image,
scroll_event, overlap): operate on solid instead of face
- solidify/overlap.c (sx, sy, draw_image, overlap): helper functions sx()
and sy() to determine canvas size
- solidify/overlap.c (BORDER, sx, sy): added a border around the piece,
to help with positioning
- solidify/solidify.c (clicked, gui_buttons, gui, main): use solid instead
of faces
2010-09-24 05:41:35 +03:00
|
|
|
#endif /* SOLID_H */
|