diff options
author | rodri <rgl@antares-labs.eu> | 2024-09-26 15:22:02 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-09-26 15:22:02 +0000 |
commit | 3155c6737832c54310c70ecaaf8667d0362de5e8 (patch) | |
tree | 5046974fdbaef855fb29d19671a9b80a9deb41f2 /util.c | |
parent | a8c789be9ab0fec65004118b7df373e84900cb1a (diff) | |
download | libgraphics-3155c6737832c54310c70ecaaf8667d0362de5e8.tar.gz libgraphics-3155c6737832c54310c70ecaaf8667d0362de5e8.tar.bz2 libgraphics-3155c6737832c54310c70ecaaf8667d0362de5e8.zip |
implement a parser for a model(6). get rid of the libobj dependency.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -4,7 +4,6 @@ #include <draw.h> #include <memdraw.h> #include <geometry.h> -#include "libobj/obj.h" #include "graphics.h" #include "internal.h" @@ -52,6 +51,12 @@ maxpt2(Point2 a, Point2 b) }; } +int +eqpt2(Point2 a, Point2 b) +{ + return vec2len(subpt2(a, b)) < ε2; +} + Point3 modulapt3(Point3 a, Point3 b) { @@ -80,6 +85,12 @@ maxpt3(Point3 a, Point3 b) }; } +int +eqpt3(Point3 a, Point3 b) +{ + return vec3len(subpt3(a, b)) < ε2; +} + void memsetf(void *dp, float v, usize len) { |