17 #ifndef TANGO_GL_GL_UTIL_H_ 18 #define TANGO_GL_GL_UTIL_H_ 19 #define GLM_FORCE_RADIANS 21 #define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 25 #include <android/log.h> 26 #include <GLES2/gl2.h> 27 #include <GLES2/gl2ext.h> 28 #include <tango_support_api.h> 36 #define LOG_TAG "rtabmap" 42 #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__) 43 #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) 44 #define LOGW(...) __android_log_print(ANDROID_LOG_WARN,LOG_TAG,__VA_ARGS__) 46 #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) 49 #define M_PI 3.1415926f 52 #define RADIAN_2_DEGREE 57.2957795f 53 #define DEGREE_2_RADIANS 0.0174532925f 60 const char* fragment_source);
99 int display_rotation,
int color_camera_rotation);
111 TangoSupportRotation display_rotation,
int color_camera_rotation);
115 #endif // TANGO_GL_RENDERER_GL_UTIL
GLM_FUNC_DECL genType min(genType const &x, genType const &y)
glm::vec3 GetTranslationFromMatrix(const glm::mat4 &mat)
void PrintQuaternion(const glm::quat &quat)
highp_quat quat
Quaternion of default single-precision floating-point numbers.
GLuint CreateProgram(const char *vertex_source, const char *fragment_source)
float DistanceSquared(const glm::vec3 &v1, const glm::vec3 &v2)
TangoSupportRotation GetAndroidRotationFromColorCameraToDisplay(int display_rotation, int color_camera_rotation)
void PrintMatrix(const glm::mat4 &matrix)
glm::vec3 ApplyTransform(const glm::mat4 &mat, const glm::vec3 &vec)
float Clamp(float value, float min, float max)
glm::vec3 LerpVector(const glm::vec3 &x, const glm::vec3 &y, float a)
GLM_FUNC_DECL detail::tquat< T, P > rotation(detail::tvec3< T, P > const &orig, detail::tvec3< T, P > const &dest)
void PrintVector(const glm::vec3 &vector)
void CheckGlError(const char *operation)
GLM_FUNC_DECL genType max(genType const &x, genType const &y)
glm::vec3 GetColumnFromMatrix(const glm::mat4 &mat, const int col)
bool SegmentAABBIntersect(const glm::vec3 &aabb_min, const glm::vec3 &aabb_max, const glm::vec3 &start, const glm::vec3 &end)
void DecomposeMatrix(const glm::mat4 &transform_mat, glm::vec3 &translation, glm::quat &rotation, glm::vec3 &scale)