diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/Camera.h | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.Client/Camera.h')
| -rw-r--r-- | Minecraft.Client/Camera.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Minecraft.Client/Camera.h b/Minecraft.Client/Camera.h new file mode 100644 index 00000000..cccb0b2d --- /dev/null +++ b/Minecraft.Client/Camera.h @@ -0,0 +1,32 @@ +#pragma once +#include "..\Minecraft.World\FloatBuffer.h" +#include "..\Minecraft.World\IntBuffer.h" + + +class TilePos; +class Vec3; +class Player; +class Mob; + +class Camera +{ +public: + static float xPlayerOffs; + static float yPlayerOffs; + static float zPlayerOffs; + +private: +// static IntBuffer *viewport; + static FloatBuffer *modelview; + static FloatBuffer *projection; +// static FloatBuffer *position; + +public: + static float xa, ya, za, xa2, za2; + + static void prepare(shared_ptr<Player> player, bool mirror); + + static TilePos *getCameraTilePos(shared_ptr<Mob> player, double alpha); + static Vec3 *getCameraPos(shared_ptr<Mob> player, double alpha); + static int getBlockAt(Level *level, shared_ptr<Mob> player, float alpha); +};
\ No newline at end of file |
