public class TablePosUtilities
extends java.lang.Object
Constructor and Description |
---|
TablePosUtilities() |
Modifier and Type | Method and Description |
---|---|
static void |
addPivot(IStage stage,
float originSize)
Adds the pivot.
|
static float |
angleBetweenLines(ILine firstLine,
ILine secondLine)
Angle between lines.
|
static void |
displayResults(IStage stage,
float tableX,
float tableY,
float tableO,
TablePosApp app)
Display results.
|
static void |
generatePrompt(java.lang.String message,
IStage stage,
int currentLoop,
int loops)
Generate prompt.
|
static float |
getAverageOfAngles(float[] range)
Gets the average of angles.
|
static float |
getAverageOfAngles(float[] range,
int rangeToCheck)
Gets the average of angles.
|
static boolean |
isWithinXDegreesOf(float range,
float average,
float value)
Checks if is within x degrees of.
|
static void |
writeToLog(java.lang.String logAddress,
java.util.Date startTime,
float lineToBAngle,
float lineToAAngle,
float S,
float T,
float R,
float A,
float B,
float d,
float actualLineToAAngle,
float actualLineToBAngle,
float actualS,
float actualT,
float actualR,
float actualA,
float actualB,
float actuald,
float actualTableX,
float actualTableY,
float actualTableO,
float referenceDistance,
int loops,
java.util.Date[] firstTouch,
java.util.Date[] changeOver,
java.util.Date[] lastTouch,
int[] orientationTouchCount,
int[] positioningTouchCount,
float[] lineToAAngleArray,
float[] lineToBAngleArray,
float[] SArray,
float[] TArray,
float[] RArray,
float[] AArray,
float[] BArray,
float[] tableOArray,
float[] XArray,
float[] YArray,
float[] dArray,
float tableX,
float tableY,
float tableO,
java.util.ArrayList<java.lang.String> redoLog)
Write to log.
|
public static void addPivot(IStage stage, float originSize) throws ContentTypeNotBoundException
stage
- the stageoriginSize
- the origin sizeContentTypeNotBoundException
- the content type not bound exceptionpublic static float angleBetweenLines(ILine firstLine, ILine secondLine)
firstLine
- the first linesecondLine
- the second linepublic static void displayResults(IStage stage, float tableX, float tableY, float tableO, TablePosApp app)
stage
- the stagetableX
- the table xtableY
- the table ytableO
- the table oapp
- the apppublic static void generatePrompt(java.lang.String message, IStage stage, int currentLoop, int loops) throws ContentTypeNotBoundException
message
- the messagestage
- the stagecurrentLoop
- the current looploops
- the loopsContentTypeNotBoundException
- the content type not bound exceptionpublic static float getAverageOfAngles(float[] range)
range
- the rangepublic static float getAverageOfAngles(float[] range, int rangeToCheck)
range
- the rangerangeToCheck
- the range to checkpublic static boolean isWithinXDegreesOf(float range, float average, float value)
range
- the rangeaverage
- the averagevalue
- the valuepublic static void writeToLog(java.lang.String logAddress, java.util.Date startTime, float lineToBAngle, float lineToAAngle, float S, float T, float R, float A, float B, float d, float actualLineToAAngle, float actualLineToBAngle, float actualS, float actualT, float actualR, float actualA, float actualB, float actuald, float actualTableX, float actualTableY, float actualTableO, float referenceDistance, int loops, java.util.Date[] firstTouch, java.util.Date[] changeOver, java.util.Date[] lastTouch, int[] orientationTouchCount, int[] positioningTouchCount, float[] lineToAAngleArray, float[] lineToBAngleArray, float[] SArray, float[] TArray, float[] RArray, float[] AArray, float[] BArray, float[] tableOArray, float[] XArray, float[] YArray, float[] dArray, float tableX, float tableY, float tableO, java.util.ArrayList<java.lang.String> redoLog)
logAddress
- the log addressstartTime
- the start timelineToBAngle
- the line to b anglelineToAAngle
- the line to a angleS
- the sT
- the tR
- the rA
- the aB
- the bd
- the dactualLineToAAngle
- the actual line to a angleactualLineToBAngle
- the actual line to b angleactualS
- the actual sactualT
- the actual tactualR
- the actual ractualA
- the actual aactualB
- the actual bactuald
- the actualdactualTableX
- the actual table xactualTableY
- the actual table yactualTableO
- the actual table oreferenceDistance
- the reference distanceloops
- the loopsfirstTouch
- the first touchchangeOver
- the change overlastTouch
- the last touchorientationTouchCount
- the orientation touch countpositioningTouchCount
- the positioning touch countlineToAAngleArray
- the line to a angle arraylineToBAngleArray
- the line to b angle arraySArray
- the s arrayTArray
- the t arrayRArray
- the r arrayAArray
- the a arrayBArray
- the b arraytableOArray
- the table o arrayXArray
- the x arrayYArray
- the y arraydArray
- the d arraytableX
- the table xtableY
- the table ytableO
- the table oredoLog
- the redo log