java.lang.Objectjava.util.Observable
org.nlogo.agent.Agent
org.nlogo.agent.Turtle
org.nlogo.agent.Turtle3D
public final class Turtle3D
| Field Summary | |
|---|---|
static int |
VAR_COLOR3D
|
static int |
VAR_HEADING3D
|
static int |
VAR_LABEL3D
|
static int |
VAR_PITCH3D
|
static int |
VAR_ROLL3D
|
static int |
VAR_WHO3D
|
static int |
VAR_XCOR3D
|
static int |
VAR_YCOR3D
|
static int |
VAR_ZCOR3D
|
| Fields inherited from class org.nlogo.agent.Turtle |
|---|
BIT, LAST_PREDEFINED_VAR, NUMBER_PREDEFINED_VARS, PEN_DOWN, PEN_ERASE, PEN_UP, VAR_COLOR, VAR_HEADING, VAR_LABEL, VAR_WHO, VAR_XCOR, VAR_YCOR |
| Fields inherited from class org.nlogo.agent.Agent |
|---|
id, variables |
| Constructor Summary | |
|---|---|
Turtle3D(World3D world,
AgentSet breed,
Number xcor,
Number ycor,
Number zcor)
|
|
| Method Summary | |
|---|---|
double |
dx()
Returns the x component of the forward vector |
double |
dy()
Returns the y component of the forward vector |
double |
dz()
Returns the z component of the forward vector |
void |
face(Agent agent,
boolean wrap)
|
void |
face(double x,
double y,
double z,
boolean wrap)
|
AgentSet |
getBreed()
Returns the breed AgentSet of this turtle, all turtles if the turtle is unbreeded |
Patch |
getPatchAtHeadingAndDistance(double delta,
double distance)
|
Patch |
getPatchAtOffsets(double dx,
double dy)
|
Patch3D |
getPatchAtOffsets(double dx,
double dy,
double dz)
|
Patch |
getPatchAtPoint(List<Double> point)
|
Patch |
getPatchHere()
Returns the patch that this turtle is on |
Object |
getTurtleVariable(int vn)
|
double |
getTurtleVariableDouble(int vn)
|
Turtle |
hatch()
|
void |
headingPitchAndRoll(double heading,
double pitch,
double roll)
|
boolean |
hidden()
Returns the value of the hidden? |
void |
hidden(boolean hidden)
|
void |
home()
|
void |
jump(double distance)
Moves the turtle forward distance as if the command jump were used |
Object |
label()
|
void |
label(Object label)
|
Object |
labelColor()
Returns the value of the label-color variable |
void |
labelColor(double labelColor)
|
String |
labelString()
Returns the value of the label variable |
void |
moveTo(Agent otherAgent)
|
void |
moveToPatchCenter()
|
String |
penMode()
|
void |
penMode(String penMode)
|
double |
penSize()
|
void |
penSize(double penSize)
|
double |
pitch()
Returns the value of the pitch variable |
void |
pitch(double pitch)
|
double[] |
right(double delta)
|
double |
roll()
Returns the value of the roll variable |
void |
roll(double roll)
|
void |
setBreed(AgentSet breed)
This version of setBreed properly resets the global breed AgentSets Caller should ensure that the turtle isn't a link (links aren't allowed to change breed). |
void |
setTurtleVariable(int vn,
double value)
|
void |
setTurtleVariable(int vn,
Object value)
|
String |
shape()
Returns the name of the current shape, empty string in the case of patches. |
void |
shape(String shape)
|
double |
shortestPathZ(double z)
|
double |
size()
Returns the size of this agent |
void |
size(double size)
|
void |
turnRight(double delta)
|
void |
xandycor(double xcor,
double ycor)
|
void |
xandycor(Double xcor,
Double ycor)
|
void |
xcor(double xcor)
|
void |
xcor(Double xcor)
|
void |
xyandzcor(double xcor,
double ycor,
double zcor)
|
void |
xyandzcor(Double xcor,
Double ycor,
Double zcor)
|
void |
ycor(double ycor)
|
void |
ycor(Double ycor)
|
double |
zcor()
Returns the value of the zcor variable |
void |
zcor(double zcor)
|
void |
zcor(Double zcor)
|
| Methods inherited from class org.nlogo.agent.Agent |
|---|
compareTo, getVariableCount, id, variableConstraint, variableConstraint, world |
| Methods inherited from class java.util.Observable |
|---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.nlogo.api.Turtle |
|---|
cachedShape, cachedShape, color, getBreedIndex, hasLabel, heading, heading, lineThickness, xcor, ycor |
| Methods inherited from interface org.nlogo.api.Agent |
|---|
classDisplayName, getVariable, id, setVariable, world |
| Field Detail |
|---|
public static final int VAR_WHO3D
public static final int VAR_COLOR3D
public static final int VAR_HEADING3D
public static final int VAR_PITCH3D
public static final int VAR_ROLL3D
public static final int VAR_XCOR3D
public static final int VAR_YCOR3D
public static final int VAR_ZCOR3D
public static final int VAR_LABEL3D
| Constructor Detail |
|---|
public Turtle3D(World3D world,
AgentSet breed,
Number xcor,
Number ycor,
Number zcor)
| Method Detail |
|---|
public Turtle hatch()
hatch in class Turtle
public Patch getPatchAtOffsets(double dx,
double dy)
throws AgentException
getPatchAtOffsets in class TurtleAgentException
public Patch3D getPatchAtOffsets(double dx,
double dy,
double dz)
throws AgentException
getPatchAtOffsets in interface Agent3DAgentException
public Patch getPatchAtPoint(List<Double> point)
throws AgentException
AgentExceptionpublic void jump(double distance)
Turtlejump were used
jump in interface Turtlejump in class Turtledistance - this amount to jumppublic Patch getPatchHere()
Turtle
getPatchHere in interface TurtlegetPatchHere in class Turtlepublic Object getTurtleVariable(int vn)
getTurtleVariable in class Turtlepublic double getTurtleVariableDouble(int vn)
getTurtleVariableDouble in class Turtle
public void setTurtleVariable(int vn,
double value)
throws AgentException
setTurtleVariable in class TurtleAgentException
public void setTurtleVariable(int vn,
Object value)
throws AgentException
setTurtleVariable in class TurtleAgentExceptionpublic double pitch()
Turtle3Dpitch variable
pitch in interface Turtle3Dpublic void pitch(double pitch)
public double roll()
Turtle3Droll variable
roll in interface Turtle3Dpublic void roll(double roll)
public void headingPitchAndRoll(double heading,
double pitch,
double roll)
public double shortestPathZ(double z)
public void moveTo(Agent otherAgent)
throws AgentException
moveTo in class TurtleAgentExceptionpublic void moveToPatchCenter()
moveToPatchCenter in class Turtle
public void xcor(double xcor)
throws AgentException
xcor in class TurtleAgentException
public void xcor(Double xcor)
throws AgentException
xcor in class TurtleAgentExceptionpublic double zcor()
Turtle3Dzcor variable
zcor in interface Turtle3Dpublic void zcor(double zcor)
public void zcor(Double zcor)
public void ycor(double ycor)
throws AgentException
ycor in class TurtleAgentException
public void ycor(Double ycor)
throws AgentException
ycor in class TurtleAgentException
public void xandycor(double xcor,
double ycor)
throws AgentException
xandycor in class TurtleAgentException
public void xandycor(Double xcor,
Double ycor)
throws AgentException
xandycor in class TurtleAgentException
public void xyandzcor(double xcor,
double ycor,
double zcor)
public void xyandzcor(Double xcor,
Double ycor,
Double zcor)
public void home()
home in class Turtle
public void face(Agent agent,
boolean wrap)
face in class Turtle
public void face(double x,
double y,
double z,
boolean wrap)
public double dx()
Turtle3D
dx in interface Turtle3Ddx in class Turtlepublic double dy()
Turtle3D
dy in interface Turtle3Ddy in class Turtlepublic double dz()
Turtle3D
dz in interface Turtle3Dpublic String shape()
Agent
shape in interface Agentshape in class Turtlepublic void shape(String shape)
shape in class Turtlepublic Object label()
label in class Turtlepublic String labelString()
Turtlelabel variable
labelString in interface TurtlelabelString in class Turtlepublic void label(Object label)
label in class Turtlepublic Object labelColor()
Turtlelabel-color variable
labelColor in interface TurtlelabelColor in class Turtlepublic void labelColor(double labelColor)
labelColor in class Turtlepublic AgentSet getBreed()
Turtle
getBreed in interface TurtlegetBreed in class Turtlepublic void setBreed(AgentSet breed)
setBreed in class Turtle
public Patch getPatchAtHeadingAndDistance(double delta,
double distance)
throws AgentException
getPatchAtHeadingAndDistance in class TurtleAgentExceptionpublic void turnRight(double delta)
turnRight in class Turtlepublic double[] right(double delta)
public boolean hidden()
Turtlehidden? variable
hidden in interface Turtlehidden in class Turtlepublic void hidden(boolean hidden)
hidden in class Turtlepublic double size()
Agent
size in interface Agentsize in class Turtlepublic void size(double size)
size in class Turtlepublic double penSize()
penSize in class Turtlepublic void penSize(double penSize)
penSize in class Turtlepublic String penMode()
penMode in class Turtlepublic void penMode(String penMode)
penMode in class Turtle