Example Track Geometry "ABI" – step 0022 – December 2009

1 Purpose of SrrTrackGeometryABI

SrrTrackGeometryABI holds the geometric properties of a track edge, which are calculated during the initialization.

The initialization is triggered automatically by SrrTrackEdge and will result in delivery of MFVec3f values, that describe the geometry of the track section and can be used to calculate meshes to display the track edge visually.

Additionally the SrrTrackGeometryABI supports the SrrAxle object in calculation of its transformation, but this is invisible to the user (see a description of the miGeo interface in the paper “how to build my own tracks and turnouts”, available at http://simulrr.wordpress.com/download-area#docu).

2 User Interface of SrrTrackGeometryABI (uiObj)

<ProtoDeclare name='SrrTrackGeometryABI'>

<ProtoInterface>

<field accessType='inputOutput' name='vectorA' type='SFVec3f'/>

<field accessType='inputOutput' name='vectorB' type='SFVec3f'/>

<field accessType='inputOutput' name='vectorI' type='SFVec3f'/>

<field accessType='inputOutput' name='normalA' type='SFVec3f'/>

<field accessType='inputOutput' name='normalB' type='SFVec3f'/>

<field accessType='inputOutput' name='objId' type='SFString'/>

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

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

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

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

<field accessType='inputOutput' name='trackCoordinates' type='MFVec3f'/>

<field accessType='inputOutput' name='alongVectors' type='MFVec3f'/>

<field accessType='inputOutput' name='normalVectors' type='MFVec3f'/>

<field accessType='inputOnly' name='calculateAxleTransformation' type='SFNode'/>

</ProtoInterface>



The fields objId, modParam, initialized, length and calculateAxleTransformation are used SRR internally and need not be described here.

The fields vectorA, vectorB, vectorI, normalA, normalB and trackElementLength describe the concrete geometry of the track edge and are set by the user (author of track/turnout model) before he starts the initialization of the containing SrrBasicTrackSection/SrrBasicTurnout2Way.

The meaning of these parameters is described in following figure.




After the initialization trackCoordinates contains position length/trackElementLength +1 vectors of an open polygon, that describes the middle line of the track (index 0 denotes point “A”, index length/trackElementLength denotes point “B”).

alongVectors are unit vectors that point from A to B “along the axis of the track” and normalVectors point “up”.

trackElementLength is updated so that length/trackElementLength is an integer number.