fun fireSensorMatrixChanged(oldSensorMatrix: SensorMatrix?, sensorMatrix: SensorMatrix?) { requireNotNull(oldSensorMatrix) { "oldSensorMatrix must not be null" } requireNotNull(sensorMatrix) { "sensorMatrix must not be null" } val listeners: Array<Any> = listenerList.getListenerList() var event: VisionWorldModelEvent? = null var i = listeners.size - 2 while (i >= 0) { if (listeners[i] === VisionWorldModelListener::class.java) { if (event == null) { event = VisionWorldModelEvent(source, oldSensorMatrix, sensorMatrix) } (listeners[i + 1] as VisionWorldModelListener).sensorMatrixChanged(event) } i -= 2 } }
Fire a sensor matrix changed event to all registered vision world model listeners .