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

A Check to determine whether a point fits inside a line segment. More...

Inheritance diagram for Gestures.LineCheck:
Gestures.Check

Public Member Functions

 LineCheck (Vector3 firstPosition, Vector3 secondPosition, float tolerance=0.4f)
 Create a Line Check used to determine whether a point fits inside the defined line segment. More...
 
override float CheckPasses (GTransform g)
 Determine whether a single GTransform fits inside the area defined by the line segment More...
 

Detailed Description

A Check to determine whether a point fits inside a line segment.

Constructor & Destructor Documentation

Gestures.LineCheck.LineCheck ( Vector3  firstPosition,
Vector3  secondPosition,
float  tolerance = 0.4f 
)
inline

Create a Line Check used to determine whether a point fits inside the defined line segment.

Parameters
firstPositionThe first point of the line segment.
secondPositionThe second point of the line segment.
toleranceDistance from the line considered to be on the line.

Member Function Documentation

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

Determine whether a single GTransform fits inside the area defined by the line segment

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

Implements Gestures.Check.


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