当前位置: 首页>>代码示例>>Java>>正文


Java PMatrix3D.get方法代码示例

本文整理汇总了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;
    }
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:27,代码来源:PlaneCalibration.java

示例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);
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:11,代码来源:DwCamera.java

示例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);
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:11,代码来源:DwCamera.java

示例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);
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:11,代码来源:ProjectiveDeviceCalibration.java

示例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;
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:8,代码来源:CalibrationExtrinsic.java

示例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);
    }
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:8,代码来源:HomographyCalibration.java

示例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();
    }
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:15,代码来源:CalibrationSnapshot.java

示例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);
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:8,代码来源:HomographyCalibrationTest.java

示例9: setExtrinsics

import processing.core.PMatrix3D; //导入方法依赖的package包/类
public void setExtrinsics(PMatrix3D extr) {
    extrinsics = extr.get();
    extrinsicsInv = extr.get();
    extrinsicsInv.invert();
    this.hasExtrinsics = true;
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:7,代码来源:ARDisplay.java

示例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;
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:12,代码来源:Screen.java


注:本文中的processing.core.PMatrix3D.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。