org.nlogo.agent
Class World3D
java.lang.Object
org.nlogo.agent.World
org.nlogo.agent.World3D
- All Implemented Interfaces:
- RenderableWorld
public final class World3D
- extends World
| Fields inherited from class org.nlogo.agent.World |
auxRNG, comeUpForAir, cosTable, extensionManager, lastRunTimes, linkBreedShapes, linkManager, linkShapeList, mainRNG, patchesWithLabels, sinTable, tieManager, turtleBreedShapes, turtleShapeList |
|
Method Summary |
void |
changeTopology(boolean xWrapping,
boolean yWrapping)
|
void |
changeTopology(boolean xWrapping,
boolean yWrapping,
boolean zWrapping)
|
void |
clearAll()
|
void |
clearDrawing()
|
void |
createPatches(int minPxcor,
int maxPxcor,
int minPycor,
int maxPycor)
|
void |
createPatches(int minPxcor,
int maxPxcor,
int minPycor,
int maxPycor,
int minPzcor,
int maxPzcor)
|
void |
createPatches(WorldDimensions dim)
|
Turtle |
createTurtle(AgentSet breed)
|
Turtle |
createTurtle(AgentSet breed,
int c,
int h)
|
void |
diffuse4(double param,
int vn)
|
double |
distance(Agent agent1,
Agent agent2,
boolean wrap)
|
double |
distance(Agent agent,
double x1,
double y1,
double z1,
boolean wrap)
|
double |
distance(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
boolean wrap)
|
boolean |
equalDimensions(WorldDimensions d)
|
void |
exportWorld(PrintWriter writer,
boolean full)
|
Patch |
fastGetPatchAt(int xc,
int yc)
|
Patch |
fastGetPatchAt(int xc,
int yc,
int zc)
|
double |
followOffsetZ()
|
WorldDimensions |
getDimensions()
|
Object |
getDrawing()
|
List |
getImplicitObserverVariables()
|
List |
getImplicitPatchVariables()
|
List |
getImplicitTurtleVariables()
|
Turtle |
getOrCreateTurtle(long id)
|
Patch |
getPatchAt(double x,
double y)
|
Patch3D |
getPatchAt(double x,
double y,
double z)
|
Patch |
getPatchAtHeadingAndDistance(Agent a,
double heading,
double distance)
|
Patch |
getPatchAtHeadingPitchAndDistance(double x,
double y,
double z,
double heading,
double pitch,
double distance)
|
Patch |
getPatchAtWrap(double x,
double y,
double z)
|
double[][][] |
getPatchScratch3d()
|
void |
importWorld(Importer.ErrorHandler errorHandler,
ImporterUser importerUser,
Importer.StringReader stringReader,
BufferedReader reader)
|
List |
inCone(Turtle callingTurtle,
AgentSet sourceSet,
double radius,
double angle,
boolean wrap)
|
List |
inRadius(Agent agent,
AgentSet sourceSet,
double radius,
boolean wrap)
|
boolean |
isDimensionVariable(String variableName)
|
boolean |
isDoublePatchVariable(int vn)
|
boolean |
isDoubleTurtleVariable(int vn)
|
boolean |
isSpecialPatchVariable(int vn)
|
boolean |
isSpecialTurtleVariable(int vn)
|
int |
maxPzcor()
|
Double |
maxPzcorBoxed()
|
int |
minPzcor()
|
Double |
minPzcorBoxed()
|
int |
roundZ(double z)
|
boolean |
sendPixels()
|
WorldDimensions |
setDimensionVariable(String variableName,
int value,
WorldDimensions d)
|
double |
shortestPathZ(double z1,
double z2)
|
void |
stamp(Agent agent,
boolean erase)
|
double |
towardsPitch(Agent fromAgent,
Agent toAgent,
boolean wrap)
|
double |
towardsPitch(Agent fromAgent,
double toX,
double toY,
double toZ,
boolean wrap)
|
double |
towardsPitch(double fromX,
double fromY,
double fromZ,
double toX,
double toY,
double toZ,
boolean wrap)
|
double[] |
towardsVector(double fromX,
double fromY,
double fromZ,
double toX,
double toY,
double toZ,
boolean wrap)
|
boolean |
validPatchCoordinates(int xc,
int yc,
int zc)
|
int |
worldDepth()
|
Double |
worldDepthBoxed()
|
double |
wrappedObserverZ(double z)
|
boolean |
wrappingAllowedInZ()
|
double |
wrapZ(double z)
|
| Methods inherited from class org.nlogo.agent.World |
agentClassToAgentSet, averagePathLength, breedOwns, breedsOwnIndexOf, breedsOwnNameAt, checkLinkShapeName, checksum, checkTurtleShapeName, clearGlobals, clearLinks, clearPatches, clearTurtles, compareLinkBreeds, defaultEvaluator, diffuse, displayOn, displayOn, distance, distance, distanceToLink, followOffsetX, followOffsetY, generateSeed, getBreed, getBreeds, getBreedSingular, getExtensionManager, getImplicitLinkVariables, getLink, getLinkBreed, getLinkBreeds, getLinkBreedSingular, getLinkVariablesArraySize, getObserverVariableByName, getOrCreateDummyLink, getOrCreateLink, getOrCreateLink, getPatch, getPatchAtHeadingAndDistance, getPatchAtWrap, getPatchScratch, getTimer, getTurtle, getVariablesArraySize, getVariablesArraySize, getVariablesArraySize, getVariablesArraySize, gridRoot, gridRoot, growMax, growMin, inBounds, indexOfVariable, indexOfVariable, inNetworkRadius, invalidateTurtleShape, isBreed, isDoubleLinkVariable, isLinkBreed, isSpecialLinkVariable, lineThickness, linkBreedOwns, linkBreedsOwnIndexOf, linkBreedsOwnNameAt, links, linksOwnIndexOf, linksOwnNameAt, markDrawingClean, markPatchColorsClean, markPatchColorsDirty, maxPxcor, maxPxcorBoxed, maxPycor, maxPycorBoxed, minPxcor, minPxcorBoxed, minPycor, minPycorBoxed, networkDistance, networkShortestPathLinks, networkShortestPathNodes, noLinks, noPatches, noTurtles, observer, observerOwnsIndexOf, observerOwnsNameAt, observers, patchColors, patchColorsDirty, patches, patchesAllBlack, patchesOwnIndexOf, patchesOwnNameAt, patchSize, patchSize, program, program, realloc, recursivelyEqual, rememberOldProgram, removeLineThickness, resetTicks, resetTimer, roundX, roundY, setDefaultEvaluator, setExtensionManager, setLineThickness, setObserverVariableByName, tick, tick, ticks, ticks, towards, towards, towards, trailDrawer, turtles, turtlesOwnIndexOf, turtlesOwnNameAt, validPatchCoordinates, worldHeight, worldHeightBoxed, worldWidth, worldWidthBoxed, wrap, wrappedObserverX, wrappedObserverY, wrappingAllowedInX, wrappingAllowedInY, wrapX, wrapY |
World3D
public World3D(Shape defaultShape,
Shape defaultLinkShape)
changeTopology
public void changeTopology(boolean xWrapping,
boolean yWrapping)
- Overrides:
changeTopology in class World
changeTopology
public void changeTopology(boolean xWrapping,
boolean yWrapping,
boolean zWrapping)
shortestPathZ
public double shortestPathZ(double z1,
double z2)
wrappingAllowedInZ
public boolean wrappingAllowedInZ()
wrappedObserverZ
public double wrappedObserverZ(double z)
followOffsetZ
public double followOffsetZ()
diffuse4
public void diffuse4(double param,
int vn)
throws AgentException,
PatchException
- Overrides:
diffuse4 in class World
- Throws:
AgentException
PatchException
worldDepth
public int worldDepth()
maxPzcor
public int maxPzcor()
minPzcor
public int minPzcor()
minPzcorBoxed
public Double minPzcorBoxed()
maxPzcorBoxed
public Double maxPzcorBoxed()
worldDepthBoxed
public Double worldDepthBoxed()
wrapZ
public double wrapZ(double z)
throws AgentException
- Throws:
AgentException
roundZ
public int roundZ(double z)
throws AgentException
- Throws:
AgentException
distance
public double distance(Agent agent1,
Agent agent2,
boolean wrap)
- Overrides:
distance in class World
distance
public double distance(Agent agent,
double x1,
double y1,
double z1,
boolean wrap)
distance
public double distance(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
boolean wrap)
getPatchAtHeadingAndDistance
public Patch getPatchAtHeadingAndDistance(Agent a,
double heading,
double distance)
throws AgentException
- Overrides:
getPatchAtHeadingAndDistance in class World
- Throws:
AgentException
getPatchAtHeadingPitchAndDistance
public Patch getPatchAtHeadingPitchAndDistance(double x,
double y,
double z,
double heading,
double pitch,
double distance)
throws AgentException
- Throws:
AgentException
towardsPitch
public double towardsPitch(Agent fromAgent,
Agent toAgent,
boolean wrap)
throws AgentException
- Overrides:
towardsPitch in class World
- Throws:
AgentException
towardsPitch
public double towardsPitch(Agent fromAgent,
double toX,
double toY,
double toZ,
boolean wrap)
throws AgentException
- Overrides:
towardsPitch in class World
- Throws:
AgentException
towardsPitch
public double towardsPitch(double fromX,
double fromY,
double fromZ,
double toX,
double toY,
double toZ,
boolean wrap)
throws AgentException
- Overrides:
towardsPitch in class World
- Throws:
AgentException
towardsVector
public double[] towardsVector(double fromX,
double fromY,
double fromZ,
double toX,
double toY,
double toZ,
boolean wrap)
throws AgentException
- Throws:
AgentException
inRadius
public List inRadius(Agent agent,
AgentSet sourceSet,
double radius,
boolean wrap)
- Overrides:
inRadius in class World
inCone
public List inCone(Turtle callingTurtle,
AgentSet sourceSet,
double radius,
double angle,
boolean wrap)
throws AgentException
- Overrides:
inCone in class World
- Throws:
AgentException
getPatchAtWrap
public Patch getPatchAtWrap(double x,
double y,
double z)
validPatchCoordinates
public boolean validPatchCoordinates(int xc,
int yc,
int zc)
fastGetPatchAt
public Patch fastGetPatchAt(int xc,
int yc,
int zc)
fastGetPatchAt
public Patch fastGetPatchAt(int xc,
int yc)
- Overrides:
fastGetPatchAt in class World
createPatches
public void createPatches(WorldDimensions dim)
- Overrides:
createPatches in class World
createPatches
public void createPatches(int minPxcor,
int maxPxcor,
int minPycor,
int maxPycor)
- Overrides:
createPatches in class World
createPatches
public void createPatches(int minPxcor,
int maxPxcor,
int minPycor,
int maxPycor,
int minPzcor,
int maxPzcor)
exportWorld
public void exportWorld(PrintWriter writer,
boolean full)
- Overrides:
exportWorld in class World
importWorld
public void importWorld(Importer.ErrorHandler errorHandler,
ImporterUser importerUser,
Importer.StringReader stringReader,
BufferedReader reader)
throws IOException
- Overrides:
importWorld in class World
- Throws:
IOException
getOrCreateTurtle
public Turtle getOrCreateTurtle(long id)
- Overrides:
getOrCreateTurtle in class World
getPatchScratch3d
public double[][][] getPatchScratch3d()
isDoublePatchVariable
public boolean isDoublePatchVariable(int vn)
- Overrides:
isDoublePatchVariable in class World
isDoubleTurtleVariable
public boolean isDoubleTurtleVariable(int vn)
- Overrides:
isDoubleTurtleVariable in class World
isSpecialTurtleVariable
public boolean isSpecialTurtleVariable(int vn)
- Overrides:
isSpecialTurtleVariable in class World
isSpecialPatchVariable
public boolean isSpecialPatchVariable(int vn)
- Overrides:
isSpecialPatchVariable in class World
getImplicitObserverVariables
public List getImplicitObserverVariables()
- Overrides:
getImplicitObserverVariables in class World
getImplicitTurtleVariables
public List getImplicitTurtleVariables()
- Overrides:
getImplicitTurtleVariables in class World
getImplicitPatchVariables
public List getImplicitPatchVariables()
- Overrides:
getImplicitPatchVariables in class World
getDimensions
public WorldDimensions getDimensions()
- Overrides:
getDimensions in class World
isDimensionVariable
public boolean isDimensionVariable(String variableName)
- Overrides:
isDimensionVariable in class World
setDimensionVariable
public WorldDimensions setDimensionVariable(String variableName,
int value,
WorldDimensions d)
throws WorldDimensionException
- Overrides:
setDimensionVariable in class World
- Throws:
WorldDimensionException
equalDimensions
public boolean equalDimensions(WorldDimensions d)
- Overrides:
equalDimensions in class World
getPatchAt
public Patch getPatchAt(double x,
double y)
throws AgentException
- Overrides:
getPatchAt in class World
- Throws:
AgentException
getPatchAt
public Patch3D getPatchAt(double x,
double y,
double z)
throws AgentException
- Throws:
AgentException
createTurtle
public Turtle createTurtle(AgentSet breed)
- Overrides:
createTurtle in class World
createTurtle
public Turtle createTurtle(AgentSet breed,
int c,
int h)
- Overrides:
createTurtle in class World
getDrawing
public Object getDrawing()
- Overrides:
getDrawing in class World
sendPixels
public boolean sendPixels()
- Overrides:
sendPixels in class World
clearAll
public void clearAll()
- Overrides:
clearAll in class World
clearDrawing
public void clearDrawing()
- Overrides:
clearDrawing in class World
stamp
public void stamp(Agent agent,
boolean erase)
- Overrides:
stamp in class World