本文整理汇总了Java中org.fxyz.shapes.primitives.BezierMesh类的典型用法代码示例。如果您正苦于以下问题:Java BezierMesh类的具体用法?Java BezierMesh怎么用?Java BezierMesh使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BezierMesh类属于org.fxyz.shapes.primitives包,在下文中一共展示了BezierMesh类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeBendTube
import org.fxyz.shapes.primitives.BezierMesh; //导入依赖的package包/类
private BezierMesh makeBendTube(double radius, float x0, float x1, float y1, float y2, float z) {
BezierHelper bezier1 = new BezierHelper(new Point3D(x0, y1, z), new Point3D(x1, y1, z), new Point3D(x1, y1, z),
new Point3D(x1, y2, z));
BezierMesh bend = new BezierMesh(bezier1, radius, 300, 20, 0, 0);
bend.setMaterial(material);
return bend;
}
示例2: makePump
import org.fxyz.shapes.primitives.BezierMesh; //导入依赖的package包/类
private void makePump(ObservableList<Node> g) {
double z = -1.8;
for (int i = 0; i < 4; i++) {
// pump part
Group tg = makePump(2.4, 0.3, 0.35, material3);
tg.setTranslateZ(z);
tg.setTranslateX(-1.4);
tg.setTranslateY(1.4);
g.add(tg);
double toothLength = 0.34;
double toothWidth = 0.52;
double toothHeight = 0.15;
int toothCount = 20;
double headHeight = 1;
double headDiameter = 0.2;
CSG shell = servoHeadMale(headHeight, headDiameter, toothCount, toothHeight, toothWidth, toothLength);
CSGMesh mesh = new CSGMesh(shell);
mesh.setMaterial(material3);
g.add(mesh);
mesh.setRotate(90);
mesh.setRotationAxis(X_AXIS);
mesh.setTranslateZ(z - toothWidth);
mesh.setTranslateY(2.1);
mesh.setTranslateX(-1.4);
// horizontal tube part
Group tube = makeBaseTube(1.8, 0.25, 0.35);
tube.setRotate(90);
tube.setRotationAxis(Z_AXIS);
tube.setTranslateY(0.35);
tube.setTranslateZ(z);
tube.setTranslateX(-1.1);
g.add(tube);
// vertical bend tube part
BezierMesh bend = makeBendTube(0.25, 0, -0.8f, 0.45f, 1.5f, 0);
g.add(bend);
bend.setTranslateZ(z);
bend.setTranslateX(-2);
z += 1.2;
}
}