2019-05-14 12:05:54 -07:00
|
|
|
//
|
|
|
|
// Created by aurailus on 13/05/19.
|
|
|
|
//
|
|
|
|
|
2019-08-24 17:39:35 -07:00
|
|
|
#pragma once
|
2019-05-14 12:05:54 -07:00
|
|
|
|
2020-07-16 19:38:25 -07:00
|
|
|
#include "../util/Vec.h"
|
|
|
|
|
2019-10-29 20:06:55 -07:00
|
|
|
class PointedThing {
|
|
|
|
public:
|
|
|
|
enum class Thing {
|
|
|
|
ENTITY,
|
|
|
|
BLOCK,
|
|
|
|
NOTHING
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PointedBlock {
|
|
|
|
unsigned int blockId;
|
2020-01-08 14:42:14 -08:00
|
|
|
glm::ivec3 pos;
|
2020-07-16 19:38:25 -07:00
|
|
|
EVec face;
|
2019-10-29 20:06:55 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct PointedEntity {
|
|
|
|
//TODO;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef union {
|
|
|
|
PointedBlock block;
|
|
|
|
PointedEntity entity;
|
|
|
|
unsigned short nothing;
|
|
|
|
} PointedThingTarget;
|
|
|
|
|
2019-05-15 20:35:26 -07:00
|
|
|
PointedThing() = default;
|
|
|
|
PointedThing(const PointedThing &o) = default;
|
2019-05-14 12:05:54 -07:00
|
|
|
|
2019-10-29 20:06:55 -07:00
|
|
|
Thing thing = PointedThing::Thing::NOTHING;
|
|
|
|
PointedThingTarget target = PointedThingTarget{0};
|
2019-05-14 12:05:54 -07:00
|
|
|
};
|