X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fgeom.h;h=7fc183c5a2737e7ec2396bfc0f65163539fed823;hb=HEAD;hp=ebb6659c9c58fb97fc2ea2768e7032ab80d3bcd6;hpb=34e07fdc87e289e9ce574df7755e5e781136c20b;p=meshfrac diff --git a/src/geom.h b/src/geom.h index ebb6659..7fc183c 100644 --- a/src/geom.h +++ b/src/geom.h @@ -18,7 +18,7 @@ struct poly { float plane_dist(const struct plane *p, const cgm_vec3 *pt); float plane_sdist(const struct plane *p, const cgm_vec3 *pt); -void midplane(struct plane *p, const cgm_vec3 *a, const cgm_vec3 *b); +void midplane(struct plane *p, const cgm_vec3 *a, const cgm_vec3 *b, float offs); void poly_plane(const struct poly *poly, struct plane *plane); int plane_poly(const struct plane *plane, struct poly *poly, float size); @@ -27,6 +27,10 @@ int plane_poly(const struct plane *plane, struct poly *poly, float size); float ray_plane(const cgm_ray *ray, const struct plane *plane); float ray_poly(const cgm_ray *ray, const struct poly *poly); +int init_poly(struct poly *p); +void destroy_poly(struct poly *p); int clip_poly(struct poly *pout, const struct poly *pin, const struct plane *plane); +int poly_poly(const struct poly *p1, const struct poly *p2); + #endif /* GEOM_H_ */