AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
WireWinchActuator.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
21
23
25
26namespace agxPowerLine
27{
29
35 {
36 public:
41
43
45
46 void setEnable(bool enabled);
47 bool getEnable() const;
48
50
52
54
55 virtual bool preUpdate(agx::Real timeStamp) override;
56
57 virtual bool postUpdate(agx::Real timeStamp) override;
58
59
60 virtual void prepareForStore() override;
61 virtual void prepareForRestore() override;
62
63
67 virtual bool store(agxStream::StorageStream& str) const override;
68
72 virtual bool restore(agxStream::StorageStream& str) override;
73
74
76
77
78 public:
79 // Methods called by the rest of the PowerLine framework.
81
82 virtual agxPowerLine::DimensionAndSide getConnectableDimension(
84 agxPowerLine::Side side) override;
85
87
88
89 private:
90 void takeWinchControlParameters();
91 void returnWinchControlParameters();
92 void clearTakenWinchControlParameters();
93
94 protected:
95
98
99 void detachActuatorUnitsFromEachOther();
100
101 void connectWireWinchConnector();
102 void disconnectWireWinchConnector();
103 void reconnectWireWinchConnector();
104
105 protected:
106 agx::observer_ptr<agxWire::WireWinchController> m_winchController;
107
109 agxPowerLine::detail::WireWinchConnectorRef m_wireWinchConnector;
110
111 agx::RangeReal m_tmpForceRange;
112 agx::RangeReal m_tmpBrakeRange;
113 agx::Bool m_bounceSpoolDirectionBeforeOutOfWire;
114 };
115}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXMODEL_EXPORT
Class that will connect a agxPowerLine::Unit to a translational ordinary constraint such as a agx::Pr...
Definition: Actuator1DOF.h:518
This actuator can be used to connect a Winch (which is a linear constraint) to a powerline for exampl...
void setEnable(bool enabled)
agx::Bool getBounceSpoolDirectionBeforeOutOfWire() const
virtual bool postUpdate(agx::Real timeStamp) override
void setWinch(agxWire::WireWinchController *winch)
virtual void prepareForStore() override
agxPowerLine::TranslationalUnit * getInputRod()
virtual bool preUpdate(agx::Real timeStamp) override
agxWire::WireWinchController * getWinch() const
WireWinchActuator(agxWire::WireWinchController *winch)
Create a wire winch actuator, with same arguments as needed for a WireWinchController.
void setBounceSpoolDirectionBeforeOutOfWire(agx::Bool bounce)
virtual void prepareForRestore() override
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:49
Winch class for handling in and out hauling of wires.
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
agxPowerLine contains a collection of connected components that transport power across a system.
Definition: MotorUnit.h:24
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
Implements a Wire model with adaptive resolution.
Definition: MergedBody.h:39
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition: Integer.h:40
double Real
Definition: Real.h:41