?? axis_info.java
字號(hào):
/*
* Created on 2005-7-18
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package Axis_info;
import javax.vecmath.*;
/**
* @author carso
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class Axis_info {
/*畫(huà)曲線是需要定義StripCount[],并指定StripCount[0]的直,現(xiàn)在我們的做法其實(shí)不可取
* 以后在改進(jìn)是需要通過(guò)setStripCount()來(lái)指定
*
* */
private int StripCount[] = new int[1];
/*= Point3f[] positions= new Point3f[6]是為了定義物體的位置,同理,個(gè)數(shù)應(yīng)該通過(guò)
* 函數(shù)確定,在改進(jìn)時(shí),需要Point3f[6]根據(jù)需要?jiǎng)討B(tài)指定Point3f[]的個(gè)數(shù)
* 目前
* */
private Point3f[] positions= new Point3f[6];
private float vert[] = {
-20.0f, 0.0f,10.0f,
20f, 0.0f,10.0f,
22.0f, 0.0f,8.0f,
22.0f, 0.0f,-10.0f,
-20.0f,0.0f,-10.0f,
-20.0f, 0.0f,10.0f
};
private float vert1[] = {
-22.0f, 0.0f,12.0f,
22f, 0.0f,12.0f,
25.0f, 0.0f,10.0f,
25.0f, 0.0f,-12.0f,
-22.0f,0.0f,-12.0f,
-22.0f, 0.0f,12.0f
};
private float[] knot_InMoveInPath={0.0f,0.3f,0.4f,0.6f,0.8f,1f};
public float[] getKnot_InMoveInPath(){
return this.knot_InMoveInPath;
}
private Quat4f[] Quat_InMoveInPath=new Quat4f[6];
public Quat4f[] getQuat_InMoveInPath(){
quats[0]=new Quat4f(0.0f,0,0.0f,0.0f);
quats[1]=new Quat4f(0.0f,1,0.0f,0.0f);
quats[2]=new Quat4f(0.0f,2,0.0f,0.0f);
quats[3]=new Quat4f(0.0f,3,0.0f,0.0f);
quats[4]=new Quat4f(0.0f,4,0.0f,0.0f);
quats[5]=new Quat4f(0.0f,5,0.0f,0.0f);
return this.Quat_InMoveInPath;
}
/*
*
*
* sections,quats,knots:使用在View_follow()類(lèi)中,表示軌跡劃分的區(qū)間
* */
private int sections;
private Quat4f[] quats;
private float[] knots;
private Point3f[] positions_inViewFol;
public void setSections(int section){
this.sections=section;
quats=new Quat4f[section+1];
knots=new float[section+1];
positions_inViewFol=new Point3f[section+1];
for(int i=0;i<=sections;i++)
{
positions_inViewFol[i]=new Point3f(
/*現(xiàn)在暫時(shí)設(shè)置j=-50*/
-52+i,
3.0f,
5.0f
);
System.out.println("print sections:"+sections);
quats[i]=new Quat4f(0.0f,i,0.0f,0.0f);
knots[i]=i*(1.0f/sections);
}
}
public int getSections(int section){
return this.sections=section;
}
public Point3f[] getPositions_inViewFol(){
return this.positions_inViewFol;
}
public Quat4f[] getQuats(){
return this.quats;
}
public float[] getKnots(){
return knots;
}
/*定義sections,quats,knots結(jié)束
*
*
* */
public float[] getvert(){
return vert;
}
public float[] getvert1(){
return vert1;
}
public int[] getStripCount(){
return StripCount;
}
public Point3f[] getPosition(){
return positions;
}
public Axis_info(){
StripCount[0]=6;
sections=90;
//為positions副職
positions[0]= new Point3f(-21.0f, 0.0f,10.0f);
positions[1]= new Point3f( 21f, 0.0f,10.0f);
positions[2]= new Point3f(23.5f, 0.0f,9.0f);
positions[3]= new Point3f(23.5f, 0.0f,-11.0f);
positions[4]= new Point3f(-21.0f,0.0f,-11.0f);
positions[5]= positions[0];
System.out.println("This Class Axis_info.Axis_info store point infomation");
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -