207#include "Identified.h"
209#include "ConnectorType.h"
219 struct ConnectorUserData;
243 virtual
void Toggle(
bool pulse = true ) = 0;
249 virtual
void Set( const
Track& trackA,
Track::EndType trackendA, const
Track& trackB,
Track::EndType trackendB,
bool pulse = true ) = 0;
308 virtual
bool Check(
std::ostream& os,
Length e_distance = epsilon__length,
Angle e_kink = epsilon__angle,
Angle e_twist = epsilon__angle ) const noexcept = 0;
352 virtual
void UserData( ConnectorUserData* pData ) noexcept = 0;
356 virtual ConnectorUserData*
UserData() const noexcept = 0;
395 bool connectAnyway = false );
Home of the Track and TrackBuilder interfaces.
A Location specifies a position on a track system by referencing a track and a TrackLocation on it.
Definition Location.h:110
Value< Dimension< 0, 0, 0 > > One
Dimensionless value.
Definition DimensionedValues.h:319
Value< Dimension< 1, 0, 0 > > Length
Length.
Definition DimensionedValues.h:324
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
dclspc void DeCouple(TrackBuilder &track, Track::EndType trackEnd, int ownerSlot=-1)
Uncouples a track end by clearing any Connectors.
dclspc Location GetFarEndLocation(const Connector &connector, int slotID)
dclspc spat::Vector< Length > DistanceToOtherEnd(const Connector &connector, int fromSlot)
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.
dclspc Location GetEndLocation(const Connector &connector, int slotID)
A Frame ("TNBFrame") describes a location in 3d space and an orientation using a right handed coordin...
Definition Frame.h:52
Implements a 3D - vector in cartesian coordinates.
Definition Vector.h:48
A Connector rearranges the connections between several track ends.
Definition Connector.h:226
virtual void RegisterSockets(SocketRegistry &modul)=0
Registers all the Plugs with the module and supplies the Jacks with plug ids for connecting.
virtual void Toggle(bool pulse=true)=0
Sets the connector to the next setting.
virtual bool IsComplete() const =0
virtual Jack & JackOnChange() noexcept=0
virtual void Set(const Track &trackA, Track::EndType trackendA, const Track &trackB, Track::EndType trackendB, bool pulse=true)=0
Sets the Connector to the setting that connects the two track ends.
virtual ConnectorType GetConnectorType() const noexcept=0
virtual void SwapSlots(int slotA, int slotB)=0
Exchanges the content of the two slots.
virtual void Clear(int slot)=0
clears the slot with index slot.
virtual void GetCenter(spat::Frame< Length, One > ¢er) const =0
Gets the center of the tracks the connector is connecting.
virtual MultiPlug & PlugToToggle() noexcept=0
virtual int CntSlots() const noexcept=0
virtual bool IsValid() const noexcept=0
Checks whether the connector is valid.
virtual void Disconnect()=0
Disconnects all track ends from each other.
virtual void UnregisterSockets(SocketRegistry &modul)=0
Removes all references to Plugs and Jacks from the module.
virtual void UserData(ConnectorUserData *pData) noexcept=0
Sets a pointer to user provided data.
virtual bool Check(std::ostream &os, Length e_distance=epsilon__length, Angle e_kink=epsilon__angle, Angle e_twist=epsilon__angle) const noexcept=0
Checks the connector for consistency.
virtual int Slot(int slot, std::shared_ptr< TrackBuilder > pTrack, Track::EndType trackend, bool connectAnonymous=false)=0
Populates a slot with a tracks end.
virtual const char * TypeName() const noexcept=0
A jack a plug can get connected with.
Definition Jack.h:83
A MultiPlug provides a variable number of actual Plugs to one input slot.
Definition Plug.h:307
Interface for a registry that reconnects Plugs and Jacks according to their IDs.
Definition SocketRegistry.h:40
Interface for making and shaping tracks.
Definition Track.h:831
Interface for a track used to calculate 3D positions.
Definition Track.h:275