<commit_before># This file is part of NIT (http://www.nitlanguage.org).
#
# 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.

# Services from the Google Cardboard SDK for virtual reality on Android
#
# Projects using this module should keep the `cardboard.jar` archive in the
# `libs` folder at the root of the project.
#
# External resources:
# * Download `cardboard.jar` from
# https://raw.githubusercontent.com/googlesamples/cardboard-java/master/CardboardSample/libs/cardboard.jar
# * Read about Cardboard at
# https://developers.google.com/cardboard/
# * Find the Cardboard SDK documentation at
# https://developers.google.com/cardboard/android/latest/reference/com/google/vrtoolkit/cardboard/package-summary
module cardboard

import java::collections
import native_app_glue

in "Java" `{
	import com.google.vrtoolkit.cardboard.CardboardActivity;
	import com.google.vrtoolkit.cardboard.sensors.HeadTracker;
`}

# Provides head tracking information from the device IMU
#
# The corresponding Java class is no longer documented, but it is still useful.
extern class NativeHeadTracker in "Java" `{ com.google.vrtoolkit.cardboard.sensors.HeadTracker `}
	super JavaObject

	# Instantiate a new `NativeHeadTracker` for the given `context`
	new (context: NativeContext) in "Java" `{
		return HeadTracker.createFromContext(context);
	`}

	# Start tracking head movement
	fun start_tracking in "Java" `{ self.startTracking(); `}

	# Stop tracking head movement
	fun stop_tracking in "Java" `{ self.stopTracking(); `}

	# Apply correction to the gyroscope values
	fun gyro_bias=(matrix: JavaFloatArray) in "Java" `{
		self.setGyroBias(matrix);
	`}
<commit_msg>lib/android/cardboard: remove `gyro_bias` as it no more available in the SDK<commit_after># This file is part of NIT (http://www.nitlanguage.org).
#
# 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.

# Services from the Google Cardboard SDK for virtual reality on Android
#
# Projects using this module should keep the `cardboard.jar` archive in the
# `libs` folder at the root of the project.
#
# External resources:
# * Download `cardboard.jar` from
# https://raw.githubusercontent.com/googlesamples/cardboard-java/master/CardboardSample/libs/cardboard.jar
# * Read about Cardboard at
# https://developers.google.com/cardboard/
# * Find the Cardboard SDK documentation at
# https://developers.google.com/cardboard/android/latest/reference/com/google/vrtoolkit/cardboard/package-summary
module cardboard

import java::collections
import native_app_glue

in "Java" `{
	import com.google.vrtoolkit.cardboard.CardboardActivity;
	import com.google.vrtoolkit.cardboard.sensors.HeadTracker;
`}

# Provides head tracking information from the device IMU
#
# The corresponding Java class is no longer documented, but it is still useful.
extern class NativeHeadTracker in "Java" `{ com.google.vrtoolkit.cardboard.sensors.HeadTracker `}
	super JavaObject

	# Instantiate a new `NativeHeadTracker` for the given `context`
	new (context: NativeContext) in "Java" `{
		return HeadTracker.createFromContext(context);
	`}

	# Start tracking head movement
	fun start_tracking in "Java" `{ self.startTracking(); `}

	# Stop tracking head movement
	fun stop_tracking in "Java" `{ self.stopTracking(); `}

{'fraction_non_alphanumeric': 0.09144752428334518, 'fraction_numerical': 0.0018952854773750297, 'mean_word_length': 4.888423988842399, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7188545', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1184, 'n_words': 438}