public static MatOfPoint3f fromNativeAddr(long addr) { return new MatOfPoint3f(addr); }
public void fromArray(Point3...a) { if(a==null || a.length==0) return; int num = a.length; alloc(num); float buff[] = new float[num * _channels]; for(int i=0; i<num; i++) { Point3 p = a[i]; buff[_channels*i+0] = (float) p.x; buff[_channels*i+1] = (float) p.y; buff[_channels*i+2] = (float) p.z; } put(0, 0, buff); //TODO: check ret val! }
protected MatOfPoint3f(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? }
public Point3[] toArray() { int num = (int) total(); Point3[] ap = new Point3[num]; if(num == 0) return ap; float buff[] = new float[num * _channels]; get(0, 0, buff); //TODO: check ret val! for(int i=0; i<num; i++) ap[i] = new Point3(buff[i*_channels], buff[i*_channels+1], buff[i*_channels+2]); return ap; }
public MatOfPoint3f(Point3...a) { super(); fromArray(a); }
public List<Point3> toList() { Point3[] ap = toArray(); return Arrays.asList(ap); } }
public Point3[] toArray() { int num = (int) total(); Point3[] ap = new Point3[num]; if(num == 0) return ap; float buff[] = new float[num * _channels]; get(0, 0, buff); //TODO: check ret val! for(int i=0; i<num; i++) ap[i] = new Point3(buff[i*_channels], buff[i*_channels+1], buff[i*_channels+2]); return ap; }
public MatOfPoint3f(Point3...a) { super(); fromArray(a); }
public List<Point3> toList() { Point3[] ap = toArray(); return Arrays.asList(ap); } }
public void fromArray(Point3...a) { if(a==null || a.length==0) return; int num = a.length; alloc(num); float buff[] = new float[num * _channels]; for(int i=0; i<num; i++) { Point3 p = a[i]; buff[_channels*i+0] = (float) p.x; buff[_channels*i+1] = (float) p.y; buff[_channels*i+2] = (float) p.z; } put(0, 0, buff); //TODO: check ret val! }
protected MatOfPoint3f(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? }
public Point3[] toArray() { int num = (int) total(); Point3[] ap = new Point3[num]; if(num == 0) return ap; float buff[] = new float[num * _channels]; get(0, 0, buff); //TODO: check ret val! for(int i=0; i<num; i++) ap[i] = new Point3(buff[i*_channels], buff[i*_channels+1], buff[i*_channels+2]); return ap; }
public static MatOfPoint3f fromNativeAddr(long addr) { return new MatOfPoint3f(addr); }
public MatOfPoint3f(Point3...a) { super(); fromArray(a); }
public List<Point3> toList() { Point3[] ap = toArray(); return Arrays.asList(ap); } }
public void fromArray(Point3...a) { if(a==null || a.length==0) return; int num = a.length; alloc(num); float buff[] = new float[num * _channels]; for(int i=0; i<num; i++) { Point3 p = a[i]; buff[_channels*i+0] = (float) p.x; buff[_channels*i+1] = (float) p.y; buff[_channels*i+2] = (float) p.z; } put(0, 0, buff); //TODO: check ret val! }
protected MatOfPoint3f(long addr) { super(addr); if( !empty() && checkVector(_channels, _depth) < 0 ) throw new IllegalArgumentException("Incompatible Mat"); //FIXME: do we need release() here? }
public Point3[] toArray() { int num = (int) total(); Point3[] ap = new Point3[num]; if(num == 0) return ap; float buff[] = new float[num * _channels]; get(0, 0, buff); //TODO: check ret val! for(int i=0; i<num; i++) ap[i] = new Point3(buff[i*_channels], buff[i*_channels+1], buff[i*_channels+2]); return ap; }
public static MatOfPoint3f fromNativeAddr(long addr) { return new MatOfPoint3f(addr); }
public MatOfPoint3f(Point3...a) { super(); fromArray(a); }