⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 draw3d_stripline.java

📁 一个java3D的动画程序
💻 JAVA
字号:
/*
 * Created on 2005-7-17
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package AixsSet;

/*
 * Created on 2005-7-17
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

/**
 * @author carso
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
import javax.media.j3d.*;


public class Draw3D_Stripline extends Shape3D { 
  

   private float color[] = { 
       0.0f,0.5f,1.0f, 
       0.5f,0.0f,1.0f, 
       0.0f,0.8f,2.0f, 
       1.0f,0.0f,0.3f, 
       0.0f,1.0f,0.3f, 
       0.3f,0.8f,0.0f, 
     }; 
 
   
   public Draw3D_Stripline(float[] vert,int[] StripCount) { 

       	LineStripArray line = new LineStripArray(6,  
       	LineStripArray.COORDINATES| 
		LineStripArray.COLOR_3,StripCount); 
         line.setCoordinates(0,vert); 
         line.setColors(0,color); 
         LineAttributes la = new LineAttributes(); 
         la.setLineWidth(50.0f); 
         la.setLineAntialiasingEnable(true); 
         la.setLinePattern(LineAttributes.PATTERN_DASH); 
         Appearance ap = new Appearance(); 
         ap.setLineAttributes(la); 
         this.setGeometry(line); 
         this.setAppearance(ap);  

   } 
} 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -