19 #ifndef AGXPOWERLINE_POWER_LINE_CONTROLLER_H 20 #define AGXPOWERLINE_POWER_LINE_CONTROLLER_H 101 bool addPhysicalDimension(std::string name);
127 std::string getDimensionTypeName(
size_t id);
140 void setStoredPhysicalDimensionId(
int currentId,
int previousId);
150 bool hasStoredDimensionsMappings()
const;
160 int getStoredPhysicalDimensionId(
int currentId);
172 int getCurrentPhysicalDimensionId(
int storedId);
178 void clearStoredPhysicalDimensionIds();
181 void registerDefaultConnector(
184 ConnectorFactory connectorCreator);
215 void replaceIndexWhenRestoring(std::string name,
int index);
216 DimensionNameIdTable::iterator findIndex(
int index);
231 SINGLETON_CLASSNAME_METHOD()
Links two connections together.
agx::ref_ptr< PowerLinesHandler > PowerLinesHandlerRef
void AGXPHYSICS_EXPORT shutdown()
Shutdown of the AGX Dynamics API will be done when the number of shutdown matches the number of calls...
A std::pair, with both elements of the same type, and symmetric so (a, b) == (b, a) ...
Derive from this class to implement a listener for simulation step events.
void addPowerLine(agxPowerLine::PowerLine *powerLine)
Called from the PowerLine's addNotification, via the PowerLineController, when a PowerLine has been a...
const agxPowerLine::PowerLineRefVector & getPowerLines()
Provides read access to the list of PowerLines that are part of this PowerLinesHandler.
ConnectorFactoryTable m_connectorFactories
A PowerLinesHandler is a collection of PowerLines that are part of the same agxSDK::Simulation.
SimulationPowerLinesHash m_powerLinesInSimulation
agx::HashVector< int, int > m_storeRestoreIdTranslator
Each type of physical dimension handled by the power line has to have a unique name.
agx::SymmetricPair< agxPowerLine::PhysicalDimension::Type > DimTypePair
void removePowerLine(agxPowerLine::PowerLine *powerLine)
Called from the PowerLine's removeNotification, via the PowerLineController, when a PowerLine has bee...
agxPowerLine contains a collection of connected components that transport power across a system...
DimensionNameIdTable m_nameIdTable
Vector containing 'raw' data.
Smart pointer for handling referenced counted objects.
virtual void post(const agx::TimeStamp &time) override
Called after a step is taken in the simulation Implement this method in the derived class to get call...
agx::HashTable< agxSDK::Simulation *, PowerLinesHandlerRef > SimulationPowerLinesHash
AGXMODEL_EXPORT agxPowerLine::PhysicalDimension::Type getDimensionType(const std::string &dimensionName)
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
AGXBRICK_EXPORT bool isInitialized()
std::function< Connector *()> ConnectorFactory
virtual void pre(const agx::TimeStamp &time) override
Called before a step is taken in the simulation Implement this method in the derived class to get cal...
PowerLine is the base class for a system of power transfer integrated into the rigid body simulation...
Inheritance with partial specialization due to bug with ref_ptr containers.
agx::HashTable< DimTypePair, ConnectorFactory > ConnectorFactoryTable
agx::HashTable< std::string, int > DimensionNameIdTable
Base class for Singletons that should have its shutdown called explicitly before exit of the applicat...