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


Java Vec3D.set方法代码示例

本文整理汇总了Java中toxi.geom.Vec3D.set方法的典型用法代码示例。如果您正苦于以下问题:Java Vec3D.set方法的具体用法?Java Vec3D.set怎么用?Java Vec3D.set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在toxi.geom.Vec3D的用法示例。


在下文中一共展示了Vec3D.set方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: tryComputeLarge

import toxi.geom.Vec3D; //导入方法依赖的package包/类
private boolean tryComputeLarge(Vec3D[] neighbours, Vec3D normal) {
    if (neighbours[Connexity.TOPLEFT] != null
            && neighbours[Connexity.TOPRIGHT] != null
            && neighbours[Connexity.BOTLEFT] != null
            && neighbours[Connexity.BOTRIGHT] != null) {

        Vec3D n1 = computeNormal(
                neighbours[Connexity.TOPLEFT],
                neighbours[Connexity.TOPRIGHT],
                neighbours[Connexity.BOTLEFT]);

        Vec3D n2 = computeNormal(
                neighbours[Connexity.BOTLEFT],
                neighbours[Connexity.TOPRIGHT],
                neighbours[Connexity.BOTRIGHT]);
        normal.set(n1.add(n2));
        return true;
    }
    return false;
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:21,代码来源:DepthAnalysis.java

示例2: tryComputeMediumSquare

import toxi.geom.Vec3D; //导入方法依赖的package包/类
private boolean tryComputeMediumSquare(Vec3D[] neighbours, Vec3D normal) {
    // small square around the point
    if (neighbours[Connexity.LEFT] != null
            && neighbours[Connexity.TOP] != null
            && neighbours[Connexity.RIGHT] != null
            && neighbours[Connexity.BOT] != null) {

        Vec3D n1 = computeNormal(
                neighbours[Connexity.LEFT],
                neighbours[Connexity.TOP],
                neighbours[Connexity.RIGHT]);

        Vec3D n2 = computeNormal(
                neighbours[Connexity.LEFT],
                neighbours[Connexity.RIGHT],
                neighbours[Connexity.BOT]);
        normal.set(n1.add(n2));
        return true;
    }
    return false;
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:22,代码来源:DepthAnalysis.java

示例3: project

import toxi.geom.Vec3D; //导入方法依赖的package包/类
public void project(Vec3D point, Vec3D projectedPoint) {
//        Vec3D out = homographyCalibration.mat.applyTo(getPlane().getProjectedPointOptimAlloc(point));
        Vec3D out = homographyCalibration.mat.applyTo(getPlane().getProjectedPoint(point));
        projectedPoint.set(out);
        projectedPoint.x /= projectedPoint.z;
        projectedPoint.y /= projectedPoint.z;
        projectedPoint.z = getPlane().getDistanceToPoint(point);
    }
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:9,代码来源:PlaneAndProjectionCalibration.java

示例4: tryComputeOneTriangle

import toxi.geom.Vec3D; //导入方法依赖的package包/类
private boolean tryComputeOneTriangle(Vec3D[] neighbours, Vec3D point, Vec3D normal) {
    // One triangle only. 
    // Left. 
    if (neighbours[Connexity.LEFT] != null) {
        if (neighbours[Connexity.TOP] != null) {
            normal.set(computeNormal(
                    neighbours[Connexity.LEFT],
                    neighbours[Connexity.TOP],
                    point));
            return true;
        } else {
            if (neighbours[Connexity.BOT] != null) {
                normal.set(computeNormal(
                        neighbours[Connexity.LEFT],
                        point,
                        neighbours[Connexity.BOT]));
                return true;
            }
        }
    } else {

        if (neighbours[Connexity.RIGHT] != null) {
            if (neighbours[Connexity.TOP] != null) {
                normal.set(computeNormal(
                        neighbours[Connexity.TOP],
                        neighbours[Connexity.RIGHT],
                        point));
                return true;
            } else {
                if (neighbours[Connexity.BOT] != null) {
                    normal.set(computeNormal(
                            neighbours[Connexity.RIGHT],
                            neighbours[Connexity.BOT],
                            point));
                    return true;
                }
            }
        }
    }
    return false;
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:42,代码来源:DepthAnalysis.java


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