A RetroSearch Logo

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

Search Query:

Showing content from https://developers.google.com/ar/reference/java/com/google/ar/core/HitResult below:

HitResult | ARCore | Google for Developers

HitResult

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

Defines an intersection between a ray and estimated real-world geometry.

Public Methods Anchor boolean equals(Object obj)

Indicates whether some other object is a HitResult referencing the same logical hit result as this one.

float getDistance()

Returns the distance from the camera to the hit location, in meters.

Pose getHitPose()

Returns the pose of the intersection between a ray and detected real-world geometry.

Trackable int hashCode()

Returns a hash code value for the object.

Inherited Methods From class java.lang.Object Object

clone()

boolean void

finalize()

final Class<?>

getClass()

int

hashCode()

final void

notify()

final void

notifyAll()

String

toString()

final void

wait(long arg0, int arg1)

final void

wait(long arg0)

final void

wait()

Public Methods public Anchor createAnchor () createAnchor
public Anchor createAnchor()

Creates a new anchor at the hit location. See getHitPose() for details.

Anchors incur ongoing processing overhead within ARCore. To release unneeded anchors use Anchor.detach().

This method is a convenience alias for hitResult.getTrackable().createAnchor(hitResult.getHitPose())

public boolean equals (Object obj) equals
public boolean equals(
  Object obj
)

Indicates whether some other object is a HitResult referencing the same logical hit result as this one.

Details Parameters obj the reference object with which to compare. Returns true if this object is the same as the obj argument; false otherwise. See Also public float getDistance () getDistance
public float getDistance()

Returns the distance from the camera to the hit location, in meters.

public Pose getHitPose () getHitPose
public Pose getHitPose()

Returns the pose of the intersection between a ray and detected real-world geometry. The position is the location in space where the ray intersected the geometry. The orientation is a best effort to face the ray origin, and its exact definition differs depending on the Trackable that was hit.

Plane: X+ is perpendicular to the cast ray and parallel to the plane, Y+ points along the plane normal (up, for Plane.Type.HORIZONTAL_UPWARD_FACING planes), and Z+ is parallel to the plane, pointing roughly toward the ray origin.

Point: Attempt to estimate the normal of the surface centered around the hit test. Surface normal estimation is most likely to succeed on textured surfaces and with camera motion. If Point.getOrientationMode() returns Point.OrientationMode.ESTIMATED_SURFACE_NORMAL, then X+ is perpendicular to the cast ray and parallel to the physical surface centered around the hit test, Y+ points along the estimated surface normal, and Z+ points roughly toward the ray origin. If Point.getOrientationMode() returns Point.OrientationMode.INITIALIZED_TO_IDENTITY, then X+ is perpendicular to the cast ray and points right from the perspective of the ray origin, Y+ points up, and Z+ points roughly toward the ray origin.

If you wish to retain the location of this pose beyond the duration of a single frame, create an Anchor using createAnchor() to save the pose in a physically consistent way.

public Trackable getTrackable () getTrackable
public Trackable getTrackable()

Returns the Trackable that was hit.

public int hashCode () hashCode
public int hashCode()

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by HashMap.

Details Returns a hash code value for this object. See Also

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-10-31 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-31 UTC."],[[["`HitResult` defines the intersection point between a ray and real-world geometry estimated by ARCore."],["It provides methods to get the 3D pose of the hit, the distance to the hit, and the `Trackable` object that was hit."],["You can create an `Anchor` at the hit location using `createAnchor()` to persist the pose."],["`HitResult` provides details about the intersection, such as distance and pose, for use in AR applications."]]],[]]


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