當前位置: 首頁>>代碼示例>>Java>>正文


Java BezierMesh類代碼示例

本文整理匯總了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;
}
 
開發者ID:lyrachord,項目名稱:FX3DAndroid,代碼行數:8,代碼來源:ScadaApplication.java

示例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;
	}
}
 
開發者ID:lyrachord,項目名稱:FX3DAndroid,代碼行數:46,代碼來源:ScadaApplication.java


注:本文中的org.fxyz.shapes.primitives.BezierMesh類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。