17 #ifndef AGXPOWERLINE_UNIT_H
18 #define AGXPOWERLINE_UNIT_H
229 virtual
bool addNotification(
agxSDK::Simulation* simulation) override;
230 virtual
bool removeNotification(
agxUtil::ConstraintHolder* constraintHolder,
agxSDK::Simulation* simulation) override;
242 size_t getNumConnections() const;
268 bool getIgnoreForStoreRestoreStream() const;
271 virtual
bool postStore(
agxStream::StorageStream& str) const;
273 virtual
bool postRestore(
agxStream::StorageStream& str);
278 virtual
bool store(
agxStream::StorageStream& str) const override;
283 virtual
bool restore(
agxStream::StorageStream& str) override;
285 void spreadRootToGraph();
303 friend class Traverser;
304 friend class GraphTraverser;
312 virtual
bool hasValidInputConnection() const;
326 agx::observer_ptr<
agx::RigidBody> m_attachBody;
328 bool m_ignoreMeForStoreRestoreStream;
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Links two connections together.
PowerLine is the base class for a system of power transfer integrated into the rigid body simulation.
virtual bool connect(agxPowerLine::Side mySide, agxPowerLine::Side connectorSide, agxPowerLine::Connector *connector)
Connect the unit to a connector, specifying the side of each.
const agxPowerLine::PhysicalDimensionRefVector & getDimensions() const
virtual size_t getNumConnectableDimensions(Side side) const
virtual bool disconnect(agxPowerLine::Unit *unit)
virtual bool connect(agxPowerLine::Unit *otherUnit)
Connect the unit to another unit.
agxPowerLine::PhysicalDimension * getConnectableOutputDimension(agxPowerLine::PhysicalDimension::Type type)
agxPowerLine::PhysicalDimensionRefVector & getDimensions()
void addNotification(agxPowerLine::PowerLine *powerLine)
void removeNotification(agxPowerLine::PowerLine *powerLine)
void getOwnConnectedUnits(UnitPtrSetVector &unitSet, bool startFromCleanUnitSet=true) const
Constructs the set of Units connected to this Unit's own dimensions.
void getConnectedUnits(UnitPtrSetVector &result, agxPowerLine::Side side)
agxPowerLine::PhysicalDimension * getDimension(agxPowerLine::PhysicalDimension::Type type)
agx::String buildDimensionsName() const
agxPowerLine::PhysicalDimension * getActiveDimension(size_t index)
size_t getNumActiveDimensions() const
The number of non-null PhysicalDimension in this Unit, not including internal Units.
void attach(agx::RigidBody *body)
Define which body in the simulation this Unit is attached to.
virtual void getConnectableDimensionTypes(agxPowerLine::PhysicalDimension::TypeVector &types, agxPowerLine::Side side) const
agxPowerLine::PhysicalDimension * getConnectableInputDimension(agxPowerLine::PhysicalDimension::Type type)
const agxPowerLine::PhysicalDimension * getActiveDimension(size_t index) const
const agxPowerLine::PhysicalDimension * getDimension(agxPowerLine::PhysicalDimension::Type type) const
virtual bool isValid() const
virtual agxPowerLine::DimensionAndSide getConnectableDimension(agxPowerLine::PhysicalDimension::Type type, agxPowerLine::Side side)
virtual bool isConnected(agxPowerLine::Unit *otherUnit) const
virtual bool connect(agxPowerLine::Side mySide, agxPowerLine::Side otherSide, agxPowerLine::Unit *other)
virtual bool connect(agxPowerLine::Connector *connector)
Connect the unit to a connector.
void getOwnConnectedUnits(UnitPtrSetVector &unitSet, agxPowerLine::Side side, bool startFromCleanUnitSet=true) const
Inheritance with partial specialization due to bug with ref_ptr containers.
The rigid body class, combining a geometric model and a frame of reference.
Smart pointer for handling referenced counted objects.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
agxPowerLine contains a collection of connected components that transport power across a system.
agx::SetVector< Unit * > UnitPtrSetVector
agx::Vector< UnitRef > UnitRefVector
agx::Vector< std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > > DimensionSideVector
agx::HashSet< UnitRef > UnitRefSet
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
agx::Vector< ConnectorRef > ConnectorRefVector
agx::ref_ptr< Unit > UnitRef
agx::Vector< Connector * > ConnectorPtrVector
agx::SetVector< UnitRef > UnitRefSetVector
agx::Vector< agx::observer_ptr< Unit > > UnitObsVector
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
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...
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive.
The agxUtil namespace contain classes and methods for utility functionality.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXCORE_EXPORT Component * root()