Skip to content
This repository was archived by the owner on Nov 8, 2019. It is now read-only.

Commit 25a0c20

Browse files
GVR SDK Android v1.180.0
1 parent f841407 commit 25a0c20

File tree

77 files changed

+31116
-66
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+31116
-66
lines changed

Diff for: README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
Enables Daydream and Cardboard app development on Android.
44

5-
Copyright (c) 2016 Google Inc. All rights reserved.
5+
Copyright (c) 2018 Google Inc.
6+
7+
See [https://developers.google.com/terms/](https://developers.google.com/terms/)
8+
for the **Google APIs Terms of Service** which cover this SDK. The code in
9+
`samples` is covered by the Apache 2 `LICENSE` file in that directory, and the
10+
files in `assets` are covered by Creative Commons `LICENSE` file in that
11+
directory.
612

713
For updates, known issues, and upgrade instructions, see the
814
[release-notes](//github.com/googlevr/gvr-android-sdk/releases).

Diff for: apks/controller_emulator.apk

241 KB
Binary file not shown.

Diff for: assets/6dof_controller/dd6dof_controller.fbx

103 KB
Binary file not shown.

Diff for: assets/6dof_controller/dd6dof_controller_diffuse.png

82.1 KB
Loading

Diff for: assets/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
The **controller** directory contains a model of the Daydream Controller.
44

5+
The **6dof_controller** directory contains a model of the Daydream 6DOF
6+
Controller.
7+
58
The **panoramas** directory contains sample 360 images. See the javadoc for
69
**sdk-simplepanowidget**'s **SimpleVrPanoramaActivity** class for information on
710
how to view these videos.

Diff for: build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ task clean(type: Delete) {
3535
// The dependencies for NDK builds live inside the .aar files so they need to
3636
// be extracted before NDK targets can build.
3737
task extractAudioSo(type: Copy) {
38-
from zipTree("${project.rootDir}/libraries/sdk-audio-1.170.0.aar")
38+
from zipTree("${project.rootDir}/libraries/sdk-audio-1.180.0.aar")
3939
into "${project.rootDir}/libraries/"
4040
include "jni/**/libgvr_audio.so"
4141
}
4242

4343
task extractGvrSo(type: Copy) {
44-
from zipTree("${project.rootDir}/libraries/sdk-base-1.170.0.aar")
44+
from zipTree("${project.rootDir}/libraries/sdk-base-1.180.0.aar")
4545
into "${project.rootDir}/libraries/"
4646
include "jni/**/libgvr.so"
4747
}

Diff for: libraries/headers/vr/gvr/capi/include/gvr_beta.h

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/* Copyright 2018 Google Inc. All rights reserved.
2+
*
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
16+
#ifndef VR_GVR_CAPI_INCLUDE_GVR_BETA_H_
17+
#define VR_GVR_CAPI_INCLUDE_GVR_BETA_H_
18+
19+
#include "vr/gvr/capi/include/gvr_types.h"
20+
21+
#ifdef __cplusplus
22+
extern "C" {
23+
#endif
24+
25+
/// @defgroup Beta GVR Beta APIs
26+
///
27+
/// @brief These are experimental APIs that are likely to change between
28+
/// releases.
29+
///
30+
/// This file contains functions that are part of the Daydream Labs APIs. These
31+
/// APIs are public, but there is no guarantee about how long they will be
32+
/// supported. They may also be using functionality that is not available for
33+
/// all users of a given platform.
34+
35+
/// @{
36+
37+
// ************************************************************************** //
38+
// * 6DOF Controllers * //
39+
// ************************************************************************** //
40+
41+
/// Configuration for a specific controller
42+
typedef enum {
43+
/// Used when controller configuration is unknown.
44+
GVR_BETA_CONTROLLER_CONFIGURATION_UNKNOWN = 0,
45+
/// 3DOF controller. This controller may have simulated position data.
46+
GVR_BETA_CONTROLLER_CONFIGURATION_3DOF = 1,
47+
/// 6DOF controller.
48+
GVR_BETA_CONTROLLER_CONFIGURATION_6DOF = 2,
49+
} gvr_beta_controller_configuration_type;
50+
51+
/// Tracking state for 6DOF controllers.
52+
typedef enum {
53+
/// Indicates whether the controller's tracking status is unknown.
54+
GVR_BETA_CONTROLLER_TRACKING_STATUS_FLAG_TRACKING_UNKNOWN = (1U << 0),
55+
/// Indicates whether the controller is tracking in full 6DOF mode.
56+
GVR_BETA_CONTROLLER_TRACKING_STATUS_FLAG_TRACKING_NOMINAL = (1U << 1),
57+
/// Indicates whether the controller is occluded. For optically tracked
58+
/// controllers, occlusion happens for a brief time as the user blocks the
59+
/// tracking system with their hand or the other controller. The position of
60+
/// the controller will be clamped to the last known value.
61+
GVR_BETA_CONTROLLER_TRACKING_STATUS_FLAG_OCCLUDED = (1U << 2),
62+
/// Indicates whether the controller is out of field of view of the tracking
63+
/// system. The position of the controller is no longer accurate and should be
64+
/// ignored.
65+
GVR_BETA_CONTROLLER_TRACKING_STATUS_FLAG_OUT_OF_FOV = (1U << 3),
66+
} gvr_beta_controller_tracking_status_flags;
67+
68+
/// Returns the configuration of the given controller.
69+
///
70+
/// @param controller_context Controller API context.
71+
/// @param state The controller to query.
72+
/// @return the current controller configuration of type
73+
/// |gvr_beta_controller_configuration_type|.
74+
int32_t gvr_beta_controller_get_configuration_type(
75+
const gvr_controller_context* controller_context,
76+
const gvr_controller_state* state);
77+
78+
/// Returns the tracking status of the controller. The status is an OR'd
79+
/// combination of GVR_BETA_CONTROLLER_TRACKING_STATUS_FLAG_* flags.
80+
///
81+
/// @param state The controller state to get the tracking status from.
82+
/// @return The set of flags representing the current the tracking status.
83+
int32_t gvr_beta_controller_state_get_tracking_status(
84+
const gvr_controller_state* state);
85+
86+
/// @}
87+
88+
#ifdef __cplusplus
89+
} // extern "C"
90+
#endif
91+
92+
#endif // VR_GVR_CAPI_INCLUDE_GVR_BETA_H_

Diff for: libraries/headers/vr/gvr/capi/include/gvr_controller.h

+21-5
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@ void gvr_controller_state_update(gvr_controller_context* api,
248248
/// neutral position, and a matching forward offset should be applied to the
249249
/// controller position to compensate.
250250
///
251+
/// Note that this method will not generate a simulated position if real
252+
/// position information is available. Clear the GVR_CONTROLLER_ENABLE_POSITION
253+
/// option to discard any real position data and force the arm model on systems
254+
/// with real position data.
255+
///
251256
/// When multiple controllers are configured, this arm model will be applied to
252257
/// the controller at the given controller_index, if one exists.
253258
///
@@ -426,10 +431,17 @@ gvr_vec3f gvr_controller_state_get_accel(const gvr_controller_state* state);
426431
/// @return True iff the user is touching the controller, false otherwise.
427432
bool gvr_controller_state_is_touching(const gvr_controller_state* state);
428433

429-
/// If the user is touching the touchpad, this returns the touch position in
430-
/// normalized coordinates, where (0,0) is the top-left of the touchpad
431-
/// and (1,1) is the bottom right. If the user is not touching the touchpad,
432-
/// then this is the position of the last touch.
434+
/// Returns the normalized coordinates on the touchpad. Each value ranges from
435+
/// [0, 1]. The x value of the touch point aligns with the controller's x-axis,
436+
/// which points to the right of the controller, and the y value aligns with the
437+
/// controller's z-axis. See
438+
/// https://developers.google.com/vr/reference/gvr-ndk-controller#controller_space
439+
/// for more information.
440+
/// This is initially (0, 0) until an event is received.
441+
/// If the user is not touching the touchpad, then this is the position of the
442+
/// last touch.
443+
/// On circular touchpad hardware, the valid touch area will be a 0.5 radius
444+
/// circle centered around (0.5, 0.5).
433445
///
434446
/// @param state The controller state to get the touchpad touch position from.
435447
/// @return The touchpad touch position in normalized coordinates iff the user
@@ -536,7 +548,11 @@ int64_t gvr_controller_state_get_last_touch_timestamp(
536548
int64_t gvr_controller_state_get_last_button_timestamp(
537549
const gvr_controller_state* state);
538550

539-
/// Current (latest) controller simulated position for use with an elbow model.
551+
/// Current (latest) controller position. This may be real position data from
552+
/// the controller if GVR_CONTROLLER_ENABLE_POSITION is used and real data is
553+
/// available, or it may be simulated data if GVR_CONTROLLER_ENABLE_ARM_MODEL
554+
/// and gvr_controller_apply_arm_model() are used. For more information,
555+
/// see gvr_controller_apply_arm_model().
540556
///
541557
/// @param state The controller state to get the latest simulated position from.
542558
/// @return The current controller simulated position (intended for use with an

Diff for: libraries/headers/vr/gvr/capi/include/gvr_types.h

+11-5
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,12 @@ enum {
326326
GVR_CONTROLLER_ENABLE_GESTURES = 1 << 4,
327327
/// Indicates that controller pose prediction should be enabled.
328328
GVR_CONTROLLER_ENABLE_POSE_PREDICTION = 1 << 5,
329-
/// Indicates that controller position data should be reported.
329+
/// Indicates that system should provide real position data if available.
330330
GVR_CONTROLLER_ENABLE_POSITION = 1 << 6,
331331
/// Indicates that controller battery data should be reported.
332332
GVR_CONTROLLER_ENABLE_BATTERY = 1 << 7,
333-
/// Indicates that elbow model should be enabled.
333+
/// Indicates that elbow model should be enabled if the system doesn't provide
334+
/// real position data.
334335
GVR_CONTROLLER_ENABLE_ARM_MODEL = 1 << 8,
335336
};
336337

@@ -380,8 +381,8 @@ typedef enum {
380381
GVR_CONTROLLER_BUTTON_APP = 3,
381382
GVR_CONTROLLER_BUTTON_VOLUME_UP = 4,
382383
GVR_CONTROLLER_BUTTON_VOLUME_DOWN = 5,
383-
GVR_CONTROLLER_BUTTON_RESERVED0 = 6,
384-
GVR_CONTROLLER_BUTTON_RESERVED1 = 7,
384+
GVR_CONTROLLER_BUTTON_TRIGGER = 6,
385+
GVR_CONTROLLER_BUTTON_GRIP = 7,
385386
GVR_CONTROLLER_BUTTON_RESERVED2 = 8,
386387

387388
/// Note: there are 8 buttons on the controller, but the state arrays have
@@ -854,6 +855,12 @@ const ControllerButton kControllerButtonVolumeUp =
854855
static_cast<ControllerButton>(GVR_CONTROLLER_BUTTON_VOLUME_UP);
855856
const ControllerButton kControllerButtonVolumeDown =
856857
static_cast<ControllerButton>(GVR_CONTROLLER_BUTTON_VOLUME_DOWN);
858+
const ControllerButton kControllerButtonTrigger =
859+
static_cast<ControllerButton>(GVR_CONTROLLER_BUTTON_TRIGGER);
860+
const ControllerButton kControllerButtonGrip =
861+
static_cast<ControllerButton>(GVR_CONTROLLER_BUTTON_GRIP);
862+
const ControllerButton kControllerButtonReserved2 =
863+
static_cast<ControllerButton>(GVR_CONTROLLER_BUTTON_RESERVED2);
857864
const ControllerButton kControllerButtonCount =
858865
static_cast<ControllerButton>(GVR_CONTROLLER_BUTTON_COUNT);
859866

@@ -971,7 +978,6 @@ class AudioApi;
971978
class BufferSpec;
972979
class ControllerApi;
973980
class ControllerState;
974-
class Frame;
975981
class GvrApi;
976982
class BufferViewport;
977983
class BufferViewportList;

Diff for: libraries/headers/vr/gvr/capi/include/gvr_version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ extern "C" {
2323
/// A string representation of the current GVR build version. This is of
2424
/// the form "MAJOR.MINOR.PATCH". Note that this may differ from the runtime
2525
/// GVR version as reported by gvr_get_version_string().
26-
#define GVR_SDK_VERSION_STRING "1.170.0"
26+
#define GVR_SDK_VERSION_STRING "1.180.0"
2727

2828
/// Semantic components for the current GVR build version. Note that these
2929
/// values may differ from the runtime GVR version as reported by
3030
/// gvr_get_version().
3131
enum {
3232
GVR_SDK_MAJOR_VERSION = 1,
33-
GVR_SDK_MINOR_VERSION = 170,
33+
GVR_SDK_MINOR_VERSION = 180,
3434
GVR_SDK_PATCH_VERSION = 0,
3535
};
3636

Diff for: libraries/sdk-audio-1.170.0.aar

-1.21 MB
Binary file not shown.

Diff for: libraries/sdk-audio-1.180.0.aar

1.21 MB
Binary file not shown.

Diff for: libraries/sdk-audio-1.170.0.pom renamed to libraries/sdk-audio-1.180.0.pom

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-audio</artifactId>
7-
<version>1.170.0</version>
7+
<version>1.180.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-Audio</name>
@@ -19,7 +19,7 @@
1919
<groupId>com.google.vr</groupId>
2020
<artifactId>sdk-base</artifactId>
2121
<type>aar</type>
22-
<version>1.170.0</version>
22+
<version>1.180.0</version>
2323
</dependency>
2424
</dependencies>
2525
</project>

Diff for: libraries/sdk-base-1.170.0.aar

-2.69 MB
Binary file not shown.

Diff for: libraries/sdk-base-1.180.0.aar

2.81 MB
Binary file not shown.

Diff for: libraries/sdk-base-1.170.0.pom renamed to libraries/sdk-base-1.180.0.pom

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-base</artifactId>
7-
<version>1.170.0</version>
7+
<version>1.180.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-Base</name>
@@ -19,7 +19,7 @@
1919
<groupId>com.google.vr</groupId>
2020
<artifactId>sdk-common</artifactId>
2121
<type>aar</type>
22-
<version>1.170.0</version>
22+
<version>1.180.0</version>
2323
</dependency>
2424
</dependencies>
2525
</project>

Diff for: libraries/sdk-common-1.170.0.aar

-491 KB
Binary file not shown.

Diff for: libraries/sdk-common-1.180.0.aar

507 KB
Binary file not shown.

Diff for: libraries/sdk-common-1.170.0.pom renamed to libraries/sdk-common-1.180.0.pom

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-common</artifactId>
7-
<version>1.170.0</version>
7+
<version>1.180.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-Common</name>

Diff for: libraries/sdk-commonwidget-1.170.0.aar

-31.7 KB
Binary file not shown.

Diff for: libraries/sdk-commonwidget-1.180.0.aar

31.7 KB
Binary file not shown.

Diff for: libraries/sdk-commonwidget-1.170.0.pom renamed to libraries/sdk-commonwidget-1.180.0.pom

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-commonwidget</artifactId>
7-
<version>1.170.0</version>
7+
<version>1.180.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-CommonWidget</name>
@@ -19,7 +19,7 @@
1919
<groupId>com.google.vr</groupId>
2020
<artifactId>sdk-common</artifactId>
2121
<type>aar</type>
22-
<version>1.170.0</version>
22+
<version>1.180.0</version>
2323
</dependency>
2424
</dependencies>
2525
</project>

Diff for: libraries/sdk-controller-1.170.0.aar

-9.72 KB
Binary file not shown.

Diff for: libraries/sdk-controller-1.180.0.aar

10.3 KB
Binary file not shown.

Diff for: libraries/sdk-controller-1.170.0.pom renamed to libraries/sdk-controller-1.180.0.pom

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-controller</artifactId>
7-
<version>1.170.0</version>
7+
<version>1.180.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-Controller</name>
@@ -19,7 +19,7 @@
1919
<groupId>com.google.vr</groupId>
2020
<artifactId>sdk-base</artifactId>
2121
<type>aar</type>
22-
<version>1.170.0</version>
22+
<version>1.180.0</version>
2323
</dependency>
2424
</dependencies>
2525
</project>

Diff for: libraries/sdk-panowidget-1.170.0.aar

-3.28 MB
Binary file not shown.

Diff for: libraries/sdk-panowidget-1.180.0.aar

3.37 MB
Binary file not shown.

Diff for: libraries/sdk-panowidget-1.170.0.pom renamed to libraries/sdk-panowidget-1.180.0.pom

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-panowidget</artifactId>
7-
<version>1.170.0</version>
7+
<version>1.180.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-CommonWidget</name>
@@ -19,7 +19,7 @@
1919
<groupId>com.google.vr</groupId>
2020
<artifactId>sdk-commonwidget</artifactId>
2121
<type>aar</type>
22-
<version>1.170.0</version>
22+
<version>1.180.0</version>
2323
</dependency>
2424
</dependencies>
2525
</project>

Diff for: libraries/sdk-videowidget-1.170.0.aar

-3.44 MB
Binary file not shown.

Diff for: libraries/sdk-videowidget-1.180.0.aar

3.59 MB
Binary file not shown.

Diff for: libraries/sdk-videowidget-1.170.0.pom renamed to libraries/sdk-videowidget-1.180.0.pom

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.google.vr</groupId>
66
<artifactId>sdk-videowidget</artifactId>
7-
<version>1.170.0</version>
7+
<version>1.180.0</version>
88
<packaging>aar</packaging>
99

1010
<name>Google VR SDK-CommonWidget</name>
@@ -32,7 +32,7 @@
3232
<groupId>com.google.vr</groupId>
3333
<artifactId>sdk-commonwidget</artifactId>
3434
<type>aar</type>
35-
<version>1.170.0</version>
35+
<version>1.180.0</version>
3636
</dependency>
3737
</dependencies>
3838
</project>

Diff for: proguard-gvr.txt

+1
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@
3232
}
3333

3434
-dontwarn com.google.protobuf.nano.NanoEnumValue
35+
-dontwarn com.google.common.logging.nano.*

0 commit comments

Comments
 (0)