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

📄 state.java

📁 采用Java3D,基于L-system
💻 JAVA
字号:
import javax.vecmath.Point3d;/** * This class is a packet of state information for the Interpreter "turtle". * (called by: Lsystem.java, Interpreter.java) *  * @author Scott Teresi, April 1999, www.teresi.us */public class State {  public Point3d curPos;          // current cursor position  public double angle;            // current direction the turtle is pointing  public double angleInc;         // angle increment value  public double lineLength;       // length of line segment drawn by turtle  public boolean swapDirections;  // swap the meaning of turn-right/turn-left?  public State () {    // initialize state to defaults    setState (new Point3d(0d, 0d, 0d), 0.0, 1.0, 10.0, false);  }  public State (Point3d pt, double a, double ai, double l, boolean s) {    setState(pt, a, ai, l, s);  }  public State (State s) {    setState (s.curPos, s.angle, s.angleInc, s.lineLength, s.swapDirections);  }  public void setState (Point3d pt, double a, double ai, double l, boolean s) {    curPos = pt;    angle = a;    angleInc = ai;    lineLength = l;    swapDirections = s;  }}

⌨️ 快捷键说明

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