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

CircleSurface Class

Extends MonoBehaviour, ISurfacePatch
Used for interaction with circular surfaces.
Computes the closest world point on a coordinate plane defined by the X and Y axes of the transform, within a provided radius from the transform’s origin.

Properties

A 3D transform associated with the surface.
This transform defines a space which serves as a consistent frame of reference for operations involving the surface, which is particular important for surfaces which can move. For example, consider the screen of a virtual tablet which can be held and manipulated, but also touched and poked. Even as the tablet moves through space, poke interactions on its screen should be calculated from the screen's perspective, not from the world's perspective: if a finger is held still and the tablet moved forward to touch it, from the tablet's perspective the finger moved to the screen, and thus the interaction is a poke. This transform provides the frame of reference that facilitates these sorts of calculations.
The backing surface for this ISurfacePatch.
Used correctly, this backing surface is a strict geometric superset of the space defined by ISurfacePatch itself. In other words, for every spatial query against the ISurfacePatch for which a solution exists (a raycast that hits the surface, for example), that same solution should be a valid solution to the same query for the BackingSurface; however, there may exist spatial queries for which the ISurfacePatch has no solution, but a solution exists for the BackingSurface.

Protected Functions

virtual void Start ( )

Member Functions

Raycast to the surface with an optional maximum distance value.
The arguments and outputs of this operation are in world space.
Parameters
ray
The ray to cast, with position and direction both defined in world space
hit
The returned hit data in world space if the raycast hit the surface, default otherwise
maxDistance
If greater than zero, maximum distance of raycast; if zero, distance is unconstrained
Returns
True if the raycast hit the surface, false otherwise
Find the nearest point to the surface.
The arguments and outputs of this operation are in world space.
Parameters
point
The point, in world space, for which the nearest point on the surface must be found
hit
The returned hit data in world space if a nearest point could be found, default otherwise
maxDistance
If greater than zero, maximum distance of check; if zero distance is unconstrained
Returns
True if the racyast hit the surface, false otherwise
void InjectAllCircleProximityField
( PlaneSurface planeSurface )
void InjectAllCircleSurface
( PlaneSurface planeSurface )
void InjectPlaneSurface
( PlaneSurface planeSurface )
void InjectOptionalRadius
( float radius )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon