overte/libraries/octree/src/OctreeUtils.h
Andrew Meadows bcf2cc8074 use references not pointers for ViewFrustums
also unravelling some spaghetti:
(1) split Octree stuff out of ViewFrustum
(2) moved ViewFrustum from octree to shared lib
(3) removed some cruft
2016-05-05 18:28:27 -07:00

30 lines
985 B
C++

//
// OctreeUtils.h
// libraries/octree/src
//
// Created by Andrew Meadows 2016.03.04
// Copyright 2016 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_OctreeUtils_h
#define hifi_OctreeUtils_h
#include "OctreeConstants.h"
class AABox;
/// renderAccuracy represents a floating point "visibility" of an object based on it's view from the camera. At a simple
/// level it returns 0.0f for things that are so small for the current settings that they could not be visible.
float calculateRenderAccuracy(const glm::vec3& position,
const AABox& bounds,
float octreeSizeScale = DEFAULT_OCTREE_SIZE_SCALE,
int boundaryLevelAdjust = 0);
float boundaryDistanceForRenderLevel(unsigned int renderLevel, float voxelSizeScale);
float getAccuracyAngle(float octreeSizeScale, int boundaryLevelAdjust);
#endif // hifi_OctreeUtils_h