A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/vr/reference/unity/class/GvrHeadset below:

GvrHeadset Class Reference | Google VR

Skip to main content

Stay organized with collections Save and categorize content based on your preferences.

GvrHeadset

Main entry point for Standalone headset APIs.

Summary

To use this API, use the GvrHeadset prefab. There can be only one such prefab in a scene, since this is a singleton object.

Inheritance

Inherits from: MonoBehaviour

Direct Known Subclasses:

GoogleVR.Beta.GvrBetaHeadset Public functions OnRecenterEvent(GvrRecenterEventType recenterType, GvrRecenterFlags recenterFlags, Vector3 recenteredPosition, Quaternion recenteredOrientation)

delegate void

This delegate is called after the headset is recentered.

OnSafetyRegionEvent(bool enter)

delegate void

This delegate is called when the headset crosses the safety region boundary.

Public static functions TryGetFloorHeight(ref float floorHeight)

bool

Populates floorHeight with the detected height, if one is available.

TryGetRecenterTransform(ref Vector3 position, ref Quaternion rotation)

bool

Populates position and rotation with the last recenter transform, if one is available.

TryGetSafetyCylinderInnerRadius(ref float innerRadius)

bool

Populates innerRadius with the safety cylinder inner radius, if one is available.

TryGetSafetyCylinderOuterRadius(ref float outerRadius)

bool

Populates outerRadius with the safety cylinder outer radius, if one is available.

TryGetSafetyRegionType(ref GvrSafetyRegionType safetyType)

bool

Populates safetyType with the safety region type, if one is available.

Properties OnRecenter
static OnRecenterEvent OnRecenter

Event handlers for OnRecenter.

Triggered when a recenter command has been issued by the user.

OnSafetyRegionChange
static OnSafetyRegionEvent OnSafetyRegionChange

Event handlers for OnSafetyRegionChange.

Triggered when the safety region has been entered or exited.

ProvidesEditorEmulator
bool ProvidesEditorEmulator

Gets a value indicating whether this headset provides an Editor Emulator.

Value true if this headset provides an Editor Emulator, or false otherwise.

SupportsPositionalTracking
static bool SupportsPositionalTracking

Gets a value indicating whether this headset supports 6DoF positional tracking.

Value true if this headset supports 6DoF positional tracking, or false if only 3DoF rotation-based head tracking is supported.

Protected functions GvrHeadset
 GvrHeadset()

Initializes a new instance of the GvrHeadset class.

Public functions OnRecenterEvent
delegate void OnRecenterEvent(
  GvrRecenterEventType recenterType,
  GvrRecenterFlags recenterFlags,
  Vector3 recenteredPosition,
  Quaternion recenteredOrientation
)

This delegate is called after the headset is recentered.

Details Parameters recenterType

Indicates the reason recentering occurred.

recenterFlags

Flags related to recentering. See |GvrRecenterFlags|.

recenteredPosition

The positional offset from the session start pose.

recenteredOrientation

The rotational offset from the session start pose.

OnSafetyRegionEvent
delegate void OnSafetyRegionEvent(
  bool enter
)

This delegate is called when the headset crosses the safety region boundary.

Details Parameters enter

Set to true if the safety region is being entered, or false if the safety region is being exited.

Public static functions TryGetFloorHeight
bool TryGetFloorHeight(
  ref float floorHeight
)

Populates floorHeight with the detected height, if one is available.

This may be unavailable if the underlying GVR API call fails.

Details Parameters floorHeight

If this call returns true, this value is set to the retrieved floorHeight. Otherwise leaves the value unchanged.

Returns

Returns true if value retrieval was successful, false otherwise (depends on tracking state).

TryGetRecenterTransform
bool TryGetRecenterTransform(
  ref Vector3 position,
  ref Quaternion rotation
)

Populates position and rotation with the last recenter transform, if one is available.

This may be unavailable if the underlying GVR API call fails.

Details Parameters position

If this call returns true, this value is set to the retrieved position.

rotation

If this call returns true, this value is set to the retrieved rotation.

Returns

Returns true if value retrieval was successful, false otherwise.

TryGetSafetyCylinderInnerRadius
bool TryGetSafetyCylinderInnerRadius(
  ref float innerRadius
)

Populates innerRadius with the safety cylinder inner radius, if one is available.

This is the radius at which safety management (e.g. safety fog) may cease taking effect.

If the safety region is of type GvrSafetyRegionType.Cylinder, populates innerRadius with the inner radius size of the safety cylinder in meters. Before using, confirm that the safety region type is GvrSafetyRegionType.Cylinder. This may be unavailable if the underlying GVR API call fails.

Details Parameters innerRadius

If this call returns true, this value is set to the retrieved innerRadius.

Returns

Returns true if value retrieval was successful, false otherwise.

TryGetSafetyCylinderOuterRadius
bool TryGetSafetyCylinderOuterRadius(
  ref float outerRadius
)

Populates outerRadius with the safety cylinder outer radius, if one is available.

If the safety region is of type GvrSafetyRegionType.Cylinder, populates outerRadius with the outer radius size of the safety cylinder in meters. Before using, confirm that the safety region type is GvrSafetyRegionType.Cylinder. This may be unavailable if the underlying GVR API call fails.

This is the radius at which safety management (e.g. safety fog) may start to take effect.

Details Parameters outerRadius

If this call returns true, this value is set to the retrieved outerRadius.

Returns

Returns true if value retrieval was successful, false otherwise.

TryGetSafetyRegionType
bool TryGetSafetyRegionType(
  ref GvrSafetyRegionType safetyType
)

Populates safetyType with the safety region type, if one is available.

Populates safetyType with the available safety region feature on the currently-running device. This may be unavailable if the underlying GVR API call fails.

Details Parameters safetyType

If this call returns true, this value is set to the retrieved safetyType.

Returns

Returns true if value retrieval was successful, false otherwise.

All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-10-09 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["`GvrHeadset` is the primary entry point for Standalone headset APIs and should be used as a prefab within a Unity scene."],["It provides access to headset features like positional tracking, recentering, and safety regions."],["Developers can leverage events like `OnRecenter` and `OnSafetyRegionChange` to respond to user interactions and safety boundaries."],["Static functions such as `TryGetFloorHeight` and `TryGetSafetyCylinderInnerRadius` allow retrieval of headset-specific data."],["Only one `GvrHeadset` prefab is permitted in a scene due to its singleton nature."]]],["The `GvrHeadset` API, a singleton object, is the main entry point for standalone headset APIs. Key actions include handling `OnRecenter` and `OnSafetyRegionChange` events. It supports querying positional tracking via `SupportsPositionalTracking` and provides an editor emulator. It provides public static functions to retrieve the floor height (`TryGetFloorHeight`), recenter transform (`TryGetRecenterTransform`), and safety cylinder radii (`TryGetSafetyCylinderInnerRadius`, `TryGetSafetyCylinderOuterRadius`), and region type (`TryGetSafetyRegionType`). This API also defines delegates for recentering and safety region events.\n"]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4