![]() |
Trax3 3.1.0
trax track library
|
The trax library implements the logic of track-guided vehicles, signaling, sensors, and cargo transportation. It leverages the NVIDIA PhysX engine to simulate train dynamics - on tracks and beyond.
This repository contains the mature core of trax version 3.0.0. Our mission: a physically realistic railroad simulation, built to last - with open ideas, better code, and shared success.
The library was used to build the railroad simulators EEP Train Simulator Mission and EEP TSM Gotthardbahn Nordrampe Modul Erstfeld. It also is part of the Eisenbahn.exe Professional (EEP) product line. There is a whitepaper that describes the basic ideas behind the library. The mathematical foundations for the railroad dynamics are described here.
The Trax GitHub Project produces a documentation from the source code using Doxygen. It contains a medium level overview as well as detailed description of the API. A ready generated version is available online: Trax Library Documentation.
Install these tools prior to following the installation instructions for the project.
Required:
Optional:
Currently there are two dependencies of the library:
Boost, referenced in the project by the environment variable BOOST_ROOT. From that we currently need the following libraries:
From these only the last one needs to get built. Follow the instructions for bulding and installing boost; alternatively, to simplify and speed up the process for our purposes, you can copy the
./Tools/BuildBoost.bat
file from the trax project (see 3. Installation) into the boost root and execute it.
PhysX, referenced by the environment variable PHYSX_ROOT. Open a command prompt with administrator rights and clone the main branch of the repository:
git clone https://github.com/NVIDIA-Omniverse/PhysX.git PhysX cd ./PhysX/physx setx PHYSX_ROOT "%CD%"
It provides a batch file that lets you create the project files for Visual Studio; we need a '64 bit CPU only' solution. Also the PhysX library has to link with the 'Multi-threaded DLL' runtime libary. That can be done, by editing the respective xml data files in the folder:
./physx/buildtools/presets/public
NV_USE_STATIC_WINCRT should be set to 'False':
<cmakeSwitch name="NV_USE_STATIC_WINCRT" value="False" comment="Use the statically linked windows CRT" />
Open the generated solution and build all the targets ('Release', 'Debug', 'Checked', 'Profile') for the 'INSTALL' project.
The first step would be to install the tools from the list (see above); download, build and install the dependencies and then get the latest version of trax from GitHub: open a new command prompt and with a valid account use git:
git clone https://github.com/Trend-Verlag/trax.git Trax3
There is a batch file (Install.bat) in the root folder of trax, that does necessary installations, like setting environment variables, generating project files with CMake, building the Debug version as a compile test and generates the documentation:
cd ./Trax3 ./Install.bat
Open the solution in the ./_Build folder, select 'Release' as a configuration, select the 'ALL_TESTS' project and build and run it.