Package com.aparapi.examples.effects
Class Main.MouseTrackKernel
java.lang.Object
com.aparapi.Kernel
com.aparapi.examples.effects.Main.MouseTrackKernel
- All Implemented Interfaces:
Cloneable
- Enclosing class:
- Main
public static class Main.MouseTrackKernel
extends com.aparapi.Kernel
An Aparapi Kernel implementation for tracking the mouse position and coloring each pixel of a window depending on proximity to the mouse position.
- Author:
- gfrost
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MouseTrackKernel(int _width, int _height, int[] _rgb, int[] _pallette, float[] _trailx, float[] _traily)
Initialize the Kernel. -
Method Summary
Modifier and Type Method Description void
run()
Methods inherited from class com.aparapi.Kernel
addExecutionModes, cancelMultiPass, cleanUpArrays, clone, dispose, execute, execute, execute, execute, execute, execute, executeFallbackAlgorithm, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getAccumulatedExecutionTime, getAccumulatedExecutionTimeAllThreads, getAccumulatedExecutionTimeCurrentThread, getCancelState, getConversionTime, getCurrentPass, getExecutionMode, getExecutionTime, getKernelState, getMappedMethodName, getProfileInfo, getProfileReportCurrentThread, getProfileReportLastThread, getTargetDevice, hasFallbackAlgorithm, hasNextExecutionMode, invalidateCaches, isAllowDevice, isAutoCleanUpArrays, isExecuting, isExplicit, isMappedMethod, isOpenCLDelegateMethod, isRunningCL, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, registerProfileReportObserver, setAutoCleanUpArrays, setExecutionMode, setExecutionModeWithoutFallback, setExplicit, setFallbackExecutionMode, toString, tryNextExecutionMode, usesAtomic32, usesAtomic64
-
Constructor Details
-
MouseTrackKernel
public MouseTrackKernel(int _width, int _height, int[] _rgb, int[] _pallette, float[] _trailx, float[] _traily)Initialize the Kernel.- Parameters:
_width
- image width_height
- image height_rgb
- image RGB buffer_pallette
- image palette_trailx
- float array holding x ordinates for mouse trail positions_traily
- float array holding y ordinates for mouse trail positions
-
-
Method Details
-
run
public void run()- Specified by:
run
in classcom.aparapi.Kernel
-