mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-18 04:02:54 +00:00
41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "nbt/IntArrayTag.h"
|
|
|
|
class IntArrayTag;
|
|
|
|
class BoundingBox {
|
|
public:
|
|
int x0, y0, z0, x1, y1, z1;
|
|
|
|
BoundingBox();
|
|
BoundingBox(const std::vector<int>& sourceData);
|
|
static BoundingBox* getUnknownBox();
|
|
static BoundingBox* orientBox(int footX, int footY, int footZ, int offX,
|
|
int offY, int offZ, int width, int height,
|
|
int depth, int orientation);
|
|
BoundingBox(BoundingBox* other);
|
|
BoundingBox(int x0, int y0, int z0, int x1, int y1, int z1);
|
|
BoundingBox(int x0, int z0, int x1, int z1);
|
|
bool intersects(BoundingBox* other);
|
|
bool intersects(int x0, int y0, int z0, int x1, int y1, int z1);
|
|
|
|
bool intersects(int x0, int z0, int x1, int z1);
|
|
void expand(BoundingBox* other);
|
|
BoundingBox* getIntersection(BoundingBox* other);
|
|
void move(int dx, int dy, int dz);
|
|
bool isInside(int x, int y, int z);
|
|
|
|
int getXSpan();
|
|
int getYSpan();
|
|
int getZSpan();
|
|
int getXCenter();
|
|
int getYCenter();
|
|
int getZCenter();
|
|
|
|
std::string toString();
|
|
IntArrayTag* createTag(const std::string& name);
|
|
}; |