38#pragma warning( push )
39#pragma warning( disable : 4589 )
47 class ConnectionOperations;
48 class AbstractDimensionState1Dof;
49 class AbstractDimensionState3Dof;
62 class PhysicalDimensionMultiBodyConstraintImplementation;
78 typedef std::pair<agxPowerLine::PhysicalDimension*, agxPowerLine::Side>
DimensionAndSide;
107 const size_t index)
const;
465#pragma warning( pop )
Links two connections together.
Constraint implementation for constraining a number of physical dimensions of the same type.
const agxPowerLine::Connection * getInputConnection(size_t inputIndex=0) const
Traversing helper functions.
agxPowerLine::Unit * getUnit()
static std::string getStaticTypeName()
Returns the dimension type name of PhysicalDimension.
const agxPowerLine::detail::DimensionState * getState() const
const Connection * getOutputConnection(const Connector *connector) const
agxPowerLine::detail::AbstractDimensionState1Dof * get1DofState()
Access the DimensionState as a 1-dimensional state.
size_t getNumOutputConnections() const
virtual void calculateJacobian(agx::Jacobian6DOFElement *G, const agx::Real ratio, const size_t index) const
Calculates jacobian for a physical dimension.
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(agxPowerLine::PhysicalDimension)
size_t getNumConnections(agxPowerLine::Side side) const
const agx::Name & getName() const
Returns the name of this PhysicalDimension instance.
virtual agx::Real getPowerOut() const
agxPowerLine::PhysicalDimension::Type getType() const
returns the PhysicalDimension::Type of this dimension
const Connection * getOutputConnection(const Unit *unit) const
Connection * getInputConnection(const Connector *connector)
virtual void store(agxStream::OutputArchive &out) const override
agxPowerLine::detail::DimensionState * getState()
Provides direct access to the underlying DimensionState.
virtual void addLoad(agx::Real load)
Add a load to the dimension.
void addToListOfDimensions()
Add to singleton that controls the different types of physical dimensions.
agxPowerLine::detail::AbstractDimensionState3Dof * get3DofState()
Access the DimensionState as a 3-dimensional state.
const agxPowerLine::ConnectionRefVector & getOutputConnections() const
virtual agx::Real getInputLoad() const
return the load in/out
bool removeInputConnection(Connection *connection)
const agxPowerLine::Connection * getOutputConnection(size_t outputIndex=0) const
void addNotification(agxPowerLine::PowerLine *powerLine)
void removeNotification(agxSDK::Simulation *simulation)
virtual agx::Real getValue() const
Physical properties of the dimension.
void restore(agxStream::InputArchive &in, agx::RigidBody *&body, bool &externalBody)
virtual void clear()
Clear all reference pointers.
size_t getNumInputConnections() const
PhysicalDimension::Type m_type
static int getNumberOfPhysicalDimensions()
agx::RigidBody * getReservedBody()
Return a body that is guaranteed to not be shared with any other PhysicalDimension.
bool removeOutputConnection(Connection *connection)
ConnectionRefVector m_inputConnections
ConnectionRefVector m_outputConnections
virtual ~PhysicalDimension()
virtual void restore(agxStream::InputArchive &in) override
agxPowerLine::ConnectionRefVector & getConnectionsWritable(agxPowerLine::Side side)
bool hasReservedBody() const
const Connection * getInputConnection(const Unit *unit) const
void addNotification(agxSDK::Simulation *simulation)
Called when the Unit owning this PhysicalDimension is added to a simulation.
agxPowerLine::Connection * getInputConnection(size_t inputIndex=0)
agx::Vector< Type > TypeVector
Connection * getOutputConnection(const Unit *unit)
agxPowerLine::Connection * getOutputConnection(size_t outputIndex=0)
virtual void setGradient(agx::Real value)
bool connect(agxPowerLine::PhysicalDimension *otherDimension, agxPowerLine::Connector *connector)
Connect to another dimension for possible power transfer.
agx::Vec3 getWorldDirection() const
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation * getConstraint(size_t outputConnection=0) const
const agx::RigidBody * getReservedBody() const
virtual agx::Real getSecondGradient() const
const Connection * getInputConnection(const Connector *connector) const
virtual void setValue(agx::Real value)
size_t getNumConnections() const
PhysicalDimension(agxPowerLine::Unit *unit, agxPowerLine::PhysicalDimension::Type type, agxPowerLine::detail::DimensionState *state)
const agxPowerLine::ConnectionRefVector & getInputConnections() const
virtual std::string getTypeName() const
Returns the dimension type name of this PhysicalDimension instance.
bool restore(agxStream::StorageStream &in, const agx::Vec3 *direction)
Some serialization versions stored the dimension axis direction in classes deriving from PhysicalDime...
agx::RigidBody * getOrReserveBody()
Return a body that is guaranteed to not be shared with any other PhysicalDimension.
void setName(const agx::Name &name)
virtual void setMassProperty(agx::Real massProperty)
Set the mass property of the dimension.
const agxPowerLine::ConnectionRefVector & getConnections(agxPowerLine::Side side) const
agxPowerLine::detail::PhysicalDimensionStateRef m_state
virtual void renderDebug()
Implement this to render Your physical dimension.
virtual bool store(agxStream::StorageStream &str) const
Stores internal data into stream.
static agxPowerLine::PhysicalDimension::Type getStaticType()
virtual agx::Real getGradient() const
void reserveBody()
Ensure that this PhysicalDimension does not share it's body with any other PhysicalDimension.
virtual bool restore(agxStream::StorageStream &in)
Restores internal data from stream.
bool isExternalBody() const
Return true if the body that defines the dimension was given to the Power- Line, false if the body wa...
const agxPowerLine::detail::AbstractDimensionState3Dof * get3DofState() const
Connection * getInputConnection(const Unit *unit)
const agxPowerLine::Unit * getUnit() const
Returns pointer to the Unit that contains this dimension.
size_t getBodyIndexIn(const RigidBodyPtrIntHashVector &bodyToIndexTable)
float getVelocityDamping() const
const agxPowerLine::detail::AbstractDimensionState1Dof * get1DofState() const
Connection * getOutputConnection(const Connector *connector)
Connection * getConnection(const Connector *connector, agxPowerLine::Side side)
Find the Connection object on the given side that connects to the given Connectors.
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation * getInputConstraint(size_t inputConnection=0) const
virtual void removeNotification(agxSDK::Simulation *simulation, agxUtil::ConstraintHolder *constraintHolder)
Remove the PhysicalDimension from the simulation.
virtual agx::Real getMassProperty() const
returns the mass property of the dimension body.
virtual agx::Real getOutputLoad() const
void removeNotification(agxPowerLine::PowerLine *powerLine)
const Connection * getConnection(const Connector *connector, agxPowerLine::Side side) const
virtual agx::Real getPowerIn() const
return the power in/out
void setVelocityDamping(float damping)
PowerLine is the base class for a system of power transfer integrated into the rigid body simulation.
Base class for the two one dimensional dimension state classes.
Base class for the two three dimensional dimension state classes.
A DimensionState is the data carrier of a PhysicalDimension.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Class for writing serialized data in binary format to a stream.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Abstract base class for storing/restoring a line/drums with version control.
Utility class to hold custom implementations of constraints.
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Representation of a name string.
Base class providing referencing counted objects.
The rigid body class, combining a geometric model and a frame of reference.
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
agxPowerLine contains a collection of connected components that transport power across a system.
agx::HashVector< agx::RigidBody *, int > RigidBodyPtrIntHashVector
agx::observer_ptr< Connector > ConnectorObserver
agx::Vector< PhysicalDimension * > PhysicalDimensionPtrVector
agx::SetVector< PhysicalDimension * > PhysicalDimensionPtrSetVector
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
agx::Vector< ConnectionPtr > ConnectionPtrVector
Connection * ConnectionPtr
const PhysicalDimensionRef ConstPhysicalDimensionRef
agx::ref_ptr< LookupTable > LookupTableRef
agx::Vector< ConstPhysicalDimensionRef > ConstPhysicalDimensionRefVector
agx::ref_ptr< PhysicalDimension > PhysicalDimensionRef
agx::ref_ptr< PowerGenerator > PowerGeneratorRef
agx::ref_ptr< Connection > ConnectionRef
agx::ref_ptr< Connector > ConnectorRef
agx::Vector< PhysicalDimensionRef > PhysicalDimensionRefVector
agx::Vector< Unit * > UnitPtrVector
AGXMODEL_EXPORT agx::RigidBody * createDimensionBody(const agx::Name &name)
agx::observer_ptr< PowerGenerator > PowerGeneratorObserver
agx::Vector< ConnectionRef > ConnectionRefVector