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 Turtle
AgentException
public Patch3D getPatchAtOffsets(double dx, double dy, double dz) throws AgentException
getPatchAtOffsets
in interface Agent3D
AgentException
public Patch getPatchAtPoint(List<Double> point) throws AgentException
AgentException
public void jump(double distance)
Turtle
jump
were used
jump
in interface Turtle
jump
in class Turtle
distance
- this amount to jumppublic Patch getPatchHere()
Turtle
getPatchHere
in interface Turtle
getPatchHere
in class Turtle
public Object getTurtleVariable(int vn)
getTurtleVariable
in class Turtle
public double getTurtleVariableDouble(int vn)
getTurtleVariableDouble
in class Turtle
public void setTurtleVariable(int vn, double value) throws AgentException
setTurtleVariable
in class Turtle
AgentException
public void setTurtleVariable(int vn, Object value) throws AgentException
setTurtleVariable
in class Turtle
AgentException
public double pitch()
Turtle3D
pitch
variable
pitch
in interface Turtle3D
public void pitch(double pitch)
public double roll()
Turtle3D
roll
variable
roll
in interface Turtle3D
public 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 Turtle
AgentException
public void moveToPatchCenter()
moveToPatchCenter
in class Turtle
public void xcor(double xcor) throws AgentException
xcor
in class Turtle
AgentException
public void xcor(Double xcor) throws AgentException
xcor
in class Turtle
AgentException
public double zcor()
Turtle3D
zcor
variable
zcor
in interface Turtle3D
public void zcor(double zcor)
public void zcor(Double zcor)
public void ycor(double ycor) throws AgentException
ycor
in class Turtle
AgentException
public void ycor(Double ycor) throws AgentException
ycor
in class Turtle
AgentException
public void xandycor(double xcor, double ycor) throws AgentException
xandycor
in class Turtle
AgentException
public void xandycor(Double xcor, Double ycor) throws AgentException
xandycor
in class Turtle
AgentException
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 Turtle3D
dx
in class Turtle
public double dy()
Turtle3D
dy
in interface Turtle3D
dy
in class Turtle
public double dz()
Turtle3D
dz
in interface Turtle3D
public String shape()
Agent
shape
in interface Agent
shape
in class Turtle
public void shape(String shape)
shape
in class Turtle
public Object label()
label
in class Turtle
public String labelString()
Turtle
label
variable
labelString
in interface Turtle
labelString
in class Turtle
public void label(Object label)
label
in class Turtle
public Object labelColor()
Turtle
label-color
variable
labelColor
in interface Turtle
labelColor
in class Turtle
public void labelColor(double labelColor)
labelColor
in class Turtle
public AgentSet getBreed()
Turtle
getBreed
in interface Turtle
getBreed
in class Turtle
public void setBreed(AgentSet breed)
setBreed
in class Turtle
public Patch getPatchAtHeadingAndDistance(double delta, double distance) throws AgentException
getPatchAtHeadingAndDistance
in class Turtle
AgentException
public void turnRight(double delta)
turnRight
in class Turtle
public double[] right(double delta)
public boolean hidden()
Turtle
hidden?
variable
hidden
in interface Turtle
hidden
in class Turtle
public void hidden(boolean hidden)
hidden
in class Turtle
public double size()
Agent
size
in interface Agent
size
in class Turtle
public void size(double size)
size
in class Turtle
public double penSize()
penSize
in class Turtle
public void penSize(double penSize)
penSize
in class Turtle
public String penMode()
penMode
in class Turtle
public void penMode(String penMode)
penMode
in class Turtle