diff --git a/libraries/voxels/src/ViewFrustum.cpp b/libraries/voxels/src/ViewFrustum.cpp index 5c9022c27e..8bdb2d97cb 100644 --- a/libraries/voxels/src/ViewFrustum.cpp +++ b/libraries/voxels/src/ViewFrustum.cpp @@ -192,16 +192,16 @@ int ViewFrustum::sphereInFrustum(const glm::vec3& center, float radius) const { int ViewFrustum::boxInFrustum(const AABox& box) const { - printf("ViewFrustum::boxInFrustum() box.corner=%f,%f,%f x=%f\n", - box.getCorner().x,box.getCorner().y,box.getCorner().z,box.getSize().x); + //printf("ViewFrustum::boxInFrustum() box.corner=%f,%f,%f x=%f\n", + // box.getCorner().x,box.getCorner().y,box.getCorner().z,box.getSize().x); int result = INSIDE; for(int i=0; i < 6; i++) { - printf("plane[%d] -- point(%f,%f,%f) normal(%f,%f,%f) d=%f \n",i, - _planes[i].getPoint().x, _planes[i].getPoint().y, _planes[i].getPoint().z, - _planes[i].getNormal().x, _planes[i].getNormal().y, _planes[i].getNormal().z, - _planes[i].getDCoefficient() - ); + //printf("plane[%d] -- point(%f,%f,%f) normal(%f,%f,%f) d=%f \n",i, + // _planes[i].getPoint().x, _planes[i].getPoint().y, _planes[i].getPoint().z, + // _planes[i].getNormal().x, _planes[i].getNormal().y, _planes[i].getNormal().z, + // _planes[i].getDCoefficient() + //); glm::vec3 normal = _planes[i].getNormal(); glm::vec3 boxVertexP = box.getVertexP(normal); @@ -210,13 +210,11 @@ int ViewFrustum::boxInFrustum(const AABox& box) const { glm::vec3 boxVertexN = box.getVertexN(normal); float planeToBoxVertexNDistance = _planes[i].distance(boxVertexN); - - - printf("plane[%d] normal=(%f,%f,%f) bVertexP=(%f,%f,%f) planeToBoxVertexPDistance=%f boxVertexN=(%f,%f,%f) planeToBoxVertexNDistance=%f\n",i, - normal.x,normal.y,normal.z, - boxVertexP.x,boxVertexP.y,boxVertexP.z,planeToBoxVertexPDistance, - boxVertexN.x,boxVertexN.y,boxVertexN.z,planeToBoxVertexNDistance - ); + //printf("plane[%d] normal=(%f,%f,%f) bVertexP=(%f,%f,%f) planeToBoxVertexPDistance=%f boxVertexN=(%f,%f,%f) planeToBoxVertexNDistance=%f\n",i, + // normal.x,normal.y,normal.z, + // boxVertexP.x,boxVertexP.y,boxVertexP.z,planeToBoxVertexPDistance, + // boxVertexN.x,boxVertexN.y,boxVertexN.z,planeToBoxVertexNDistance + // ); if (planeToBoxVertexPDistance < 0) { return OUTSIDE; diff --git a/voxel-server/src/main.cpp b/voxel-server/src/main.cpp index d85154abc5..91fa2fd596 100644 --- a/voxel-server/src/main.cpp +++ b/voxel-server/src/main.cpp @@ -49,7 +49,7 @@ VoxelTree randomTree; bool wantColorRandomizer = false; bool debugViewFrustum = false; -bool viewFrustumCulling = false; // for now +bool viewFrustumCulling = true; // for now void addSphere(VoxelTree * tree,bool random, bool wantColorRandomizer) { float r = random ? randFloatInRange(0.05,0.1) : 0.25; @@ -276,8 +276,8 @@ int main(int argc, const char * argv[]) ::debugViewFrustum = cmdOptionExists(argc, argv, DEBUG_VIEW_FRUSTUM); printf("debugViewFrustum=%s\n", (::debugViewFrustum ? "yes" : "no")); - const char* VIEW_FRUSTUM_CULLING = "--ViewFrustumCulling"; - ::viewFrustumCulling = cmdOptionExists(argc, argv, VIEW_FRUSTUM_CULLING); + const char* NO_VIEW_FRUSTUM_CULLING = "--NoViewFrustumCulling"; + ::viewFrustumCulling = !cmdOptionExists(argc, argv, NO_VIEW_FRUSTUM_CULLING); printf("viewFrustumCulling=%s\n", (::viewFrustumCulling ? "yes" : "no")); const char* WANT_COLOR_RANDOMIZER = "--WantColorRandomizer";