Java Code Examples for processing.core.PApplet#arrayCopy()
The following examples show how to use
processing.core.PApplet#arrayCopy() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PShape.java From CPE552-Java with GNU General Public License v3.0 | 6 votes |
protected void setPath(int vcount, float[][] verts, int ccount, int[] codes) { if (verts == null || verts.length < vcount) return; if (0 < ccount && (codes == null || codes.length < ccount)) return; int ndim = verts[0].length; vertexCount = vcount; vertices = new float[vertexCount][ndim]; for (int i = 0; i < vertexCount; i++) { PApplet.arrayCopy(verts[i], vertices[i]); } vertexCodeCount = ccount; if (0 < vertexCodeCount) { vertexCodes = new int[vertexCodeCount]; PApplet.arrayCopy(codes, vertexCodes, vertexCodeCount); } }
Example 2
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get Long Exposure Infrared Image as PImage 512 x 424 * * @return PImage */ public PImage getInfraredLongExposureImage() { int[] longExposureData = jniGetInfraredLongExposure(); PApplet.arrayCopy(longExposureData, 0, infraredLongExposureImg.pixels(), 0, infraredLongExposureImg.getImgSize()); infraredLongExposureImg.updatePixels(); return infraredLongExposureImg.img; }
Example 3
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get Long Exposure Infrared Image as PImage 512 x 424 * * @return PImage */ public PImage getInfraredLongExposureImage() { int[] longExposureData = jniGetInfraredLongExposure(); PApplet.arrayCopy(longExposureData, 0, infraredLongExposureImg.pixels(), 0, infraredLongExposureImg.getImgSize()); infraredLongExposureImg.updatePixels(); return infraredLongExposureImg.img; }
Example 4
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get Independent Body Index Track * * @param index * @return */ public ArrayList getBodyTrackUser() { ArrayList<PImage> listBodyTack = new ArrayList<PImage>(0); int [] usersIds = jniGetBodyTrackIds(); for(int i = 0; i < usersIds.length; i++){ if( usersIds[i] == 1){ int[] rawData = jniGetBodyIndexUser(i); PApplet.arrayCopy(rawData, 0, bodyTrackUsersImg[i].pixels(), 0, bodyTrackUsersImg[i].getImgSize()); bodyTrackUsersImg[i].updatePixels(); listBodyTack.add(bodyTrackUsersImg[i].img); } } return listBodyTack; }
Example 5
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get BodyTracking as PImage 512 x 424 * * @return PImage */ public PImage getBodyTrackImage() { int[] bodyTrackData = jniGetBodyTrack(); PApplet.arrayCopy(bodyTrackData, 0, bodyTrackImg.pixels(), 0, bodyTrackImg.getImgSize()); bodyTrackImg.updatePixels(); return bodyTrackImg.img; }
Example 6
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get InfraredImage as PImage 512 x 424 * * @return PImage */ public PImage getInfraredImage() { int[] infraredData = jniGetInfraredData(); PApplet.arrayCopy(infraredData, 0, infraredImg.pixels(), 0, infraredImg.getImgSize()); infraredImg.updatePixels(); return infraredImg.img; }
Example 7
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get Depth Mask Image, outline color of the users. * * @return PImage */ public PImage getDepthMaskImage() { int[] depthMaskData = jniGetDepthMask(); PApplet.arrayCopy(depthMaskData, 0, depthMaskImg.pixels(), 0, depthMaskImg.getImgSize()); depthMaskImg.updatePixels(); // jniDepthReadyCopy(true); return depthMaskImg.img; }
Example 8
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get Depth 256 strip data 512 x 424 * @return PImage */ public PImage getDepth256Image() { int[] depth256Data = jniGetDepth256Data(); PApplet.arrayCopy(depth256Data, 0, depth256Img.pixels(), 0, depth256Img.getImgSize()); depth256Img.updatePixels(); // jniDepthReadyCopy(true); return depth256Img.img; }
Example 9
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get Depth Image as PImage 512 x 424 * * @return PImage */ public PImage getDepthImage() { int [] depthData = jniGetDepth16Data(); PApplet.arrayCopy(depthData, 0, depthImg.pixels(), 0, depthImg.getImgSize()); depthImg.updatePixels(); return depthImg.img; }
Example 10
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get Color Image as PImage 1920 x 1080 * * @return PImage */ public PImage getColorImage() { int[] colorData = jniGetColorData(); PApplet.arrayCopy(colorData, 0, colorImg.pixels(), 0, colorImg.getImgSize()); colorImg.updatePixels(); PApplet.arrayCopy(colorData, 0, colorImg.rawIntData, 0, colorImg.getImgSize()); return colorImg.img; }
Example 11
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get Point cloud Depth Image * @return PImage */ public PImage getPointCloudDepthImage() { int[] rawData = jniGetPointCloudDepthImage(); PApplet.arrayCopy(rawData, 0, pointCloudDepthImg.pixels(), 0, pointCloudDepthImg.getImgSize()); pointCloudDepthImg.updatePixels(); return pointCloudDepthImg.img; }
Example 12
Source File: PShape.java From CPE552-Java with GNU General Public License v3.0 | 5 votes |
public float[] getParams(float[] target) { if (target == null || target.length != params.length) { target = new float[params.length]; } PApplet.arrayCopy(params, target); return target; }
Example 13
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get Independent Body Index Track * * @param index * @return */ public ArrayList getBodyTrackUser() { ArrayList<PImage> listBodyTack = new ArrayList<PImage>(0); int [] usersIds = jniGetBodyTrackIds(); for(int i = 0; i < usersIds.length; i++){ if( usersIds[i] == 1){ int[] rawData = jniGetBodyIndexUser(i); PApplet.arrayCopy(rawData, 0, bodyTrackUsersImg[i].pixels(), 0, bodyTrackUsersImg[i].getImgSize()); bodyTrackUsersImg[i].updatePixels(); listBodyTack.add(bodyTrackUsersImg[i].img); } } return listBodyTack; }
Example 14
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get BodyTracking as PImage 512 x 424 * * @return PImage */ public PImage getBodyTrackImage() { int[] bodyTrackData = jniGetBodyTrack(); PApplet.arrayCopy(bodyTrackData, 0, bodyTrackImg.pixels(), 0, bodyTrackImg.getImgSize()); bodyTrackImg.updatePixels(); return bodyTrackImg.img; }
Example 15
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get InfraredImage as PImage 512 x 424 * * @return PImage */ public PImage getInfraredImage() { int[] infraredData = jniGetInfraredData(); PApplet.arrayCopy(infraredData, 0, infraredImg.pixels(), 0, infraredImg.getImgSize()); infraredImg.updatePixels(); return infraredImg.img; }
Example 16
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get Depth Mask Image, outline color of the users. * * @return PImage */ public PImage getDepthMaskImage() { int[] depthMaskData = jniGetDepthMask(); PApplet.arrayCopy(depthMaskData, 0, depthMaskImg.pixels(), 0, depthMaskImg.getImgSize()); depthMaskImg.updatePixels(); // jniDepthReadyCopy(true); return depthMaskImg.img; }
Example 17
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get Point cloud Depth Image * @return PImage */ public PImage getPointCloudDepthImage() { int[] rawData = jniGetPointCloudDepthImage(); PApplet.arrayCopy(rawData, 0, pointCloudDepthImg.pixels(), 0, pointCloudDepthImg.getImgSize()); pointCloudDepthImg.updatePixels(); return pointCloudDepthImg.img; }
Example 18
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get Depth Image as PImage 512 x 424 * * @return PImage */ public PImage getDepthImage() { int [] depthData = jniGetDepth16Data(); PApplet.arrayCopy(depthData, 0, depthImg.pixels(), 0, depthImg.getImgSize()); depthImg.updatePixels(); return depthImg.img; }
Example 19
Source File: Device.java From KinectPV2 with MIT License | 5 votes |
/** * Get Color Image as PImage 1920 x 1080 * * @return PImage */ public PImage getColorImage() { int[] colorData = jniGetColorData(); PApplet.arrayCopy(colorData, 0, colorImg.pixels(), 0, colorImg.getImgSize()); colorImg.updatePixels(); PApplet.arrayCopy(colorData, 0, colorImg.rawIntData, 0, colorImg.getImgSize()); return colorImg.img; }
Example 20
Source File: PShape.java From CPE552-Java with GNU General Public License v3.0 | 5 votes |
protected void setParams(float[] source) { if (params == null) { params = new float[source.length]; } if (source.length != params.length) { PGraphics.showWarning("Wrong number of parameters"); return; } PApplet.arrayCopy(source, params); }