diff options
author | rodri <rgl@antares-labs.eu> | 2024-05-20 20:20:48 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-05-20 20:20:48 +0000 |
commit | d3516b11559657935d70829c672f29393e857b8e (patch) | |
tree | 13c2b87f9daf6bd813f43c750fef52d5b8b34ddd /graphics.h | |
parent | 6e461add61d35d23f733cffb5064a286419b79b0 (diff) | |
download | libgraphics-d3516b11559657935d70829c672f29393e857b8e.tar.gz libgraphics-d3516b11559657935d70829c672f29393e857b8e.tar.bz2 libgraphics-d3516b11559657935d70829c672f29393e857b8e.zip |
fix the perspective projection and add inverse xform functions.
Diffstat (limited to 'graphics.h')
-rw-r--r-- | graphics.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -276,10 +276,19 @@ void rmviewport(Viewport*); /* render */ Renderer *initgraphics(void); + +/* xform */ Point3 model2world(Entity*, Point3); Point3 world2vcs(Camera*, Point3); Point3 vcs2clip(Camera*, Point3); Point3 world2clip(Camera*, Point3); +Point3 clip2ndc(Point3); +Point3 ndc2viewport(Framebuf*, Point3); +Point3 viewport2ndc(Framebuf*, Point3); +Point3 ndc2vcs(Camera*, Point3); +Point3 viewport2vcs(Camera*, Point3); +Point3 vcs2world(Camera*, Point3); +Point3 viewport2world(Camera*, Point3); void perspective(Matrix3, double, double, double, double); void orthographic(Matrix3, double, double, double, double, double, double); |