From c5c6c8b89aefecb13ab8c363c5f0076d367f084d Mon Sep 17 00:00:00 2001 From: hasufell Date: Sat, 10 May 2014 19:16:39 +0200 Subject: [PATCH] Add half_edge.c for operations on half edge structures --- src/Makefile | 2 +- src/half_edge.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 src/half_edge.c diff --git a/src/Makefile b/src/Makefile index 2ceb1f6..c7ff8ca 100644 --- a/src/Makefile +++ b/src/Makefile @@ -16,7 +16,7 @@ endif TARGET = drow-engine HEADERS = err.h parser.h common.h print.h filereader.h gl_draw.h vector.h half_edge.h -OBJECTS = main.o parser.o print.o filereader.o gl_draw.o vector.o +OBJECTS = main.o parser.o print.o filereader.o gl_draw.o vector.o half_edge.o INCS = -I. CFLAGS += $(shell $(PKG_CONFIG) --cflags gl glu glib-2.0) diff --git a/src/half_edge.c b/src/half_edge.c new file mode 100644 index 0000000..cfb43bc --- /dev/null +++ b/src/half_edge.c @@ -0,0 +1,33 @@ +/* + * Copyright 2011-2014 hasufell + * + * This file is part of a hasufell project. + * + * 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 version 2 of the License only. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "half_edge.h" + +#include + + +/** + * Get all edges that emanate from vertice. + * + * @param vertice the vertice to get the emanating edges of + * @return pointer to a NULL-terminated array of half-edges + */ +HE_edge **get_all_emanating_edges(HE_vert *vertice) +{ + return NULL; +}