AGX Dynamics  2.38.0.2
WireWinchActuator.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #pragma once
18 
21 
23 
25 
26 namespace agxPowerLine
27 {
29 
35  {
36  public:
41 
42  void setWinch(agxWire::WireWinchController* winch);
43 
44  agxWire::WireWinchController* getWinch() const;
45 
46  void setEnable(bool enabled);
47  bool getEnable() const;
48 
49  agx::Bool getBounceSpoolDirectionBeforeOutOfWire() const;
50 
51  void setBounceSpoolDirectionBeforeOutOfWire(agx::Bool bounce);
52 
53  agxPowerLine::TranslationalUnit* getInputRod();
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 
97  virtual ~WireWinchActuator();
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 }
agxPowerLine::WireWinchActuator
This actuator can be used to connect a Winch (which is a linear constraint) to a powerline for exampl...
Definition: WireWinchActuator.h:34
agx::Real
double Real
Definition: Real.h:42
agxPowerLine::Side
Side
Definition: Sides.h:28
agxPowerLine::detail::WireWinchConnectorRef
agx::ref_ptr< WireWinchConnector > WireWinchConnectorRef
Definition: WireWinchConnector.h:31
agxPowerLine::TranslationalUnit
Definition: TranslationalUnit.h:25
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
agxStream::StorageStream
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:48
agxPowerLine::PhysicalDimension
Pure virtual class.
Definition: PhysicalDimension.h:92
AGXSTREAM_DECLARE_SERIALIZABLE
#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
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition: AddedMassInteraction.h:22
agx::ref_ptr< TranslationalUnit >
agxWire
Implements a Wire model with adaptive resolution.
Definition: MergedBody.h:39
Actuator1DOF.h
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
agxPowerLine
agxPowerLine contains a collection of connected components that transport power across a system.
Definition: MotorUnit.h:23
agx::Bool
bool Bool
Definition: Integer.h:40
agxPowerLine::TranslationalActuator
Definition: Actuator1DOF.h:512
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition: agxModel/export.h:42
agx::RangeReal
Range< Real > RangeReal
A short hand for ranges of floating point numbers.
Definition: Range.h:196
WireWinchConnector.h
WireWinchController.h
TranslationalUnit.h
agxWire::WireWinchController
Winch class for handling in and out hauling of wires.
Definition: WireWinchController.h:41
agxStream::ElementTypes::Type
Type
Definition: Types.h:37
agxPowerLine::DimensionAndSide
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
Definition: PhysicalDimension.h:77