mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 07:43:37 +00:00
34 lines
926 B
C++
34 lines
926 B
C++
#pragma once
|
|
#include "../../Minecraft.World/IO/Streams/FloatBuffer.h"
|
|
#include "../../Minecraft.World/IO/Streams/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(std::shared_ptr<Player> player, bool mirror);
|
|
|
|
static TilePos* getCameraTilePos(std::shared_ptr<LivingEntity> player,
|
|
double alpha);
|
|
static Vec3 getCameraPos(std::shared_ptr<LivingEntity> player,
|
|
double alpha);
|
|
static int getBlockAt(Level* level, std::shared_ptr<LivingEntity> player,
|
|
float alpha);
|
|
};
|