Floating Point Control Type B – step 0031 – February 2010

1 Purpose of SrrControlFloatB

SrrTrains Controls are a multiplayer-capable means for building user interfaces of cabs in SrrTrains vehicles.

The floating point control type B provides the ability to globally maintain the state of a plane sensor, and to calculate a floating point value from the state of the plane sensor.

Currently this control can be practically used to set the dozing force in the SrrWagon2axA specific vehicle prototype.

SrrControlFloatB creates and uses a network sensor with the streamName/networkSensorId Srr Vehicle <objId>.

2 User Interface of SrrControlFloatB (uiObj)

SrrControlFloatB is an external prototype that is available at the directory srr/.

<ProtoDeclare name="SrrControlFloatB">

<ProtoInterface>

<field accessType='inputOutput' name='objType' type='SFString' value='SrrControlFloatB'/>

<field accessType='inputOutput' name='version' type='SFFloat' value='0.0031'/>

<field accessType='inputOutput' name='parentCab' type='SFNode'/>

<field accessType='inputOnly' name='basicInitialization' type='SFInt32'/>

<field accessType='outputOnly' name='basicallyInitialized' type='SFNode'/>

<field accessType='inputOutput' name='unit' type='SFVec3f' value='1 0 0'/>

<field accessType='inputOutput' name='initialValue' type='SFVec3f' value='0 0 0'/>

<field accessType='inputOutput' name='value' type='SFFloat'/>

<field accessType='inputOutput' name='autoCenter' type='SFBool' value='true'/>

<field accessType='inputOnly' name='requestIsActive' type='SFBool'/>

<field accessType='inputOnly' name='requestTranslation' type='SFVec3f'/>

<field accessType='outputOnly' name='enabled' type='SFBool' value="true"/>

<field accessType='outputOnly' name='translation' type='SFVec3f'/>

<field accessType='outputOnly' name='offset' type='SFVec3f'/>

</ProtoInterface>

The fields parentCab, basicInitialization and basicallyInitialized are used in the SRR framework and in other SRR objects internally and need not be described here.

In initialValue you can set the initial value of the plane sensor (translation).

The flag autoCenter indicates whether you want the plane sensor to “snap back” to the initialValue, when the end user releases the mouse button.

The fields requestIsActive and requestTranslation should be taken from the fields isActive and translation of the plane sensor, respectively.

The field enabled should be routed to the field enabled of the plane sensor.

The field offset should be routed to the field offset of the plane sensor.

The field translation should be routed to the field translation of the <Transform> node.

The vector unit describes the unit vector, that is used for the calculation of the value of the floating point control: value = translation.dot(unit) / (unit.dot(unit))