| Index: chrome/browser/android/vr_shell/ui_elements.h
|
| diff --git a/chrome/browser/android/vr_shell/ui_elements.h b/chrome/browser/android/vr_shell/ui_elements.h
|
| index ec6d78a0f93bcecc35efc457764660aca2e877ab..17adc48167305c5716b71c8d77136c464804e35f 100644
|
| --- a/chrome/browser/android/vr_shell/ui_elements.h
|
| +++ b/chrome/browser/android/vr_shell/ui_elements.h
|
| @@ -44,8 +44,8 @@ enum Fill {
|
| CONTENT = 4,
|
| };
|
|
|
| -struct ReversibleTransform {
|
| - ReversibleTransform();
|
| +struct Transform {
|
| + Transform();
|
|
|
| void MakeIdentity();
|
| void Rotate(gvr::Quatf quat);
|
| @@ -54,23 +54,22 @@ struct ReversibleTransform {
|
| void Scale(float sx, float sy, float sz);
|
|
|
| gvr::Mat4f to_world;
|
| - gvr::Mat4f from_world;
|
| -
|
| - // This object-to-world orientation quaternion is technically
|
| - // redundant, but it's easy to track it here for use as needed.
|
| - // TODO(klausw): use this instead of MatrixVectorRotation()?
|
| - // Would need quat * vector implementation.
|
| - gvr::Quatf orientation = {0.0f, 0.0f, 0.0f, 1.0f};
|
| };
|
|
|
| -struct WorldObject {
|
| - ReversibleTransform transform;
|
| -};
|
| +class WorldRectangle {
|
| + public:
|
| + const gvr::Mat4f& TransformMatrix() const;
|
| + void SetTransform(const Transform& transform);
|
|
|
| -struct WorldRectangle : public WorldObject {
|
| gvr::Vec3f GetCenter() const;
|
| gvr::Vec3f GetNormal() const;
|
| - float GetRayDistance(gvr::Vec3f rayOrigin, gvr::Vec3f rayVector) const;
|
| + bool GetRayDistance(const gvr::Vec3f& ray_origin,
|
| + const gvr::Vec3f& ray_vector,
|
| + float* distance) const;
|
| + gvr::Vec2f GetUnitRectangleCoordinates(const gvr::Vec3f& world_point);
|
| +
|
| + private:
|
| + Transform transform_;
|
| };
|
|
|
| struct ContentRectangle : public WorldRectangle {
|
|
|