Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
FixturesTrain.h
1// trax track library
2// AD 2024
3//
4// "the resolution of all the fruitless searches"
5//
6// Peter Gabriel
7//
8//
9// Copyright (c) 2025 Trend Redaktions- und Verlagsgesellschaft mbH
10// Copyright (c) 2019 Marc-Michael Horstmann
11//
12// Permission is hereby granted to any person obtaining a copy of this software
13// and associated source code (the "Software"), to use, view, and study the
14// Software for personal or internal business purposes, subject to the following
15// conditions:
16//
17// 1. Redistribution, modification, sublicensing, or commercial use of the
18// Software is NOT permitted without prior written consent from the copyright
19// holder.
20//
21// 2. The Software is provided "AS IS", without warranty of any kind, express
22// or implied.
23//
24// 3. All copies of the Software must retain this license notice.
25//
26// For further information, please contact: horstmann.marc@trendverlag.de
27
28#pragma once
29
30
31#include "trax/support/Fixtures.h"
32
33#include "trax/rigid/StaticTrack.h"
34#include "trax/rigid/Simulator.h"
35#include "trax/rigid/Scene.h"
36
37namespace trax{
38 struct TrackSystem;
39}
40
41struct TrainFixture : FixtureBase{
42 TrainFixture( bool bVisualDebugger = false );
43 ~TrainFixture();
44
45 std::unique_ptr<trax::Simulator> m_pSimulator;
46 std::unique_ptr<trax::Scene> m_pScene;
47
48 std::shared_ptr<trax::StaticTrack> m_pTrack1;
49 std::shared_ptr<trax::StaticTrack> m_pTrack2;
50 std::shared_ptr<trax::StaticTrack> m_pTrack3;
51 std::shared_ptr<trax::StaticTrack> m_pTrack4;
52 std::shared_ptr<trax::StaticTrack> m_pTrack5;
53 std::shared_ptr<trax::StaticTrack> m_pTrack6;
54
55 std::shared_ptr<trax::ArcP> m_pArc1;
56 std::shared_ptr<trax::ArcP> m_pArc2;
57 std::shared_ptr<trax::ArcP> m_pArc3;
58 std::shared_ptr<trax::ArcP> m_pArc4;
59 std::shared_ptr<trax::Line> m_pLine1;
60
61 trax::Location m_Location;
62
64};
65
66struct TrainFixtureVisualDebugger : TrainFixture{
67 TrainFixtureVisualDebugger() : TrainFixture( true ){}
68};
69
70
71struct MultiTrackSystemFixture : FixtureBase
72{
73 MultiTrackSystemFixture( bool bVisualDebugger = false );
74 ~MultiTrackSystemFixture();
75
76 void BuildFixture( int nTrackCollections );
77
78 std::unique_ptr<trax::Simulator> m_pSimulator;
79 std::unique_ptr<trax::Scene> m_pScene;
80 std::shared_ptr<trax::TrackSystem> m_pTrackSystem;
81};
82
83struct MultiTrackSystemFixtureVisualDebugger : MultiTrackSystemFixture
84{
85 MultiTrackSystemFixtureVisualDebugger() : MultiTrackSystemFixture( true ){}
86};
A Location specifies a position on a track system by referencing a track and a TrackLocation on it.
Definition Location.h:110
Value< Dimension< 1, 0, 0 > > Length
Length.
Definition DimensionedValues.h:324
Namespace of all the trax track libraries classes and methods.
Definition Collection.h:17
Definition Fixtures.h:37
A track system is the container for tracks.
Definition TrackSystem.h:56