17 #ifndef AGXPOWERLINE_POWER_LINE_H 18 #define AGXPOWERLINE_POWER_LINE_H 48 #define POWER_LINE_DEBUG 0 55 class PowerLinesHandler;
87 void createConstraintHolder();
99 void setAddUnitsOnConnect(
agx::Bool addOnConnect);
139 size_t getNumUnits()
const;
140 size_t getNumConnectors()
const;
158 template <
typename T>
173 void insertSubGraphRouterTemporary(
SubGraph* router);
175 void insertConnectorTemporary(
Connector* connector );
177 void collectConstraintsToHolder();
183 bool writeDimensionsGraph(
const agx::String& path)
const;
184 bool writeDimensionsGraph(
const char* path)
const;
228 static bool renderDebug();
272 bool hasCachedOperations()
const;
285 virtual void initialize();
290 void prepareConstraintDimensions();
292 bool preUpdateGraph();
306 bool shouldRenderDebug();
331 template <
typename T>
334 for (
auto& unit : m_units)
336 T* asT =
dynamic_cast<T*
>(unit.get());
337 if (unit->getName() == name && asT !=
nullptr)
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
Links two connections together.
PowerLineTraverser that stores the nodes it visits.
Utility class to hold custom implementations of constraints.
agx::ref_ptr< PowerLine > PowerLineRef
agx::HashVector< agxPowerLine::Unit *, agxPowerLine::PowerLine * > UnitPtrPowerLinePtrHashVector
agx::VectorPOD< PowerLine *> PowerLinePtrVector
Unit * getUnit(const agx::Name &name)
Find and return the first unit with the given name, if any exist.
The SlotMapper is reponsible for mapping one dimensional dimension states to slots in the RigidBodies...
A PowerLinesHandler is a collection of PowerLines that are part of the same agxSDK::Simulation.
virtual void removeNotification(agxSDK::Simulation *)
Called when this assembly is removed from a simulation.
agxPowerLine::SlotMapperRef m_slotMapper
agxPowerLine::SubGraphRefVector m_cachedRemoves
Representation of a name string.
agxPowerLine contains a collection of connected components that transport power across a system...
agxUtil::ConstraintHolderRef m_constraintHolder
agxPowerLine::ConnectorRefSet m_connectors
agx::HashVector< agxPowerLine::SubGraph *, bool > SubGraphRouterBoolHashVector
agx::HashVector< agxPowerLine::Connector *, bool > ConnectorBoolHashVector
Vector containing 'raw' data.
agx::observer_ptr< PowerLine > PowerLineObsPtr
agx::Vector< PowerLineRef > PowerLineRefVector
ConnectorBoolHashVector m_tempConnectorHashVector
Smart pointer for handling referenced counted objects.
virtual void removeNotification(agxSDK::Assembly *) override
Called when this assembly is removed from another assembly.
agx::Constraint::SolveType m_solveType
agx::observer_ptr< agx::RigidBody > m_parentBody
virtual void addNotification(agxSDK::Assembly *) override
Called when this assembly is added to another assembly.
agxPowerLine::SubGraphRefVector m_cachedAdds
bool m_cacheAddsAndRemoves
AGXMODEL_EXPORT agxPowerLine::PhysicalDimension::Type getDimensionType(const std::string &dimensionName)
Abstract base class for storing/restoring a line/drums with version control.
SolveType
Specifies in what solvers the constraint will be solved.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
virtual void addNotification(agxSDK::Simulation *)
Called when this assembly is added to a simulation (given that it not already is in the simulation)...
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
SubGraphRouterBoolHashVector m_tempRouterHashVector
PowerLine is the base class for a system of power transfer integrated into the rigid body simulation...
agxPowerLine::UnitRefSetVector m_units
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints, geometries.