本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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;
}