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

ClippedPlaneSurface Class

Extends MonoBehaviour
The primary flat surface used by the Interaction SDK, this is an ISurface constructed by "clipping" a PlaneSurface down to a subsection of itself using one or more IBoundsClippers.
ClippedPlaneSurfaces apply the logical AND of all their contained IBoundsClippers to the underlying PlaneSurface. Because IBoundsClippers are axis-aligned in the space of the plane being clipped, this means all ClippedPlaneSurfaces will be rectangular subsections of the XY plane of the transform of the PlaneSurface they clip. They are not necessarily centered on this transform, however.

Fields

BackingSurface : ISurface
Implementation of ISurfacePatch.BackingSurface; for details, please refer to the related documentation provided for that property.
Signature
ISurface Oculus.Interaction.Surfaces.ClippedPlaneSurface.BackingSurface
Transform : Transform
Implementation of ISurface.Transform; for details, please refer to the related documentation provided for that property.
Signature
Transform Oculus.Interaction.Surfaces.ClippedPlaneSurface.Transform

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.Surfaces.ClippedPlaneSurface.Awake()
Returns
void
Start ()
Signature
virtual void Oculus.Interaction.Surfaces.ClippedPlaneSurface.Start()
Returns
void

Methods

ClipBounds ( bounds , clipped )
Clip a provided Bounds using the ClippedPlaneSurface's IBoundsClippers.
Comparable to applying the logical AND of the input bounds with all the clippers returned by GetClippers.
Signature
bool Oculus.Interaction.Surfaces.ClippedPlaneSurface.ClipBounds(in Bounds bounds, out Bounds clipped)
Parameters
bounds: in Bounds  The Bounds to clip
clipped: out Bounds  The clipped result
Returns
bool  True if resulting bounds are contain any space, false if the clipped bounds have no volume
ClosestSurfacePoint ( point , hit , maxDistance )
Implementation of ISurface.ClosestSurfacePoint(in Vector3, out SurfaceHit, float); for details, please refer to the related documentation provided for that property.
Signature
bool Oculus.Interaction.Surfaces.ClippedPlaneSurface.ClosestSurfacePoint(in Vector3 point, out SurfaceHit hit, float maxDistance=0)
Parameters
point: in Vector3
hit: out SurfaceHit
maxDistance: float
Returns
bool
GetClippers ()
Implementation of IClippedSurface<TClipper>.GetClippers; for details, please refer to the related documentation provided for that property.
Signature
IReadOnlyList<IBoundsClipper> Oculus.Interaction.Surfaces.ClippedPlaneSurface.GetClippers()
Returns
IReadOnlyList< IBoundsClipper >
InjectAllClippedPlaneSurface ( planeSurface , clippers )
Injects all required dependencies for a dynamically instantiated ClippedPlaneSurface; effectively wraps InjectPlaneSurface(PlaneSurface) and InjectClippers(IEnumerable<IBoundsClipper>).
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Surfaces.ClippedPlaneSurface.InjectAllClippedPlaneSurface(PlaneSurface planeSurface, IEnumerable< IBoundsClipper > clippers)
Parameters
planeSurface: PlaneSurface
clippers: IEnumerable< IBoundsClipper >
Returns
void
InjectClippers ( clippers )
Sets the IBoundsClippers for a dynamically instantiated ClippedPlaneSurface.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Surfaces.ClippedPlaneSurface.InjectClippers(IEnumerable< IBoundsClipper > clippers)
Parameters
clippers: IEnumerable< IBoundsClipper >
Returns
void
InjectPlaneSurface ( planeSurface )
Sets the underlying PlaneSurface for a dynamically instantiated ClippedPlaneSurface.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Surfaces.ClippedPlaneSurface.InjectPlaneSurface(PlaneSurface planeSurface)
Parameters
planeSurface: PlaneSurface
Returns
void
Raycast ( ray , hit , maxDistance )
Implementation of ISurface.Raycast(in Ray, out SurfaceHit, float); for details, please refer to the related documentation provided for that property.
Signature
bool Oculus.Interaction.Surfaces.ClippedPlaneSurface.Raycast(in Ray ray, out SurfaceHit hit, float maxDistance=0)
Parameters
ray: in Ray
hit: out SurfaceHit
maxDistance: float
Returns
bool