|
|||||||||
| Home >> All >> com >> trapezium >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.trapezium.bean
Class BehaviorBean

java.lang.Objectcom.trapezium.bean.BehaviorBean
- All Implemented Interfaces:
- com.trapezium.humanoid.Humanoid_1_0, java.io.Serializable
- public class BehaviorBean
- extends java.lang.Object
- implements java.io.Serializable, com.trapezium.humanoid.Humanoid_1_0
- extends java.lang.Object
The BehaviorBean contains the set of DEFs and associated ROUTEs for a particular behavior. At the moment, it uses an "ultimate" root, which is the first ROUTE in a chain of ROUTEs. This might not be appropriate, since this might be some sort of sensor with associated geometry. An alternate approach, which might be better in other cases is to just use the first TimeSensor encountered as the "ultimate" root.
| Field Summary | |
(package private) java.util.Vector |
defs
|
(package private) java.util.Hashtable |
defToJoint
|
(package private) java.util.Hashtable |
jointToDef
|
(package private) int[] |
modificationPoints
|
(package private) int[] |
modificationValue
|
(package private) int |
mpidx
|
(package private) java.util.Vector |
routes
|
(package private) java.util.Vector |
sensorContainingNodes
|
(package private) com.trapezium.vrml.ROUTE |
ultimate
|
| Fields inherited from interface com.trapezium.humanoid.Humanoid_1_0 |
jointNames, l_acromioclavicular, l_ankle, l_elbow, l_hip, l_index1, l_index2, l_index3, l_knee, l_metatarsal, l_middle1, l_middle2, l_middle3, l_midtarsal, l_pinky1, l_pinky2, l_pinky3, l_ring1, l_ring2, l_ring3, l_shoulder, l_sternoclavicular, l_subtalar, l_thumb1, l_thumb2, l_thumb3, l_wrist, NumberJoints, r_acromioclavicular, r_ankle, r_elbow, r_hip, r_index1, r_index2, r_index3, r_knee, r_metatarsal, r_middle1, r_middle2, r_middle3, r_midtarsal, r_pinky1, r_pinky2, r_pinky3, r_ring1, r_ring2, r_ring3, r_shoulder, r_sternoclavicular, r_subtalar, r_thumb1, r_thumb2, r_thumb3, r_wrist, sacroiliac, skullbase, v15, vc1, vc2, vc3, vc4, vc5, vc6, vc7, vl1, vl2, vl3, vl4, vt1, vt10, vt11, vt12, vt2, vt3, vt4, vt5, vt6, vt7, vt8, vt9 |
| Constructor Summary | |
BehaviorBean(com.trapezium.vrml.ROUTE ultimate,
java.util.Hashtable defToJoint,
java.util.Hashtable jointToDef)
|
|
| Method Summary | |
(package private) void |
addModificationPoint(int offset,
int value)
|
void |
addSensorContainingNode(com.trapezium.vrml.node.Node n)
Add a sensor containing node |
(package private) void |
generateDEF(java.io.PrintStream ps,
java.lang.String defName,
com.trapezium.vrml.Scene scene,
com.trapezium.parse.TokenEnumerator te,
java.util.Hashtable defsGenerated,
java.util.Hashtable generatedPROTOs)
Generate text for a single DEF. |
(package private) void |
generateDEFs(java.io.PrintStream ps,
java.util.Hashtable defsGenerated,
java.util.Hashtable generatedPROTOs,
com.trapezium.vrml.Scene scene)
Generate text for all the DEFs used by this behavior. |
(package private) void |
generateRoute(java.io.PrintStream ps,
java.util.Hashtable beanJointToDef,
com.trapezium.vrml.ROUTE r)
Generate text for a ROUTE |
void |
generateVRML(HumanBean humanBean,
java.io.PrintStream ps,
int behaviorNumber,
java.util.Hashtable defsGenerated,
java.util.Vector generatedRoutes,
java.util.Hashtable generatedPROTOs)
Generate VRML for this, using DEF names from the humanoid if the ROUTE is referring to a Joint. |
(package private) com.trapezium.vrml.node.DEFUSENode |
getContainingDEF(com.trapezium.vrml.Scene scene,
int defOffset)
Get the DEF that contains another DEF |
(package private) int |
getModifiedEndValue(int offset)
|
(package private) int |
getModifiedStartValue(int offset)
|
(package private) com.trapezium.vrml.node.Node |
getSensorContainingNode(int offset)
Get the non-DEFfed node that contains this one, this is used for the case where we have to also generate a sensor node parent, since the sensor only makes sense in the context of its parent. |
(package private) void |
replaceDEF(java.lang.String originalName,
java.lang.String newName,
com.trapezium.vrml.Scene scene)
|
void |
saveDEF(java.lang.String defName)
Save DEF info, but only for DEFs that aren't joints. |
void |
saveROUTE(com.trapezium.vrml.ROUTE route)
Save ROUTE info. |
private void |
writeObject(java.io.ObjectOutputStream stream)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
defs
java.util.Vector defs
routes
java.util.Vector routes
sensorContainingNodes
java.util.Vector sensorContainingNodes
defToJoint
java.util.Hashtable defToJoint
jointToDef
java.util.Hashtable jointToDef
ultimate
com.trapezium.vrml.ROUTE ultimate
modificationPoints
int[] modificationPoints
modificationValue
int[] modificationValue
mpidx
int mpidx
| Constructor Detail |
BehaviorBean
public BehaviorBean(com.trapezium.vrml.ROUTE ultimate, java.util.Hashtable defToJoint, java.util.Hashtable jointToDef)
| Method Detail |
addModificationPoint
void addModificationPoint(int offset,
int value)
getModifiedStartValue
int getModifiedStartValue(int offset)
getModifiedEndValue
int getModifiedEndValue(int offset)
writeObject
private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException
saveROUTE
public void saveROUTE(com.trapezium.vrml.ROUTE route)
- Save ROUTE info.
saveDEF
public void saveDEF(java.lang.String defName)
- Save DEF info, but only for DEFs that aren't joints.
generateVRML
public void generateVRML(HumanBean humanBean, java.io.PrintStream ps, int behaviorNumber, java.util.Hashtable defsGenerated, java.util.Vector generatedRoutes, java.util.Hashtable generatedPROTOs)
- Generate VRML for this, using DEF names from the humanoid
if the ROUTE is referring to a Joint.
replaceDEF
void replaceDEF(java.lang.String originalName, java.lang.String newName, com.trapezium.vrml.Scene scene)
generateDEFs
void generateDEFs(java.io.PrintStream ps, java.util.Hashtable defsGenerated, java.util.Hashtable generatedPROTOs, com.trapezium.vrml.Scene scene)
- Generate text for all the DEFs used by this behavior. The DEFs listed
in this behavior are only the ones that are used by the behavior, but
are not Joint DEFs.
generateDEF
void generateDEF(java.io.PrintStream ps, java.lang.String defName, com.trapezium.vrml.Scene scene, com.trapezium.parse.TokenEnumerator te, java.util.Hashtable defsGenerated, java.util.Hashtable generatedPROTOs)
- Generate text for a single DEF. If that DEF is totally contained in another DEF,
then generate text for that other DEF (unless it was done already).
getSensorContainingNode
com.trapezium.vrml.node.Node getSensorContainingNode(int offset)
- Get the non-DEFfed node that contains this one, this is used
for the case where we have to also generate a sensor node parent,
since the sensor only makes sense in the context of its parent.
addSensorContainingNode
public void addSensorContainingNode(com.trapezium.vrml.node.Node n)
- Add a sensor containing node
getContainingDEF
com.trapezium.vrml.node.DEFUSENode getContainingDEF(com.trapezium.vrml.Scene scene, int defOffset)
- Get the DEF that contains another DEF
generateRoute
void generateRoute(java.io.PrintStream ps, java.util.Hashtable beanJointToDef, com.trapezium.vrml.ROUTE r)
- Generate text for a ROUTE
|
|||||||||
| Home >> All >> com >> trapezium >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.trapezium.bean.BehaviorBean