本文整理汇总了Java中processing.core.PMatrix3D.get方法的典型用法代码示例。如果您正苦于以下问题:Java PMatrix3D.get方法的具体用法?Java PMatrix3D.get怎么用?Java PMatrix3D.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类processing.core.PMatrix3D
的用法示例。
在下文中一共展示了PMatrix3D.get方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CreatePlaneCalibrationFrom
import processing.core.PMatrix3D; //导入方法依赖的package包/类
/**
* Get a plane from a 3D matrix.
* Here the size is not that important, might be removed.
* @param mat
* @param size
* @return
*/
public static PlaneCalibration CreatePlaneCalibrationFrom(PMatrix3D mat, PVector size) {
PMatrix3D matrix = mat.get();
PlaneCreator planeCreator = new PlaneCreator();
planeCreator.addPoint(new Vec3D(matrix.m03, matrix.m13, matrix.m23));
matrix.translate(size.x, 0, 0);
planeCreator.addPoint(new Vec3D(matrix.m03, matrix.m13, matrix.m23));
matrix.translate(0, size.y, 0);
planeCreator.addPoint(new Vec3D(matrix.m03, matrix.m13, matrix.m23));
planeCreator.setHeight(DEFAULT_PLANE_HEIGHT);
assert (planeCreator.isComputed());
PlaneCalibration planeCalibration = planeCreator.getPlaneCalibration();
planeCalibration.flipNormal();
// planeCalibration.moveAlongNormal(DEFAULT_PLANE_SHIFT);
assert (planeCalibration.isValid());
return planeCalibration;
}
示例2: getP5Matrix_PROJECTION
import processing.core.PMatrix3D; //导入方法依赖的package包/类
public void getP5Matrix_PROJECTION(){
PMatrix3D mat_p5_tmp = new PMatrix3D();
papplet.g.matrixMode(PApplet.PROJECTION);
papplet.getMatrix( mat_p5_tmp );
MAT_projection = mat_p5_tmp.get(MAT_projection);
DwMat4.transpose_ref_slf(MAT_projection);
papplet.g.matrixMode(PApplet.MODELVIEW);
}
示例3: getP5Matrix_MODELVIEW
import processing.core.PMatrix3D; //导入方法依赖的package包/类
public void getP5Matrix_MODELVIEW(){
PMatrix3D mat_p5_tmp = new PMatrix3D();
papplet.g.matrixMode(PApplet.MODELVIEW);
papplet.getMatrix( mat_p5_tmp );
MAT_modelview = mat_p5_tmp.get(MAT_modelview);
DwMat4.transpose_ref_slf(MAT_modelview);
papplet.g.matrixMode(PApplet.MODELVIEW);
}
示例4: isIdentity
import processing.core.PMatrix3D; //导入方法依赖的package包/类
public boolean isIdentity(PMatrix3D mat) {
PMatrix3D identity = new PMatrix3D();
identity.reset();
float[] identityArray = new float[16];
float[] matArray = new float[16];
identity.get(identityArray);
mat.get(matArray);
return Arrays.equals(identityArray, matArray);
}
示例5: computeExtrinsics
import processing.core.PMatrix3D; //导入方法依赖的package包/类
public static PMatrix3D computeExtrinsics(PMatrix3D camPaper, PMatrix3D projPaper) {
PMatrix3D extr = projPaper.get();
extr.invert();
extr.preApply(camPaper);
extr.invert();
return extr;
}
示例6: checkAndCreateMatrix
import processing.core.PMatrix3D; //导入方法依赖的package包/类
private void checkAndCreateMatrix(PMatrix3D inputMatrix) {
if (this.pmatrix == null) {
this.pmatrix = inputMatrix.get();
} else {
this.pmatrix.set(inputMatrix);
}
}
示例7: CalibrationSnapshot
import processing.core.PMatrix3D; //导入方法依赖的package包/类
public CalibrationSnapshot(PMatrix3D cameraPaperCalibration,
PMatrix3D projectorPaperCalibration,
PMatrix3D kinectPaperCalibration) {
if (cameraPaperCalibration != null) {
mainCameraPaper = cameraPaperCalibration.get();
}
if (projectorPaperCalibration != null) {
projectorPaper = projectorPaperCalibration.get();
}
if (kinectPaperCalibration != null) {
kinectPaper = kinectPaperCalibration.get();
}
}
示例8: checkValuesOf
import processing.core.PMatrix3D; //导入方法依赖的package包/类
public static void checkValuesOf(PMatrix3D homograpy) {
float[] dummyValues = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
float[] actualValues = new float[16];
homograpy.get(actualValues);
assertArrayEquals(dummyValues, actualValues, Float.MIN_VALUE);
}
示例9: setExtrinsics
import processing.core.PMatrix3D; //导入方法依赖的package包/类
public void setExtrinsics(PMatrix3D extr) {
extrinsics = extr.get();
extrinsicsInv = extr.get();
extrinsicsInv.invert();
this.hasExtrinsics = true;
}
示例10: getLocation
import processing.core.PMatrix3D; //导入方法依赖的package包/类
/**
* Get a copy of the overall transform (after tracking and second
* transform).
*
* @return
*/
public PMatrix3D getLocation(PMatrix3D trackedLocation) {
PMatrix3D combinedTransfos = trackedLocation.get();
combinedTransfos.apply(extrinsics);
return combinedTransfos;
}