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

Commit

Permalink
GVR SDK Android v1.180.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nvictornvictor committed Nov 19, 2018
1 parent f841407 commit 25a0c20
Show file tree
Hide file tree
Showing 77 changed files with 31,116 additions and 66 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

Enables Daydream and Cardboard app development on Android.

Copyright (c) 2016 Google Inc. All rights reserved.
Copyright (c) 2018 Google Inc.

See [https://developers.google.com/terms/](https://developers.google.com/terms/)
for the **Google APIs Terms of Service** which cover this SDK. The code in
`samples` is covered by the Apache 2 `LICENSE` file in that directory, and the
files in `assets` are covered by Creative Commons `LICENSE` file in that
directory.

For updates, known issues, and upgrade instructions, see the
[release-notes](//github.com/googlevr/gvr-android-sdk/releases).
Expand Down
Binary file modified apks/controller_emulator.apk
Binary file not shown.
Binary file added assets/6dof_controller/dd6dof_controller.fbx
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

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

The **6dof_controller** directory contains a model of the Daydream 6DOF
Controller.

The **panoramas** directory contains sample 360 images. See the javadoc for
**sdk-simplepanowidget**'s **SimpleVrPanoramaActivity** class for information on
how to view these videos.
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ task clean(type: Delete) {
// The dependencies for NDK builds live inside the .aar files so they need to
// be extracted before NDK targets can build.
task extractAudioSo(type: Copy) {
from zipTree("${project.rootDir}/libraries/sdk-audio-1.170.0.aar")
from zipTree("${project.rootDir}/libraries/sdk-audio-1.180.0.aar")
into "${project.rootDir}/libraries/"
include "jni/**/libgvr_audio.so"
}

task extractGvrSo(type: Copy) {
from zipTree("${project.rootDir}/libraries/sdk-base-1.170.0.aar")
from zipTree("${project.rootDir}/libraries/sdk-base-1.180.0.aar")
into "${project.rootDir}/libraries/"
include "jni/**/libgvr.so"
}
Expand Down
92 changes: 92 additions & 0 deletions libraries/headers/vr/gvr/capi/include/gvr_beta.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/* Copyright 2018 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef VR_GVR_CAPI_INCLUDE_GVR_BETA_H_
#define VR_GVR_CAPI_INCLUDE_GVR_BETA_H_

#include "vr/gvr/capi/include/gvr_types.h"

#ifdef __cplusplus
extern "C" {
#endif

/// @defgroup Beta GVR Beta APIs
///
/// @brief These are experimental APIs that are likely to change between
/// releases.
///
/// This file contains functions that are part of the Daydream Labs APIs. These
/// APIs are public, but there is no guarantee about how long they will be
/// supported. They may also be using functionality that is not available for
/// all users of a given platform.

/// @{

// ************************************************************************** //
// * 6DOF Controllers * //
// ************************************************************************** //

/// Configuration for a specific controller
typedef enum {
/// Used when controller configuration is unknown.
GVR_BETA_CONTROLLER_CONFIGURATION_UNKNOWN = 0,
/// 3DOF controller. This controller may have simulated position data.
GVR_BETA_CONTROLLER_CONFIGURATION_3DOF = 1,
/// 6DOF controller.
GVR_BETA_CONTROLLER_CONFIGURATION_6DOF = 2,
} gvr_beta_controller_configuration_type;

/// Tracking state for 6DOF controllers.
typedef enum {
/// Indicates whether the controller's tracking status is unknown.
GVR_BETA_CONTROLLER_TRACKING_STATUS_FLAG_TRACKING_UNKNOWN = (1U << 0),
/// Indicates whether the controller is tracking in full 6DOF mode.
GVR_BETA_CONTROLLER_TRACKING_STATUS_FLAG_TRACKING_NOMINAL = (1U << 1),
/// Indicates whether the controller is occluded. For optically tracked
/// controllers, occlusion happens for a brief time as the user blocks the
/// tracking system with their hand or the other controller. The position of
/// the controller will be clamped to the last known value.
GVR_BETA_CONTROLLER_TRACKING_STATUS_FLAG_OCCLUDED = (1U << 2),
/// Indicates whether the controller is out of field of view of the tracking
/// system. The position of the controller is no longer accurate and should be
/// ignored.
GVR_BETA_CONTROLLER_TRACKING_STATUS_FLAG_OUT_OF_FOV = (1U << 3),
} gvr_beta_controller_tracking_status_flags;

/// Returns the configuration of the given controller.
///
/// @param controller_context Controller API context.
/// @param state The controller to query.
/// @return the current controller configuration of type
/// |gvr_beta_controller_configuration_type|.
int32_t gvr_beta_controller_get_configuration_type(
const gvr_controller_context* controller_context,
const gvr_controller_state* state);

/// Returns the tracking status of the controller. The status is an OR'd
/// combination of GVR_BETA_CONTROLLER_TRACKING_STATUS_FLAG_* flags.
///
/// @param state The controller state to get the tracking status from.
/// @return The set of flags representing the current the tracking status.
int32_t gvr_beta_controller_state_get_tracking_status(
const gvr_controller_state* state);

/// @}

#ifdef __cplusplus
} // extern "C"
#endif

#endif // VR_GVR_CAPI_INCLUDE_GVR_BETA_H_
26 changes: 21 additions & 5 deletions libraries/headers/vr/gvr/capi/include/gvr_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ void gvr_controller_state_update(gvr_controller_context* api,
/// neutral position, and a matching forward offset should be applied to the
/// controller position to compensate.
///
/// Note that this method will not generate a simulated position if real
/// position information is available. Clear the GVR_CONTROLLER_ENABLE_POSITION
/// option to discard any real position data and force the arm model on systems
/// with real position data.
///
/// When multiple controllers are configured, this arm model will be applied to
/// the controller at the given controller_index, if one exists.
///
Expand Down Expand Up @@ -426,10 +431,17 @@ gvr_vec3f gvr_controller_state_get_accel(const gvr_controller_state* state);
/// @return True iff the user is touching the controller, false otherwise.
bool gvr_controller_state_is_touching(const gvr_controller_state* state);

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

/// Current (latest) controller simulated position for use with an elbow model.
/// Current (latest) controller position. This may be real position data from
/// the controller if GVR_CONTROLLER_ENABLE_POSITION is used and real data is
/// available, or it may be simulated data if GVR_CONTROLLER_ENABLE_ARM_MODEL
/// and gvr_controller_apply_arm_model() are used. For more information,
/// see gvr_controller_apply_arm_model().
///
/// @param state The controller state to get the latest simulated position from.
/// @return The current controller simulated position (intended for use with an
Expand Down
16 changes: 11 additions & 5 deletions libraries/headers/vr/gvr/capi/include/gvr_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,12 @@ enum {
GVR_CONTROLLER_ENABLE_GESTURES = 1 << 4,
/// Indicates that controller pose prediction should be enabled.
GVR_CONTROLLER_ENABLE_POSE_PREDICTION = 1 << 5,
/// Indicates that controller position data should be reported.
/// Indicates that system should provide real position data if available.
GVR_CONTROLLER_ENABLE_POSITION = 1 << 6,
/// Indicates that controller battery data should be reported.
GVR_CONTROLLER_ENABLE_BATTERY = 1 << 7,
/// Indicates that elbow model should be enabled.
/// Indicates that elbow model should be enabled if the system doesn't provide
/// real position data.
GVR_CONTROLLER_ENABLE_ARM_MODEL = 1 << 8,
};

Expand Down Expand Up @@ -380,8 +381,8 @@ typedef enum {
GVR_CONTROLLER_BUTTON_APP = 3,
GVR_CONTROLLER_BUTTON_VOLUME_UP = 4,
GVR_CONTROLLER_BUTTON_VOLUME_DOWN = 5,
GVR_CONTROLLER_BUTTON_RESERVED0 = 6,
GVR_CONTROLLER_BUTTON_RESERVED1 = 7,
GVR_CONTROLLER_BUTTON_TRIGGER = 6,
GVR_CONTROLLER_BUTTON_GRIP = 7,
GVR_CONTROLLER_BUTTON_RESERVED2 = 8,

/// Note: there are 8 buttons on the controller, but the state arrays have
Expand Down Expand Up @@ -854,6 +855,12 @@ const ControllerButton kControllerButtonVolumeUp =
static_cast<ControllerButton>(GVR_CONTROLLER_BUTTON_VOLUME_UP);
const ControllerButton kControllerButtonVolumeDown =
static_cast<ControllerButton>(GVR_CONTROLLER_BUTTON_VOLUME_DOWN);
const ControllerButton kControllerButtonTrigger =
static_cast<ControllerButton>(GVR_CONTROLLER_BUTTON_TRIGGER);
const ControllerButton kControllerButtonGrip =
static_cast<ControllerButton>(GVR_CONTROLLER_BUTTON_GRIP);
const ControllerButton kControllerButtonReserved2 =
static_cast<ControllerButton>(GVR_CONTROLLER_BUTTON_RESERVED2);
const ControllerButton kControllerButtonCount =
static_cast<ControllerButton>(GVR_CONTROLLER_BUTTON_COUNT);

Expand Down Expand Up @@ -971,7 +978,6 @@ class AudioApi;
class BufferSpec;
class ControllerApi;
class ControllerState;
class Frame;
class GvrApi;
class BufferViewport;
class BufferViewportList;
Expand Down
4 changes: 2 additions & 2 deletions libraries/headers/vr/gvr/capi/include/gvr_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ extern "C" {
/// A string representation of the current GVR build version. This is of
/// the form "MAJOR.MINOR.PATCH". Note that this may differ from the runtime
/// GVR version as reported by gvr_get_version_string().
#define GVR_SDK_VERSION_STRING "1.170.0"
#define GVR_SDK_VERSION_STRING "1.180.0"

/// Semantic components for the current GVR build version. Note that these
/// values may differ from the runtime GVR version as reported by
/// gvr_get_version().
enum {
GVR_SDK_MAJOR_VERSION = 1,
GVR_SDK_MINOR_VERSION = 170,
GVR_SDK_MINOR_VERSION = 180,
GVR_SDK_PATCH_VERSION = 0,
};

Expand Down
Binary file removed libraries/sdk-audio-1.170.0.aar
Binary file not shown.
Binary file added libraries/sdk-audio-1.180.0.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-audio</artifactId>
<version>1.170.0</version>
<version>1.180.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-Audio</name>
Expand All @@ -19,7 +19,7 @@
<groupId>com.google.vr</groupId>
<artifactId>sdk-base</artifactId>
<type>aar</type>
<version>1.170.0</version>
<version>1.180.0</version>
</dependency>
</dependencies>
</project>
Binary file removed libraries/sdk-base-1.170.0.aar
Binary file not shown.
Binary file added libraries/sdk-base-1.180.0.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-base</artifactId>
<version>1.170.0</version>
<version>1.180.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-Base</name>
Expand All @@ -19,7 +19,7 @@
<groupId>com.google.vr</groupId>
<artifactId>sdk-common</artifactId>
<type>aar</type>
<version>1.170.0</version>
<version>1.180.0</version>
</dependency>
</dependencies>
</project>
Binary file removed libraries/sdk-common-1.170.0.aar
Binary file not shown.
Binary file added libraries/sdk-common-1.180.0.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-common</artifactId>
<version>1.170.0</version>
<version>1.180.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-Common</name>
Expand Down
Binary file removed libraries/sdk-commonwidget-1.170.0.aar
Binary file not shown.
Binary file added libraries/sdk-commonwidget-1.180.0.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-commonwidget</artifactId>
<version>1.170.0</version>
<version>1.180.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-CommonWidget</name>
Expand All @@ -19,7 +19,7 @@
<groupId>com.google.vr</groupId>
<artifactId>sdk-common</artifactId>
<type>aar</type>
<version>1.170.0</version>
<version>1.180.0</version>
</dependency>
</dependencies>
</project>
Binary file removed libraries/sdk-controller-1.170.0.aar
Binary file not shown.
Binary file added libraries/sdk-controller-1.180.0.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-controller</artifactId>
<version>1.170.0</version>
<version>1.180.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-Controller</name>
Expand All @@ -19,7 +19,7 @@
<groupId>com.google.vr</groupId>
<artifactId>sdk-base</artifactId>
<type>aar</type>
<version>1.170.0</version>
<version>1.180.0</version>
</dependency>
</dependencies>
</project>
Binary file removed libraries/sdk-panowidget-1.170.0.aar
Binary file not shown.
Binary file added libraries/sdk-panowidget-1.180.0.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-panowidget</artifactId>
<version>1.170.0</version>
<version>1.180.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-CommonWidget</name>
Expand All @@ -19,7 +19,7 @@
<groupId>com.google.vr</groupId>
<artifactId>sdk-commonwidget</artifactId>
<type>aar</type>
<version>1.170.0</version>
<version>1.180.0</version>
</dependency>
</dependencies>
</project>
Binary file removed libraries/sdk-videowidget-1.170.0.aar
Binary file not shown.
Binary file added libraries/sdk-videowidget-1.180.0.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.google.vr</groupId>
<artifactId>sdk-videowidget</artifactId>
<version>1.170.0</version>
<version>1.180.0</version>
<packaging>aar</packaging>

<name>Google VR SDK-CommonWidget</name>
Expand Down Expand Up @@ -32,7 +32,7 @@
<groupId>com.google.vr</groupId>
<artifactId>sdk-commonwidget</artifactId>
<type>aar</type>
<version>1.170.0</version>
<version>1.180.0</version>
</dependency>
</dependencies>
</project>
1 change: 1 addition & 0 deletions proguard-gvr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@
}

-dontwarn com.google.protobuf.nano.NanoEnumValue
-dontwarn com.google.common.logging.nano.*
Loading

0 comments on commit 25a0c20

Please sign in to comment.