API reference

PlaneSurface Class

Extends MonoBehaviour

Fields

Transform : Transform
Signature
Transform Oculus.Interaction.Surfaces.PlaneSurface.Transform

Properties

Bounds : Bounds
[Get]
Signature
Bounds Oculus.Interaction.Surfaces.PlaneSurface.Bounds
DoubleSided : bool
[Get][Set]
Signature
bool Oculus.Interaction.Surfaces.PlaneSurface.DoubleSided
Facing : NormalFacing
[Get][Set]
Signature
NormalFacing Oculus.Interaction.Surfaces.PlaneSurface.Facing
Normal : Vector3
[Get]
Signature
Vector3 Oculus.Interaction.Surfaces.PlaneSurface.Normal

Methods

ClosestSurfacePoint ( point , hit , maxDistance )
Find the nearest point to the surface.
The arguments and outputs of this operation are in world space.
Signature
bool Oculus.Interaction.Surfaces.PlaneSurface.ClosestSurfacePoint(in Vector3 point, out SurfaceHit hit, float maxDistance)
Parameters
point: in Vector3  The point, in world space, for which the nearest point on the surface must be found
hit: out SurfaceHit  The returned hit data in world space if a nearest point could be found, default otherwise
maxDistance: float  If greater than zero, maximum distance of check; if zero distance is unconstrained
Returns
bool  True if the racyast hit the surface, false otherwise
GetPlane ()
Signature
Plane Oculus.Interaction.Surfaces.PlaneSurface.GetPlane()
Returns
Plane
InjectAllPlaneSurface ( facing , doubleSided )
Signature
void Oculus.Interaction.Surfaces.PlaneSurface.InjectAllPlaneSurface(NormalFacing facing, bool doubleSided)
Parameters
facing: NormalFacing
doubleSided: bool
Returns
void
InjectDoubleSided ( doubleSided )
Signature
void Oculus.Interaction.Surfaces.PlaneSurface.InjectDoubleSided(bool doubleSided)
Parameters
doubleSided: bool
Returns
void
InjectNormalFacing ( facing )
Signature
void Oculus.Interaction.Surfaces.PlaneSurface.InjectNormalFacing(NormalFacing facing)
Parameters
facing: NormalFacing
Returns
void
Raycast ( ray , hit , maxDistance )
Raycast to the surface with an optional maximum distance value.
The arguments and outputs of this operation are in world space.
Signature
bool Oculus.Interaction.Surfaces.PlaneSurface.Raycast(in Ray ray, out SurfaceHit hit, float maxDistance)
Parameters
ray: in Ray  The ray to cast, with position and direction both defined in world space
hit: out SurfaceHit  The returned hit data in world space if the raycast hit the surface, default otherwise
maxDistance: float  If greater than zero, maximum distance of raycast; if zero, distance is unconstrained
Returns
bool  True if the raycast hit the surface, false otherwise

Inner Enum

NormalFacing Enum

Used for interaction with flat surfaces, and acts in much the same way as Unity’s Plane.

Enumeration Constants

MemberDescription
Backward
Normal faces along the transform's negative Z axis
Forward
Normal faces along the transform's positive Z axis