API reference
API reference
Select your platform
No SDKs available
No versions available

SphereGrabSurface Class

Specifies an entire sphere around an object in which the grip point is valid.
Oculus::Interaction::Grab::GrabSurfaces::SphereGrabSurface extends MonoBehaviour.
Oculus::Interaction::Grab::GrabSurfaces::SphereGrabSurface extends Oculus.Interaction.Grab.GrabSurfaces.IGrabSurface.

Overview

Object Data

Properties

Pose

Public Member Functions

Pose
GetReferencePose
( Transform relativeTo )
The reference pose of the surface.
Vector3
GetCentre
( Transform relativeTo )
The center of the sphere in world coordinates.
void
SetCentre
( Vector3 point,
Transform relativeTo )
float
GetRadius
( Transform relativeTo )
The radius of the sphere, this is automatically calculated as the distance between the center and the original grip pose.
Vector3
GetDirection
( Transform relativeTo )
The direction of the sphere, measured from the center to the original grip position.
Pose
MirrorPose
( in Pose gripPose,
Transform relativeTo )
Method for mirroring a Pose around the surface.
bool
CalculateBestPoseAtSurface
( Ray targetRay,
out Pose bestPose,
Transform relativeTo )
Finds the Pose at the surface that is the closest to the given ray.
CalculateBestPoseAtSurface
( in Pose targetPose,
out Pose bestPose,
in PoseMeasureParameters scoringModifier,
Transform relativeTo )
Finds the Pose at the surface that is the closest to the given pose.
CalculateBestPoseAtSurface
( in Pose targetPose,
in Pose offset,
out Pose bestPose,
in PoseMeasureParameters scoringModifier,
Transform relativeTo )
Finds the Pose at the surface that is the closest to the given pose.
CreateMirroredSurface
( GameObject gameObject )
Creates a new IGrabSurface under the selected gameobject that is a mirror version of the current.
CreateDuplicatedSurface
( GameObject gameObject )
Creates a new IGrabSurface under the selected gameobject with the same data as this one.
void
InjectAllSphereSurface
Transform relativeTo )
void
void
InjectRelativeTo
( Transform relativeTo )

Object Data

void
Reset ( )
void
Start ( )
Vector3
NearestPointInSurface
( Vector3 targetPosition,
Transform relativeTo )
Pose
MinimalRotationPoseAtSurface
( in Pose userPose,
Transform relativeTo )
Pose
MinimalTranslationPoseAtSurface
( in Pose userPose,
Transform relativeTo )
Quaternion
RotationAtPoint
( Vector3 surfacePoint,
Quaternion baseRot,
Quaternion desiredRotation,
Transform relativeTo )

Details

Detailed Description

One of the main advantages of spheres is that the rotation of the hand pose does not really matters, as it will always fit the surface correctly.

Object Data

SphereGrabSurfaceData Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface._data
No description available.

Properties

Pose Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.RelativePose
No description available.

Member Functions

Pose Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.GetReferencePose
( Transform relativeTo )
The reference pose of the surface.
It defines the radius of the sphere as the point from the relative transform to the reference pose to ensure that the sphere covers this pose.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Pose in world space
Vector3 Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.GetCentre
( Transform relativeTo )
The center of the sphere in world coordinates.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Position in world space
void Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.SetCentre
( Vector3 point,
Transform relativeTo )
No description available.
float Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.GetRadius
( Transform relativeTo )
The radius of the sphere, this is automatically calculated as the distance between the center and the original grip pose.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Distance in world space
Vector3 Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.GetDirection
( Transform relativeTo )
The direction of the sphere, measured from the center to the original grip position.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Direction in world space
Pose Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.MirrorPose
( in Pose gripPose,
Transform relativeTo )
Method for mirroring a Pose around the surface.
Different surfaces will prefer mirroring along different axis.
Parameters
gripPose
The Pose to be mirrored.
relativeTo
Reference transform to mirror the pose around
Returns
A new pose mirrored at this surface.
bool Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.CalculateBestPoseAtSurface
( Ray targetRay,
out Pose bestPose,
Transform relativeTo )
Finds the Pose at the surface that is the closest to the given ray.
Parameters
targetRay
Ray searching for the nearest snap pose
bestPose
The best found pose at the surface.
relativeTo
Reference transform to measure the poses against
Returns
True if the pose was found
GrabPoseScore Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.CalculateBestPoseAtSurface
( in Pose targetPose,
out Pose bestPose,
in PoseMeasureParameters scoringModifier,
Transform relativeTo )
Finds the Pose at the surface that is the closest to the given pose.
Parameters
targetPose
The root pose to find the nearest to.
bestPose
The best found pose at the surface.<
scoringModifier
Weight used to decide which target pose to select
relativeTo
Reference transform to measure the poses against
Returns
The score indicating how good the found pose was, -1 for invalid result.
GrabPoseScore Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.CalculateBestPoseAtSurface
( in Pose targetPose,
in Pose offset,
out Pose bestPose,
in PoseMeasureParameters scoringModifier,
Transform relativeTo )
Finds the Pose at the surface that is the closest to the given pose.
Parameters
targetPose
The root pose to find the nearest to.
offset
The offset from the root, for accurate scoring
bestPose
The best found pose at the surface.<
scoringModifier
Weight used to decide which target pose to select
relativeTo
Reference transform to measure the poses against
Returns
The score indicating how good the found pose was, -1 for invalid result.
IGrabSurface Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.CreateMirroredSurface
( GameObject gameObject )
Creates a new IGrabSurface under the selected gameobject that is a mirror version of the current.
Parameters
gameObject
The gameobject in which to place the new IGrabSurface.
Returns
A mirror of this IGrabSurface.
IGrabSurface Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.CreateDuplicatedSurface
( GameObject gameObject )
Creates a new IGrabSurface under the selected gameobject with the same data as this one.
Parameters
gameObject
The gameobject in which to place the new IGrabSurface.
Returns
A clone of this IGrabSurface.
void Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.InjectAllSphereSurface
Transform relativeTo )
No description available.
void Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.InjectData
No description available.
void Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.InjectRelativeTo
( Transform relativeTo )
No description available.

Object Data

virtual void Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.Reset ( )
No description available.
virtual void Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.Start ( )
No description available.
Vector3 Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.NearestPointInSurface
( Vector3 targetPosition,
Transform relativeTo )
No description available.
Pose Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.MinimalRotationPoseAtSurface
( in Pose userPose,
Transform relativeTo )
No description available.
Pose Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.MinimalTranslationPoseAtSurface
( in Pose userPose,
Transform relativeTo )
No description available.
Quaternion Oculus.Interaction.Grab.GrabSurfaces.SphereGrabSurface.RotationAtPoint
( Vector3 surfacePoint,
Quaternion baseRot,
Quaternion desiredRotation,
Transform relativeTo )
No description available.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon