the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 35 lines 1.3 kB view raw
1#pragma once 2#include "..\Minecraft.World\AABB.h" 3 4class FrustumData 5{ 6public: 7 //enum FrustumSide 8 static const int RIGHT = 0; // The RIGHT side of the frustum 9 static const int LEFT = 1; // The LEFT side of the frustum 10 static const int BOTTOM = 2; // The BOTTOM side of the frustum 11 static const int TOP = 3; // The TOP side of the frustum 12 static const int BACK = 4; // The BACK side of the frustum 13 static const int FRONT = 5; // The FRONT side of the frustum 14 15 // Like above, instead of saying a number for the ABC and D of the plane, we 16 // want to be more descriptive. 17 static const int A = 0; // The X value of the plane's normal 18 static const int B = 1; // The Y value of the plane's normal 19 static const int C = 2; // The Z value of the plane's normal 20 static const int D = 3; // The distance the plane is from the origin 21 22 float** m_Frustum; 23 floatArray proj; 24 floatArray modl; 25 floatArray clip; 26 27 FrustumData(); 28 ~FrustumData(); 29 30 bool pointInFrustum(float x, float y, float z); 31 bool sphereInFrustum(float x, float y, float z, float radius); 32 bool cubeFullyInFrustum(double x1, double y1, double z1, double x2, double y2, double z2); 33 bool cubeInFrustum(double x1, double y1, double z1, double x2, double y2, double z2); 34 bool isVisible(AABB *aabb); 35};