Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(652)

Unified Diff: chrome/browser/android/vr_shell/vr_math.h

Issue 2335643002: Add VR Shell animation classes and unit test. (Closed)
Patch Set: Add VR Shell animation classes and unit test. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/vr_gl_util.cc ('k') | chrome/browser/android/vr_shell/vr_math.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_math.h
diff --git a/chrome/browser/android/vr_shell/vr_util.h b/chrome/browser/android/vr_shell/vr_math.h
similarity index 73%
rename from chrome/browser/android/vr_shell/vr_util.h
rename to chrome/browser/android/vr_shell/vr_math.h
index 830f3e278569dc7c5a21438a2385d28679172d4f..1567ea0c58eb599bc27e7cf0bd32ce3939547042 100644
--- a/chrome/browser/android/vr_shell/vr_util.h
+++ b/chrome/browser/android/vr_shell/vr_math.h
@@ -2,13 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_UTIL_H_
-#define CHROME_BROWSER_ANDROID_VR_SHELL_VR_UTIL_H_
+#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_MATH_H_
+#define CHROME_BROWSER_ANDROID_VR_SHELL_VR_MATH_H_
#include <string>
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h"
-#include "ui/gl/gl_bindings.h"
namespace vr_shell {
@@ -41,8 +40,6 @@ void ScaleM(gvr::Mat4f& tmat, const gvr::Mat4f& mat, float x, float y, float z);
void ScaleMRight(gvr::Mat4f& tmat, const gvr::Mat4f& mat,
float x, float y, float z);
-std::array<float, 16> MatrixToGLArray(const gvr::Mat4f& matrix);
-
// Util functions that are copied from the treasure_hunt NDK demo in
// third_party/gvr-andoir-sdk/ folder.
gvr::Mat4f MatrixTranspose(const gvr::Mat4f& mat);
@@ -56,9 +53,6 @@ gvr::Mat4f MatrixMul(const gvr::Mat4f& matrix1, const gvr::Mat4f& matrix2);
gvr::Mat4f PerspectiveMatrixFromView(const gvr::Rectf& fov,
float z_near,
float z_far);
-gvr::Rectf ModulateRect(const gvr::Rectf& rect, float width, float height);
-gvr::Recti CalculatePixelSpaceRect(const gvr::Sizei& texture_size,
- const gvr::Rectf& texture_rect);
// Provides the direction the head is looking towards as a 3x1 unit vector.
gvr::Vec3f getForwardVector(const gvr::Mat4f& matrix);
@@ -66,18 +60,6 @@ gvr::Vec3f getForwardVector(const gvr::Mat4f& matrix);
// Provides the relative translation of the head as a 3x1 vector.
gvr::Vec3f getTranslation(const gvr::Mat4f& matrix);
-// Compile a shader.
-GLuint CompileShader(GLenum shader_type,
- const GLchar* shader_source,
- std::string& error);
-
-// Compile and link a program.
-GLuint CreateAndLinkProgram(GLuint vertex_shader_handle,
- GLuint fragment_shader_handle,
- int num_attributes,
- const GLchar** attributes,
- std::string& error);
-
gvr::Quatf QuatMultiply(const gvr::Quatf& a, const gvr::Quatf& b);
gvr::Mat4f QuatToMatrix(const gvr::Quatf& quat);
@@ -94,4 +76,4 @@ gvr::Quatf QuatFromAxisAngle(float x, float y, float z, float angle);
} // namespace vr_shell
-#endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_UTIL_H_
+#endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_MATH_H_
« no previous file with comments | « chrome/browser/android/vr_shell/vr_gl_util.cc ('k') | chrome/browser/android/vr_shell/vr_math.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698