keba
Class AnimatRule

java.lang.Object
  |
  +--javax.media.j3d.SceneGraphObject
        |
        +--javax.media.j3d.Node
              |
              +--javax.media.j3d.Group
                    |
                    +--javax.media.j3d.BranchGroup
                          |
                          +--keba.Phenomenon
                                |
                                +--keba.Animat
                                      |
                                      +--keba.AnimatRule
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class AnimatRule
extends Animat

See Also:
Serialized Form

Field Summary
(package private)  int action
           
static int APPROACH_FOOD
           
static int APPROACH_LIGHTNING
           
static int APPROACH_RAIN
           
static int AVOID
           
static int DRINK
           
static int EAT
           
static int EXPLORE
           
static int NACT
           
static int NONE
           
 
Fields inherited from class keba.Animat
af, dead, energy, hunger, immortal, leaveTrail, msg, name, noise, ostream, periodWrite, rp, th, thirst, toFile, trail, trailApp, trailBG, trailT, trailT2, trailTG, trailTG2, transWrite, verbose, x2, z2
 
Fields inherited from class keba.Phenomenon
colour, flavour, hardness, id, loudness, odour, radius, t, tg, time, type, x, z
 
Fields inherited from class javax.media.j3d.BranchGroup
ALLOW_DETACH
 
Fields inherited from class javax.media.j3d.Group
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE
 
Fields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Fields inherited from class javax.media.j3d.SceneGraphObject
capabilities, nodeHashtable, retained
 
Constructor Summary
AnimatRule(float nz, float nx, float nradius, long nid)
           
 
Method Summary
static java.lang.String actType(int type)
           
 void approach(int type)
           
 void approachFood()
           
 void approachLightning()
           
 void approachRain()
           
 void avoid()
           
 void drink()
           
 void eat()
           
 void explore()
           
 boolean foodAtRange()
           
 boolean foodPerc()
           
 boolean lightningNear()
           
 boolean lightningPerc()
           
 void noAct()
           
 boolean rainAtRange()
           
 boolean rainPerc()
           
(package private)  void restore()
           
 boolean rockNear()
           
 void rules()
           
(package private)  void step()
           
 
Methods inherited from class keba.Animat
clean, destroy, getToroidalD, init3D, iniTrail, noise, removeTrail, setEnergy, setHunger, setTh, setThirst, setX, setZ, stepState
 
Methods inherited from class keba.Phenomenon
clone, restore3D, sinit3D
 
Methods inherited from class javax.media.j3d.BranchGroup
cloneNode, compile, createRetained, detach, pickAll, pickAllSorted, pickAny, pickClosest
 
Methods inherited from class javax.media.j3d.Group
addChild, cloneTree, duplicateAttributes, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, insertChild, moveTo, numChildren, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds
 
Methods inherited from class javax.media.j3d.Node
checkDuplicateNode, checkForCycle, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
checkForLiveOrCompiled, clearCapability, clearLive, duplicateSceneGraphObject, getCapability, getNodeComponent, getUserData, isCompiled, isLive, isLiveOrCompiled, setCapability, setCompiled, setLive, setUserData, updateNodeReferences
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

action

int action

NACT

public static final int NACT

NONE

public static final int NONE

EXPLORE

public static final int EXPLORE

EAT

public static final int EAT

DRINK

public static final int DRINK

APPROACH_FOOD

public static final int APPROACH_FOOD

APPROACH_RAIN

public static final int APPROACH_RAIN

APPROACH_LIGHTNING

public static final int APPROACH_LIGHTNING

AVOID

public static final int AVOID
Constructor Detail

AnimatRule

public AnimatRule(float nz,
                  float nx,
                  float nradius,
                  long nid)
Method Detail

actType

public static java.lang.String actType(int type)

restore

void restore()
Overrides:
restore in class Animat

step

void step()
Overrides:
step in class Animat

rules

public void rules()

foodPerc

public boolean foodPerc()

rainPerc

public boolean rainPerc()

lightningPerc

public boolean lightningPerc()

foodAtRange

public boolean foodAtRange()

rainAtRange

public boolean rainAtRange()

lightningNear

public boolean lightningNear()

rockNear

public boolean rockNear()

noAct

public void noAct()

explore

public void explore()

eat

public void eat()

drink

public void drink()

approachFood

public void approachFood()

approachRain

public void approachRain()

approachLightning

public void approachLightning()

avoid

public void avoid()

approach

public void approach(int type)