Touch Sensing Operator
Quick Facts
| Property | Value |
|---|---|
| Class | CENPyOlpTouchSensingOperator |
| Module | cenpylib.CENPyOlpTouchSensingOperator |
| Package | cenpylib |
| Release | R2025.2.4 |
| Methods | 9 |
Quick Start
# Boilerplate Example
touchSensingOperator = ... # obtained from the runtime context
result = touchSensingOperator.GetCollisionPoint(0)Method Index
| Method | Returns | Summary |
|---|---|---|
GetCollisionPoint | CENPyOlpMatrix | Get collision point matrix. |
GetStartPoint | CENPyOlpMatrix | Get start point matrix. |
GetEndPoint | CENPyOlpMatrix | Get end point matrix. |
GetReferencePoint | CENPyOlpMatrix | Get reference point matrix. |
SetTouchStartDistance | — | Set touch start distance. |
SetTouchEndDistance | — | Set touch end distance |
TouchPointCompute | — | Compute touch point. |
GetTouchLocationType | int | Calculate touch point near PG start or end. |
GetLastTouchDir | int | Get last touch direction. |
Query Methods
GetCollisionPoint
def GetCollisionPoint(frame: int) -> CENPyOlpMatrixGet collision point matrix.
Parameters:
| Name | Type | Description |
|---|---|---|
frame | int | Touch direction along Normal (0) or BaseFrame (1). |
Returns: CENPyOlpMatrix — Collision point matrix.
GetStartPoint
def GetStartPoint(frame: int) -> CENPyOlpMatrixGet start point matrix.
Parameters:
| Name | Type | Description |
|---|---|---|
frame | int | Touch direction along Normal (0) or BaseFrame (1). |
Returns: CENPyOlpMatrix — Start point matrix.
GetEndPoint
def GetEndPoint(frame: int) -> CENPyOlpMatrixGet end point matrix.
Parameters:
| Name | Type | Description |
|---|---|---|
frame | int | Touch direction along Normal (0) or BaseFrame (1). |
Returns: CENPyOlpMatrix — End point matrix.
GetReferencePoint
def GetReferencePoint() -> CENPyOlpMatrixGet reference point matrix.
Returns: CENPyOlpMatrix — Reference point matrix.
GetTouchLocationType
def GetTouchLocationType() -> intCalculate touch point near PG start or end.
Returns: int — Touch location type: AtStart (1) or AtEnd (2).
GetLastTouchDir
def GetLastTouchDir() -> intGet last touch direction.
Returns: int — BaseFrame touch axis: Undefined (0), XMinus (1), XPlus (2), YMinus (3), YPlus (4), ZMinus (5), ZPlus (6).
Mutation Methods
SetTouchStartDistance
def SetTouchStartDistance(startDist: float)Set touch start distance.
Parameters:
| Name | Type | Description |
|---|---|---|
startDist | float | Offset reference point in direction of the surface normal. |
SetTouchEndDistance
def SetTouchEndDistance(endDist: float)Set touch end distance
Parameters:
| Name | Type | Description |
|---|---|---|
endDist | float | Offset reference point in minus direction of the surface normal |
Conversion & Serialization
TouchPointCompute
def TouchPointCompute()Compute touch point.
Related Types
Version Notes
This class is documented as of release R2025.2.4.
Was this page helpful?