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

BoxGrabSurface Class

This GrabSurface defines a Rectangle around which the grip point is valid.
Oculus::Interaction::Grab::GrabSurfaces::BoxGrabSurface extends MonoBehaviour.
Oculus::Interaction::Grab::GrabSurfaces::BoxGrabSurface extends Oculus.Interaction.Grab.GrabSurfaces.IGrabSurface.

Overview

Object Data

Properties

Pose

Public Member Functions

Pose
GetReferencePose
( Transform relativeTo )
The origin pose of the surface.
float
GetWidthOffset
( Transform relativeTo )
The lateral displacement of the grip point in the main side.
void
SetWidthOffset
( float widthOffset,
Transform relativeTo )
Vector4
GetSnapOffset
( Transform relativeTo )
The range at which the sides are constrained.
void
SetSnapOffset
( Vector4 snapOffset,
Transform relativeTo )
Vector3
GetSize
( Transform relativeTo )
The size of the rectangle.
void
SetSize
( Vector3 size,
Transform relativeTo )
Quaternion
GetRotation
( Transform relativeTo )
The rotation of the rectangle from the Grip point.
void
SetRotation
( Quaternion rotation,
Transform relativeTo )
Vector3
GetDirection
( Transform relativeTo )
The forward direction of the rectangle (based on its rotation)
Pose
MirrorPose
( in Pose gripPose,
Transform relativeTo )
Method for mirroring a Pose around the surface.
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.
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.
bool
CalculateBestPoseAtSurface
( Ray targetRay,
out Pose bestPose,
Transform relativeTo )
Finds the Pose at the surface that is the closest to the given ray.
void
InjectAllBoxSurface
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 )

Details

Detailed Description

Since the grip point might be offset from the fingers, a valid range for each opposite side of the rectangle can be set so the grabbing fingers are constrained to the object bounds.

Object Data

BoxGrabSurfaceData Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface._data
No description available.

Properties

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

Member Functions

Pose Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.GetReferencePose
( Transform relativeTo )
The origin pose of the surface.
This is the point from which the base of the box must start.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Pose in world space
float Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.GetWidthOffset
( Transform relativeTo )
The lateral displacement of the grip point in the main side.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Lateral displacement in world space
void Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.SetWidthOffset
( float widthOffset,
Transform relativeTo )
No description available.
Vector4 Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.GetSnapOffset
( Transform relativeTo )
The range at which the sides are constrained.
X,Y for the back and forward sides range. Z,W for the left and right sides range.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Offsets in world space
void Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.SetSnapOffset
( Vector4 snapOffset,
Transform relativeTo )
No description available.
Vector3 Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.GetSize
( Transform relativeTo )
The size of the rectangle.
Y is ignored.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Size in world space
void Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.SetSize
( Vector3 size,
Transform relativeTo )
No description available.
Quaternion Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.GetRotation
( Transform relativeTo )
The rotation of the rectangle from the Grip point.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Rotation in world space
void Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.SetRotation
( Quaternion rotation,
Transform relativeTo )
No description available.
Vector3 Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.GetDirection
( Transform relativeTo )
The forward direction of the rectangle (based on its rotation)
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Direction in world space
Pose Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.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.
IGrabSurface Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.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.BoxGrabSurface.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.
GrabPoseScore Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.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.BoxGrabSurface.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.
bool Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.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
void Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.InjectAllBoxSurface
Transform relativeTo )
No description available.
void Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.InjectData
No description available.
void Oculus.Interaction.Grab.GrabSurfaces.BoxGrabSurface.InjectRelativeTo
( Transform relativeTo )
No description available.

Object Data

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