|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectigeo.IObject
igeo.IAgent
public class IAgent
Class of an agent based on one point, extending IPoint and implements IDynamics
Field Summary | |
---|---|
boolean |
alive
|
int |
duration
|
boolean |
interactOverridden
check if a child class overrides void interact(IDynamics) or not |
java.util.ArrayList<IDynamics> |
localDynamics
|
IObject |
parent
|
java.util.ArrayList<IObject> |
targets
target objects to be updated by dynamic object |
int |
time
|
Fields inherited from class igeo.IObject |
---|
attribute, dynamics, graphics, parameter, server, userData |
Constructor Summary | |
---|---|
IAgent()
|
|
IAgent(IObject parent)
|
Method Summary | |
---|---|
void |
addDynamics(IDynamics dyna)
override IObject.addDynamics to manage dynamics locally. |
boolean |
alive()
|
IAgent |
clr(double dgray)
|
IAgent |
clr(double dgray,
double dalpha)
|
IAgent |
clr(double dr,
double dg,
double db)
|
IAgent |
clr(double dr,
double dg,
double db,
double da)
|
IAgent |
clr(float fgray)
|
IAgent |
clr(float fgray,
float falpha)
|
IAgent |
clr(float fr,
float fg,
float fb)
|
IAgent |
clr(float fr,
float fg,
float fb,
float fa)
|
IAgent |
clr(IColor c)
|
IAgent |
clr(IColor c,
double alpha)
to set color, with alpha value overwritten |
IAgent |
clr(IColor c,
float alpha)
to set color, with alpha value overwritten |
IAgent |
clr(IColor c,
int alpha)
to set color, with alpha value overwritten |
IAgent |
clr(int gray)
|
IAgent |
clr(int gray,
int alpha)
|
IAgent |
clr(int r,
int g,
int b)
|
IAgent |
clr(int r,
int g,
int b,
int a)
|
void |
del()
delete agent and stop it by removing it from dynamics server |
void |
del(boolean deleteGeometry)
stop agent with option of deleting/keeping the geometry the agent owns |
void |
deletDynamics(int index)
|
void |
deleteDynamics()
|
void |
deleteDynamics(IDynamics dyn)
|
int |
duration()
|
IAgent |
duration(int dur)
|
int |
dynamicsNum()
|
IDynamics |
getDynamics(int i)
|
IAgent |
hide()
|
IAgent |
hsb(double h,
double s,
double b)
|
IAgent |
hsb(double h,
double s,
double b,
double a)
|
IAgent |
hsb(float h,
float s,
float b)
|
IAgent |
hsb(float h,
float s,
float b,
float a)
|
void |
initAgent()
|
void |
interact(java.util.ArrayList<IDynamics> agents)
behavior definition of interaction with other dynamic objects. |
void |
interact(IDynamics agent)
|
IAgent |
layer(ILayer l)
Set layer by ILayer object |
java.util.ArrayList<IDynamics> |
localDynamics()
local dynamics are updated by IDynamics server too but not show up in interact's argument. |
IAgent |
name(java.lang.String nm)
methods of IObject |
IObject |
parent()
getting parent object |
ISubobject |
parent(IObject par)
setting parent object |
void |
postinteract(java.util.ArrayList<IDynamics> agents)
executed after interact(ArrayList |
void |
postupdate()
executed after update(). |
void |
preinteract(java.util.ArrayList<IDynamics> agents)
executed before interact(ArrayList |
void |
preupdate()
executed before update(). |
IAgent |
removeTarget(int i)
remove target object. |
IAgent |
removeTarget(IObject obj)
remove target object. |
IAgent |
setColor(double dgray)
|
IAgent |
setColor(double dgray,
double dalpha)
|
IAgent |
setColor(double dr,
double dg,
double db)
|
IAgent |
setColor(double dr,
double dg,
double db,
double da)
|
IAgent |
setColor(float fgray)
|
IAgent |
setColor(float fgray,
float falpha)
|
IAgent |
setColor(float fr,
float fg,
float fb)
|
IAgent |
setColor(float fr,
float fg,
float fb,
float fa)
|
IAgent |
setColor(IColor c)
|
IAgent |
setColor(IColor c,
double alpha)
|
IAgent |
setColor(IColor c,
float alpha)
|
IAgent |
setColor(IColor c,
int alpha)
|
IAgent |
setColor(int gray)
|
IAgent |
setColor(int gray,
int alpha)
|
IAgent |
setColor(int r,
int g,
int b)
|
IAgent |
setColor(int r,
int g,
int b,
int a)
|
IAgent |
setHSBColor(double h,
double s,
double b)
|
IAgent |
setHSBColor(double h,
double s,
double b,
double a)
|
IAgent |
setHSBColor(float h,
float s,
float b)
|
IAgent |
setHSBColor(float h,
float s,
float b,
float a)
|
IAgent |
show()
|
IObject |
target(int i)
get target object. |
IAgent |
target(IObject targetObj)
add terget object to be updated by this dynamic object. |
int |
targetNum()
get total target number. |
java.util.ArrayList<IObject> |
targets()
get all target objects. |
int |
time()
|
IAgent |
time(int tm)
not recommended to use. |
void |
update()
behavior definition of updating dynamics in each time frame |
void |
updateGraphic()
update graphic when control point location changes or some minor change. |
void |
updateTarget()
update all terget objects (should be called when the dynamic object is updated). |
IAgent |
weight(double w)
|
IAgent |
weight(float w)
|
Methods inherited from class igeo.IObject |
---|
addUserData, addUserData, alpha, alphaInt, attr, attr, attr, awtColor, blue, blueInt, castStringHashMap, clearDynamics, clearGraphics, clr, clr, clr, clr, clr, cp, createGraphic, defaultAttribute, deleteGraphic, dup, getAWTColor, getColor, getGraphic, getGraphic, getParameter, graphicsNum, gray, grayInt, green, greenInt, greyInt, initGraphic, initObject, isValid, isVisible, layer, layer, name, red, redInt, resetGraphic, server, setColor, setColor, setColor, setColor, setParameter, syncColor, syncGraphic, syncVisibility, syncWeight, userData, userData, userData, userDataNum, visible, weight |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public IObject parent
public java.util.ArrayList<IObject> targets
public java.util.ArrayList<IDynamics> localDynamics
public int time
public int duration
public boolean alive
public boolean interactOverridden
Constructor Detail |
---|
public IAgent()
public IAgent(IObject parent)
Method Detail |
---|
public void initAgent()
public void addDynamics(IDynamics dyna)
addDynamics
in class IObject
public IDynamics getDynamics(int i)
getDynamics
in class IObject
public int dynamicsNum()
dynamicsNum
in class IObject
public void deleteDynamics()
deleteDynamics
in class IObject
public void deletDynamics(int index)
deletDynamics
in class IObject
public void deleteDynamics(IDynamics dyn)
deleteDynamics
in class IObject
public void del()
del
in class IObject
public void del(boolean deleteGeometry)
public void updateGraphic()
IObject
updateGraphic
in class IObject
public IObject parent()
ISubobject
parent
in interface ISubobject
public ISubobject parent(IObject par)
ISubobject
parent
in interface ISubobject
public java.util.ArrayList<IDynamics> localDynamics()
localDynamics
in interface IDynamics
public IAgent target(IObject targetObj)
target
in interface IDynamics
public int targetNum()
targetNum
in interface IDynamics
public IObject target(int i)
target
in interface IDynamics
public java.util.ArrayList<IObject> targets()
targets
in interface IDynamics
public IAgent removeTarget(int i)
removeTarget
in interface IDynamics
public IAgent removeTarget(IObject obj)
removeTarget
in interface IDynamics
public void updateTarget()
updateTarget
in interface IDynamics
public boolean alive()
public int time()
public IAgent time(int tm)
public int duration()
public IAgent duration(int dur)
public void preinteract(java.util.ArrayList<IDynamics> agents)
IDynamics
preinteract
in interface IDynamics
public void interact(java.util.ArrayList<IDynamics> agents)
IDynamics
interact
in interface IDynamics
public void interact(IDynamics agent)
public void postinteract(java.util.ArrayList<IDynamics> agents)
IDynamics
postinteract
in interface IDynamics
public void preupdate()
IDynamics
preupdate
in interface IDynamics
public void update()
IDynamics
update
in interface IDynamics
public void postupdate()
IDynamics
postupdate
in interface IDynamics
public IAgent name(java.lang.String nm)
name
in class IObject
public IAgent layer(ILayer l)
IObject
layer
in class IObject
public IAgent hide()
hide
in class IObject
public IAgent show()
show
in class IObject
public IAgent clr(IColor c)
clr
in class IObject
public IAgent clr(IColor c, int alpha)
IObject
clr
in class IObject
public IAgent clr(IColor c, float alpha)
IObject
clr
in class IObject
public IAgent clr(IColor c, double alpha)
IObject
clr
in class IObject
public IAgent clr(int gray)
clr
in class IObject
public IAgent clr(float fgray)
clr
in class IObject
public IAgent clr(double dgray)
clr
in class IObject
public IAgent clr(int gray, int alpha)
clr
in class IObject
public IAgent clr(float fgray, float falpha)
clr
in class IObject
public IAgent clr(double dgray, double dalpha)
clr
in class IObject
public IAgent clr(int r, int g, int b)
clr
in class IObject
public IAgent clr(float fr, float fg, float fb)
clr
in class IObject
public IAgent clr(double dr, double dg, double db)
clr
in class IObject
public IAgent clr(int r, int g, int b, int a)
clr
in class IObject
public IAgent clr(float fr, float fg, float fb, float fa)
clr
in class IObject
public IAgent clr(double dr, double dg, double db, double da)
clr
in class IObject
public IAgent hsb(float h, float s, float b, float a)
hsb
in class IObject
public IAgent hsb(double h, double s, double b, double a)
hsb
in class IObject
public IAgent hsb(float h, float s, float b)
hsb
in class IObject
public IAgent hsb(double h, double s, double b)
hsb
in class IObject
public IAgent weight(float w)
weight
in class IObject
public IAgent weight(double w)
weight
in class IObject
public IAgent setColor(IColor c)
setColor
in class IObject
public IAgent setColor(IColor c, int alpha)
setColor
in class IObject
public IAgent setColor(IColor c, float alpha)
setColor
in class IObject
public IAgent setColor(IColor c, double alpha)
setColor
in class IObject
public IAgent setColor(int gray)
setColor
in class IObject
public IAgent setColor(float fgray)
setColor
in class IObject
public IAgent setColor(double dgray)
setColor
in class IObject
public IAgent setColor(int gray, int alpha)
setColor
in class IObject
public IAgent setColor(float fgray, float falpha)
setColor
in class IObject
public IAgent setColor(double dgray, double dalpha)
setColor
in class IObject
public IAgent setColor(int r, int g, int b)
setColor
in class IObject
public IAgent setColor(float fr, float fg, float fb)
setColor
in class IObject
public IAgent setColor(double dr, double dg, double db)
setColor
in class IObject
public IAgent setColor(int r, int g, int b, int a)
setColor
in class IObject
public IAgent setColor(float fr, float fg, float fb, float fa)
setColor
in class IObject
public IAgent setColor(double dr, double dg, double db, double da)
setColor
in class IObject
public IAgent setHSBColor(float h, float s, float b, float a)
setHSBColor
in class IObject
public IAgent setHSBColor(double h, double s, double b, double a)
setHSBColor
in class IObject
public IAgent setHSBColor(float h, float s, float b)
setHSBColor
in class IObject
public IAgent setHSBColor(double h, double s, double b)
setHSBColor
in class IObject
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |