Overte C++ Documentation
Util.h
1 //
2 // Util.h
3 // interface/src
4 //
5 // Created by Philip Rosedale on 8/24/12.
6 // Copyright 2012 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_Util_h
13 #define hifi_Util_h
14 
15 #include <glm/glm.hpp>
16 #include <glm/gtc/quaternion.hpp>
17 
18 class ShapeEntityItem;
19 class ShapeInfo;
20 
21 void runTimingTests();
22 void runUnitTests();
23 
24 bool rayIntersectsSphere(const glm::vec3& rayStarting, const glm::vec3& rayNormalizedDirection,
25  const glm::vec3& sphereCenter, float sphereRadius, float& distance);
26 
27 bool pointInSphere(glm::vec3& point, glm::vec3& sphereCenter, double sphereRadius);
28 
29 void shapeInfoCalculator(const ShapeEntityItem * const shapeEntity, ShapeInfo &shapeInfo);
30 
31 #endif // hifi_Util_h