OSVR
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
Public Types | Public Member Functions | List of all members
Gestures.ArcCheck Class Reference

A Check to determine whether a point fits inside an Arc. More...

Inheritance diagram for Gestures.ArcCheck:
Gestures.Check

Public Types

enum  ARC_ORIENTATION { ARC_ORIENTATION.XY, ARC_ORIENTATION.YZ, ARC_ORIENTATION.XZ }
 Enum describing the orientation of the Arc along the three axes. More...
 

Public Member Functions

 ArcCheck (Vector3 startPosition, float degrees, Vector3 center, float tolerance=0.4f, ARC_ORIENTATION orientation=ARC_ORIENTATION.XY)
 Create an Arc Check used to determine whether a point fits inside the defined Arc. More...
 
override float CheckPasses (GTransform g)
 Determine whether a single GTransform fits inside the area defined by the Arc More...
 

Detailed Description

A Check to determine whether a point fits inside an Arc.

Member Enumeration Documentation

Enum describing the orientation of the Arc along the three axes.

Enumerator
XY 
YZ 

Arc orientation is in the XY-plane

XZ 

Arc orientation is in the YZ-plane

Constructor & Destructor Documentation

Gestures.ArcCheck.ArcCheck ( Vector3  startPosition,
float  degrees,
Vector3  center,
float  tolerance = 0.4f,
ARC_ORIENTATION  orientation = ARC_ORIENTATION.XY 
)
inline

Create an Arc Check used to determine whether a point fits inside the defined Arc.

Parameters
startPositionThe starting position of the arc.
degreesNumber of degrees to extent. MUST be between -90 and 90 degrees, otherwise unpredictable consequences occur.
centerThe center point of circle on which the Arc lies.
toleranceThe distance tolerance from which a point can be considered within the arc
orientationARC_ORIENTATION enum, specifying which plane the arc resides in

Member Function Documentation

override float Gestures.ArcCheck.CheckPasses ( GTransform  g)
inlinevirtual

Determine whether a single GTransform fits inside the area defined by the Arc

Parameters
gGTransform to check position against
Returns
Returns a float (between 0 and 1) representing the distance from the center of the arc, or -1 if the check fails

Implements Gestures.Check.


The documentation for this class was generated from the following file: