|
XMT-O Reference Software | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xmto2xmta.MapRoot | +--xmto2xmta.mapanimation.AniAnimationBaseElement | +--xmto2xmta.mapanimation.AniSet
Class to handle the conversion of the set element.
History:
Field Summary | |
private static boolean |
debug_
Whether debug information is to be printed to the console. |
private java.util.ResourceBundle |
setRes_
|
private set |
treeSet_
|
private java.util.ResourceBundle |
xmto2XmtaRes_
|
Fields inherited from class xmto2xmta.mapanimation.AniAnimationBaseElement |
xmtaNodeContainerId_ |
Fields inherited from class xmto2xmta.MapRoot |
treeElement_, xmto2xmta_ |
Constructor Summary | |
AniSet()
|
Method Summary | |
private boolean |
createDeleteEventMapping(java.lang.String groupId)
Delete the group containing the conditionals and valuator. |
private boolean |
createDeleteMapping(ELASid elasId)
Don't do anything for the deletion. |
private boolean |
createInsertEventMapping(java.lang.String groupId)
Create the event mapping for the set element. |
private boolean |
createInsertEventMappingSensor(java.lang.String valuatorId,
TimingAttribute setInsertTime,
TimingAttribute setDeleteTime,
Sensorable sensorObject)
Create the sensor mapping for the set infrastructure for event timing. |
private boolean |
createInsertEventMappingTarget(org.w3c.dom.Element insertNodes,
java.lang.String valuatorId,
TimingAttribute setInsertTime,
TimingAttribute setDeleteTime,
Animatable animatableObject)
Create the target mapping for the set infrastructure for event timing. |
private boolean |
createInsertMapping(ELASid elasId)
Create the set infrastructure. |
private boolean |
createReplaceTarget(TimingAttribute setInsertTime)
Reset the target element's value. |
void |
doMapping()
|
private boolean |
doTimingMapping()
|
private boolean |
fillInReplace(org.w3c.dom.Element parNode,
java.lang.String animXmtaNodeId,
java.lang.String animXmtaAttrName,
java.lang.String animXmtaAttrValue)
Reset the target element's value. |
private boolean |
fillInReplaceDefsTarget(org.w3c.dom.Element parNodes,
Animatable target)
Reset the target element's value. |
private boolean |
fillInReplaceTimingTarget(org.w3c.dom.Element parNodes,
Animatable target,
ELASid targetElasId)
Reset the target element's value. |
private java.lang.String |
getXmtoAttrAttributeName()
Return the name of the attribute to be animated. |
void |
init(Xmto2Xmta xmto2xmta,
ConvertElement element)
|
static void |
setDebug(boolean debug)
Enable debugging information to be printed to the console. |
java.lang.String |
toString()
|
Methods inherited from class xmto2xmta.mapanimation.AniAnimationBaseElement |
getXmtaNodeContainerId |
Methods inherited from class xmto2xmta.MapRoot |
fireErrorEvent, fireErrorEvent, fireErrorEvent, getConvertElement |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static boolean debug_
private set treeSet_
private java.util.ResourceBundle xmto2XmtaRes_
private java.util.ResourceBundle setRes_
Constructor Detail |
public AniSet()
Method Detail |
private boolean createDeleteEventMapping(java.lang.String groupId)
All the conditionals and the valuator will be created under a group to make it easier to remove them all at the end of the set interval.
<par begin="???"> <Delete atNode"???"/> </par>
private boolean createDeleteMapping(ELASid elasId)
private boolean createInsertEventMapping(java.lang.String groupId)
In essence the structure of the set is to have a sensor object (from touchSensor) route an event to a valuator. The valuator converts the time event into a activate event. The activate event is routed to the conditional which contains the command to replace the value. The replace is the actual setting of the value.
The problem is that there can be multiple timing intervals for both the target and the sensor objects. There can also be multiple timing intervals for the set, but for now the event timing is only determined by the parent maximum begin and end. Thus it can look like the following:
timeline 0 5 10 15 20 25 sensor intervals **** **** **** **** **** set interval ************* target intervals ** ** ** ** ** ** ** **
In order to take care the multiple interval problems:
All the conditionals and the valuator will be created under a group to make it easier to remove them all at the end of the set interval.
Thus the normal event set infrastructure is:
<par begin="???"> <Insert atNode"???"> <group DEF="???"> <children> <Valuator DEF="???" Factor1="0" Offset1="1"/> </children> </group> </Insert> <Insert atNode"???"> <Conditional DEF="???"> <buffer> <Replace atNode="???" atField="??" value="???"/> </buffer> </Conditional> <ROUTE fromField="outSFBool" fromNode="???" toField="activate" toNode="???"/> </Insert> </par> <par begin="???"> <Insert> <ROUTE fromField="touchTime" fromNode="???" toField="inSFTime" toNode="???"/> </Insert> </par>
private boolean createInsertEventMappingSensor(java.lang.String valuatorId, TimingAttribute setInsertTime, TimingAttribute setDeleteTime, Sensorable sensorObject)
The route has to be inserted on the later of the insert time of the set interval and the insert time of the sensor interval.
<par begin="???"> <Insert> <ROUTE fromField="touchTime" fromNode="???" toField="inSFTime" toNode="???"/> </Insert> </par> <par begin="???"> <Replace atNode="???" atField="enabled" value="true"/> </par>
private boolean createInsertEventMappingTarget(org.w3c.dom.Element insertNodes, java.lang.String valuatorId, TimingAttribute setInsertTime, TimingAttribute setDeleteTime, Animatable animatableObject)
This method goes through all the intervals of the target element adding a conditional to replace the value, then connecting the conditional to the valuator with a route. In the case of a def object there is only one target interval.
Thus the steps for each target interval are:
<Conditional DEF="???"> <buffer> <Replace atNode="???" atField="??" value="???"/> </buffer> </Conditional> <ROUTE fromField="outSFBool" fromNode="???" toField="activate" toNode="???"/>
private boolean createInsertMapping(ELASid elasId)
<par begin="???"> <Replace atNode="???" atField="inSFInt32" value="1"/> <Delete atNode="???"/> </par>
private boolean createReplaceTarget(TimingAttribute setInsertTime)
<par begin="???"> <Replace atNode="???" atField="??" value="???"/> </par>
public void doMapping()
private boolean doTimingMapping()
private boolean fillInReplace(org.w3c.dom.Element parNode, java.lang.String animXmtaNodeId, java.lang.String animXmtaAttrName, java.lang.String animXmtaAttrValue)
<Replace atNode="???" atField="??" value="???"/>
private boolean fillInReplaceDefsTarget(org.w3c.dom.Element parNodes, Animatable target)
<Replace atNode="???" atField="??" value="???"/>
private boolean fillInReplaceTimingTarget(org.w3c.dom.Element parNodes, Animatable target, ELASid targetElasId)
<Replace atNode="???" atField="??" value="???"/>
private java.lang.String getXmtoAttrAttributeName()
public void init(Xmto2Xmta xmto2xmta, ConvertElement element) throws java.lang.Exception
init
in class MapRoot
public static void setDebug(boolean debug)
debug
- sets debug information is printedpublic java.lang.String toString()
toString
in class java.lang.Object
|
XMT-O Reference Software | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |