projects
/
meshfrac
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
foo
[meshfrac]
/
src
/
geom.c
diff --git
a/src/geom.c
b/src/geom.c
index
81e9df4
..
4e30628
100644
(file)
--- a/
src/geom.c
+++ b/
src/geom.c
@@
-1,4
+1,5
@@
#include <stdio.h>
#include <stdio.h>
+#include <assert.h>
#include "geom.h"
#include "dynarr.h"
#include "geom.h"
#include "dynarr.h"
@@
-130,6
+131,12
@@
float ray_poly(const cgm_ray *ray, const struct poly *poly)
return t;
}
return t;
}
+int init_poly(struct poly *p)
+{
+ p->verts = dynarr_alloc(0, sizeof *p->verts);
+ assert(p->verts);
+ return p->verts ? 0 : -1;
+}
/* returns:
* 1 -> both inside
/* returns:
* 1 -> both inside