29#include "trax/Identified.h"
30#include "Collection.h"
31#include "CollectionDecorator.h"
38 template<
typename>
struct Sphere;
47 Identified<TrackCollection>
50 static dclspc std::unique_ptr<TrackCollection>
Make() noexcept;
130 TrackCollectionDecorator() =
delete;
Home of the Track and TrackBuilder interfaces.
CollectionDecorator(std::shared_ptr< InterfaceType > pComponent)
Definition CollectionDecorator.h:58
The base for decorator implementations. Needed as BaseDecorator to combine other decorator implemente...
Definition ObjectIDDecorator.h:27
std::shared_ptr< InterfaceType > m_pComponent
Definition ObjectIDDecorator.h:54
A Location specifies a position on a track system by referencing a track and a TrackLocation on it.
Definition Location.h:110
A decorator for identification part of trax objects.
Definition ObjectIDDecorator.h:90
TrackCollectionDecorator(std::shared_ptr< TrackCollection > pTrackCollection)
Constructs the decorator.
Definition TrackCollection.h:134
const spat::Frame< Length, One > & GetFrame() const noexcept override
Gets the frame of references for this TrackCollection relative to the Module.
Definition TrackCollection.h:142
void SetFrame(const spat::Frame< Length, One > &frame) noexcept override
Sets the frame of references for this TrackCollection relative to the Module.
Definition TrackCollection.h:138
TrackCollection ComponentType
Type of the decoree.
Definition TrackCollection.h:127
Value< Dimension< 0, 0, 0 > > One
Dimensionless value.
Definition DimensionedValues.h:319
Value< Dimension< 1, 0, 0 > > Length
Length.
Definition DimensionedValues.h:324
constexpr Angle pi
Circle number pi.
Definition DimensionedValues.h:1145
constexpr Real _m(Length l) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1210
Value< Dimension< 0, 0, 0 > > Angle
Angle in radians.
Definition DimensionedValues.h:320
The namespace provides classes and methods for spatial computations.
Definition Box.h:32
Namespace of all the trax track libraries classes and methods.
Definition Collection.h:17
std::pair< std::shared_ptr< TrackBuilder >, Track::EndType > dclspc Snap(const TrackCollection &collection, TrackBuilder &track, Track::EndType endType, Length maxDistance, bool bUncoupled=true)
Moves a track so that one of it's ends aligns to another track end in a collection.
std::vector< std::tuple< std::shared_ptr< TrackBuilder >, Track::EndType, Length > > dclspc FindTrackEnds(const TrackCollection &collection, const spat::Sphere< Length > &area, bool sort=false)
Finds all track ends in the area.
std::vector< std::pair< Location, Length > > dclspc FindTrackLocations(const TrackCollection &collection, const spat::Sphere< Length > &area, bool sort=false)
Finds all tracks that run trough an area.
std::pair< std::shared_ptr< TrackBuilder >, Track::EndType > dclspc Couple(const TrackCollection &collection, TrackBuilder &track, Track::EndType endType, Length maxDistance=1_m, Angle maxKink=pi, bool bSilent=true)
Searches open track ends inside an area around a given track end and couples to the closest.
A Frame ("TNBFrame") describes a location in 3d space and an orientation using a right handed coordin...
Definition Frame.h:52
Sphere with center and radius.
Definition Sphere.h:39
Implements a Vector bundle.
Definition VectorBundle.h:42
Interface for making and shaping tracks.
Definition Track.h:831
Collection to hold a set of Track objects.
Definition TrackCollection.h:48
static dclspc std::unique_ptr< TrackCollection > Make() noexcept
Makes a standard TrackCollection object.
virtual void SetFrame(const spat::Frame< Length, One > &frame) noexcept=0
Sets the frame of references for this TrackCollection relative to the Module.
virtual const spat::Frame< Length, One > & GetFrame() const noexcept=0
Gets the frame of references for this TrackCollection relative to the Module.
Interface for a track used to calculate 3D positions.
Definition Track.h:275