Interface for track loader modules, the track loader module is discovered and loaded during runtime.
More...
|
| file | track.h |
| | Track Structure and Track Loader Module Definition.
|
| |
|
| typedef tTrack *(* | tfTrackBuild) (char *filename) |
| | Read given track from filename into tTrack struct. More...
|
| |
| typedef tdble(* | tfTrackHeightG) (tTrackSeg *seg, tdble X, tdble Y) |
| | Returns the absolute height in meters of the road at the given global position. More...
|
| |
| typedef tdble(* | tfTrackHeightL) (tTrkLocPos *pos) |
| | Returns the absolute height in meters of the road at the local position. More...
|
| |
| typedef void(* | tfTrackGlobal2Local) (tTrackSeg *seg, tdble X, tdble Y, tTrkLocPos *pos, int type) |
| | Convert a global position (segment, X, Y) into a local position (segment, toRight, toStart) More...
|
| |
| typedef void(* | tfTrackLocal2Global) (tTrkLocPos *pos, tdble *X, tdble *Y) |
| | Convert a local position (segment, toRight, toStart) into a global one (X, Y) More...
|
| |
| typedef void(* | tfTrackSideNormal) (tTrackSeg *seg, tdble X, tdble Y, int side, t3Dd *norm) |
| | Get the normal vector (in global coordinate system) of the border of the track including the sides. More...
|
| |
| typedef void(* | tfTrackSurfaceNormal) (tTrkLocPos *pos, t3Dd *norm) |
| | Get the normal vector of the road (pointing upward). More...
|
| |
| typedef void(* | tfTrackShutdown) (void) |
| | Release current track and all its resources. More...
|
| |
Interface for track loader modules, the track loader module is discovered and loaded during runtime.
◆ tfTrackBuild
| typedef tTrack*(* tfTrackBuild) (char *filename) |
Read given track from filename into tTrack struct.
- Parameters
-
| [in] | filename | filename including path to file |
- Returns
- tTrack structure on success
- Note
- The given file must exist and must be correct
Definition at line 530 of file track.h.
◆ tfTrackGlobal2Local
Convert a global position (segment, X, Y) into a local position (segment, toRight, toStart)
- Parameters
-
| [in] | seg | Segment tTrackSeg to start search for coordinates |
| [in] | X | Global X coordinate |
| [in] | Y | Global Y coordinate |
| [in,out] | pos | tTrkLocPos passed from the caller to fill in the local position |
| [in] | type | Type of local position desired:
|
- See also
- RtTrackGlobal2Local
Definition at line 563 of file track.h.
◆ tfTrackHeightG
Returns the absolute height in meters of the road at the given global position.
- Parameters
-
| [in] | seg | Segment tTrackSeg to start search for coordinates |
| [in] | X | Global X coordinate |
| [in] | Y | Global Y coordinate |
- Returns
- Height in meters
- See also
- RtTrackHeightG
-
RtTrackHeightL
Definition at line 541 of file track.h.
◆ tfTrackHeightL
Returns the absolute height in meters of the road at the local position.
- Parameters
-
- Returns
- Height in meters
- See also
- RtTrackHeightL
Definition at line 549 of file track.h.
◆ tfTrackLocal2Global
Convert a local position (segment, toRight, toStart) into a global one (X, Y)
- Parameters
-
| [in] | pos | Local position |
| [in,out] | X | Pointer to tdble passed by the caller to fill in X position |
| [in,out] | Y | Pointer to tdble passed by the caller to fill in Y position |
- See also
- RtTrackLocal2Global
Definition at line 572 of file track.h.
◆ tfTrackShutdown
| typedef void(* tfTrackShutdown) (void) |
Release current track and all its resources.
Definition at line 598 of file track.h.
◆ tfTrackSideNormal
Get the normal vector (in global coordinate system) of the border of the track including the sides.
- Parameters
-
| [in] | seg | Current segment |
| [in] | X | Global X position |
| [in] | Y | Global Y position |
| [in] | side | Side where the normal is wanted
|
| [in,out] | norm | t3Dd passed from the caller to fill in the normalized side normal vector |
- See also
- RtTrackSideNormalG
Definition at line 585 of file track.h.
◆ tfTrackSurfaceNormal
Get the normal vector of the road (pointing upward).
- Parameters
-
| [in] | pos | Local position |
| [in,out] | norm | t3Dd passed from the caller to fill in the normal vector |
- See also
- RtTrackSurfaceNormalL
Definition at line 593 of file track.h.