The object of the CENPyOlpTouchSensingOperator class can be obtain withing the CENPyOlpEvent_EventComputeOperator
that is passed to the PostCompute callback in the %EVENT_NAME%.py script file.
[Example]
def PostCompute(Operator):
tsOperator = Operator.GetTouchSensingOperator()
|
|
Touch direction along Normal (0) or BaseFrame (1).
|
|
|
Collision point matrix.
|
Get collision point matrix.
[Example]
matrix = tsOperator.GetCollisionPoint(1)
|
|
Touch direction along Normal (0) or BaseFrame (1).
|
|
|
Start point matrix.
|
Get start point matrix.
[Example]
matrix = tsOperator.GetStartPoint(1)
|
|
Touch direction along Normal (0) or BaseFrame (1).
|
|
|
End point matrix.
|
Get end point matrix.
[Example]
matrix = tsOperator.GetEndPoint(1)
Get reference point matrix.
[Example]
matrix = tsOperator.GetReferencePoint()
•
|
SetTouchStartDistance(startDist: float)
|
|
|
Offset reference point in direction of the surface normal.
|
Set touch start distance.
[Example]
tsOperator.SetTouchStartDistance(0.2)
•
|
SetTouchEndDistance(endDist: float)
|
|
|
Offset reference point in minus direction of the surface normal.
|
Set touch end distance.
[Example]
tsOperator.SetTouchEndDistance(0.1)
Compute touch point.
[Example]
tsOperator.TouchPointCompute()
•
|
GetTouchLocationType(): int
|
|
|
Touch location type: AtStart (1) or AtEnd (2).
|
Calculate touch point near PG start or end.
[Example]
locationType = tsOperator.GetTouchLocationType()
|
|
BaseFrame touch axis: Undefined (0), XMinus (1), XPlus (2), YMinus (3), YPlus (4), ZMinus (5), ZPlus (6).
|
Get last touch direction.
[Example]
lastTouchDir = tsOperator.GetLastTouchDir()
|