Add missing types.h and fix Makefile
This commit is contained in:
parent
f6ee3658fb
commit
18975f9434
2
Makefile
2
Makefile
@ -15,7 +15,7 @@ CFLAGS += -O0 -g3
|
||||
endif
|
||||
|
||||
TARGET = drow-engine
|
||||
HEADERS = err.h parser.h
|
||||
HEADERS = err.h parser.h types.h
|
||||
OBJECTS = main.o parser.o
|
||||
INCS = -I.
|
||||
|
||||
|
63
types.h
Normal file
63
types.h
Normal file
@ -0,0 +1,63 @@
|
||||
#ifndef _DROW_ENGINE_TYPES_H
|
||||
#define _DROW_ENGINE_TYPES_H
|
||||
|
||||
|
||||
/**
|
||||
* Standard file buffer
|
||||
*/
|
||||
#define STD_FILE_BUF 4096
|
||||
|
||||
|
||||
typedef struct HE_edge HE_edge;
|
||||
typedef struct HE_vert HE_vert;
|
||||
typedef struct HE_face HE_face;
|
||||
|
||||
/**
|
||||
* Represents a half-edge.
|
||||
*/
|
||||
struct HE_edge {
|
||||
/**
|
||||
* Start-vertex of the halfe-edge.
|
||||
*/
|
||||
HE_vert *vert;
|
||||
/**
|
||||
* Oppositely oriented adjacent half-edge.
|
||||
*/
|
||||
HE_edge *pair;
|
||||
/**
|
||||
* Face the half-edge borders.
|
||||
*/
|
||||
HE_face *face;
|
||||
/**
|
||||
* Next half-edge around the face.
|
||||
*/
|
||||
HE_edge *next;
|
||||
};
|
||||
|
||||
/**
|
||||
* Represents a vertex with a random attached
|
||||
* hald-edge.
|
||||
*/
|
||||
struct HE_vert {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
|
||||
/**
|
||||
* One of the half-edges emanating from the vertex.
|
||||
*/
|
||||
HE_edge *edge;
|
||||
};
|
||||
|
||||
/**
|
||||
* Represents a face
|
||||
*/
|
||||
struct HE_face {
|
||||
/**
|
||||
* One of the half-edges bordering the face.
|
||||
*/
|
||||
HE_edge *edge;
|
||||
};
|
||||
|
||||
|
||||
#endif /* _DROW_ENGINE_TYPES_H */
|
Loading…
Reference in New Issue
Block a user