2026-03-01 12:16:08 +08:00
|
|
|
#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;
|
|
|
|
|
|
2026-03-02 17:37:16 +07:00
|
|
|
static void prepare(shared_ptr<Player> player, bool mirror);
|
2026-03-01 12:16:08 +08:00
|
|
|
|
2026-03-03 03:04:10 +08:00
|
|
|
static TilePos *getCameraTilePos(shared_ptr<LivingEntity> player, double alpha);
|
|
|
|
|
static Vec3 *getCameraPos(shared_ptr<LivingEntity> player, double alpha);
|
|
|
|
|
static int getBlockAt(Level *level, shared_ptr<LivingEntity> player, float alpha);
|
2026-03-01 12:16:08 +08:00
|
|
|
};
|