Something went wrong. Try again.
the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
Something went wrong. Try again.
789 B · 29 lines
C++
at main
1234567891011121314151617181920212223242526272829#include "stdafx.h"#include "FrustumCuller.h"
FrustumCuller::FrustumCuller(){ frustum = Frustum::getFrustum();}
void FrustumCuller::prepare(double xOff, double yOff, double zOff){ this->xOff = xOff; this->yOff = yOff; this->zOff = zOff;}
bool FrustumCuller::cubeFullyInFrustum(double x0, double y0, double z0, double x1, double y1, double z1){ return frustum->cubeFullyInFrustum(x0 - xOff, y0 - yOff, z0 - zOff, x1 - xOff, y1 - yOff, z1 - zOff);}
bool FrustumCuller::cubeInFrustum(double x0, double y0, double z0, double x1, double y1, double z1){ return frustum->cubeInFrustum(x0 - xOff, y0 - yOff, z0 - zOff, x1 - xOff, y1 - yOff, z1 - zOff);}
bool FrustumCuller::isVisible(AABB *bb){ return cubeInFrustum(bb->x0, bb->y0, bb->z0, bb->x1, bb->y1, bb->z1);}