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

CylinderGrabSurface Class

This type of surface defines a cylinder in which the grip pose is valid around an object.
Oculus::Interaction::Grab::GrabSurfaces::CylinderGrabSurface extends MonoBehaviour.
Oculus::Interaction::Grab::GrabSurfaces::CylinderGrabSurface extends Oculus.Interaction.Grab.GrabSurfaces.IGrabSurface.

Overview

Object Data

Properties

Pose
float
Degrees from the starting radius from which the arc section starts.
float
The maximum angle for the surface of the cylinder, starting from the ArcOffset.
Vector3
The direction of the main radius of the cylinder.
Vector3
The direction of the central axis of the cylinder in local space.

Public Member Functions

Pose
GetReferencePose
( Transform relativeTo )
The reference pose of the surface.
Vector3
GetPerpendicularDir
( Transform relativeTo )
Direction from the axis of the cylinder to the original grip position.
Vector3
GetStartArcDir
( Transform relativeTo )
Direction from the axis of the cylinder to the minimum angle allowance.
Vector3
GetEndArcDir
( Transform relativeTo )
Direction from the axis of the cylinder to the maximum angle allowance.
Vector3
GetStartPoint
( Transform relativeTo )
Base cap of the cylinder, in world coordinates.
void
SetStartPoint
( Vector3 point,
Transform relativeTo )
Vector3
GetEndPoint
( Transform relativeTo )
End cap of the cylinder, in world coordinates.
void
SetEndPoint
( Vector3 point,
Transform relativeTo )
float
GetRadius
( Transform relativeTo )
The generated radius of the cylinder.
Vector3
GetDirection
( Transform relativeTo )
Direction of the cylinder, from the start cap to the end cap.
Pose
MirrorPose
( in Pose gripPose,
Transform relativeTo )
Method for mirroring a Pose around the surface.
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.
bool
CalculateBestPoseAtSurface
( Ray targetRay,
out Pose bestPose,
Transform relativeTo )
Finds the Pose at the surface that is the closest to the given ray.
void
InjectAllCylinderSurface
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
CalculateRotationOffset
( Vector3 surfacePoint,
Transform relativeTo )

Details

Detailed Description

An angle and offset can be used to constrain the cylinder and not use a full circle. The radius is automatically specified as the distance from the axis of the cylinder to the original grip position.

Object Data

CylinderSurfaceData Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface._data
No description available.

Properties

Pose Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.RelativePose
No description available.
float Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.ArcOffset
Degrees from the starting radius from which the arc section starts.
float Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.ArcLength
The maximum angle for the surface of the cylinder, starting from the ArcOffset.
To invert the direction of the angle, swap the caps order.
Vector3 Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.LocalPerpendicularDir
The direction of the main radius of the cylinder.
This is the radius from the center of the cylinder to the reference position.
Vector3 Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.LocalDirection
The direction of the central axis of the cylinder in local space.

Member Functions

Pose Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.GetReferencePose
( Transform relativeTo )
The reference pose of the surface.
It defines the radius of the cylinder as the point from the relative transform to the reference pose to ensure that the cylinder covers this pose.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Pose in world space
Vector3 Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.GetPerpendicularDir
( Transform relativeTo )
Direction from the axis of the cylinder to the original grip position.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Direction in world space
Vector3 Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.GetStartArcDir
( Transform relativeTo )
Direction from the axis of the cylinder to the minimum angle allowance.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Direction in world space
Vector3 Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.GetEndArcDir
( Transform relativeTo )
Direction from the axis of the cylinder to the maximum angle allowance.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Direction in world space
Vector3 Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.GetStartPoint
( Transform relativeTo )
Base cap of the cylinder, in world coordinates.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Position in world space
void Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.SetStartPoint
( Vector3 point,
Transform relativeTo )
No description available.
Vector3 Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.GetEndPoint
( Transform relativeTo )
End cap of the cylinder, in world coordinates.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Position in world space
void Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.SetEndPoint
( Vector3 point,
Transform relativeTo )
No description available.
float Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.GetRadius
( Transform relativeTo )
The generated radius of the cylinder.
Represents the distance from the axis of the cylinder to the original grip position.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Distance in world space
Vector3 Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.GetDirection
( Transform relativeTo )
Direction of the cylinder, from the start cap to the end cap.
Parameters
relativeTo
The reference transform to apply the surface to
Returns
Direction in world space
Pose Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.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.
GrabPoseScore Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.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.CylinderGrabSurface.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.CylinderGrabSurface.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.CylinderGrabSurface.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.
bool Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.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.CylinderGrabSurface.InjectAllCylinderSurface
Transform relativeTo )
No description available.
void Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.InjectData
No description available.
void Oculus.Interaction.Grab.GrabSurfaces.CylinderGrabSurface.InjectRelativeTo
( Transform relativeTo )
No description available.

Object Data

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