AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
ActuatorUnit.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
22#include <agxPowerLine/Unit.h>
23
24namespace agx
25{
26 class RigidBody;
27 class Constraint;
28}
29
30namespace agxPowerLine
31{
32 class Actuator;
33 class RotationalUnit;
34 class ActuatorBodyUnit;
35}
36
37namespace agxPowerLine
38{
40 {
41 public:
43
44 void setActuatorBodyUnit(ActuatorBodyUnit* actuatorBodyUnit);
46
48 virtual agx::RigidBody* getBody() = 0;
49
52
55
56 protected:
58 virtual ~ActuatorDimension() = 0;
59
60 protected:
62 };
63
64
65
66
67 class ActuatorTranslationalDimension : public agxPowerLine::TranslationalDimension, public ActuatorDimension
68 {
69 public:
70 ActuatorTranslationalDimension(ActuatorBodyUnit* actuatorBodyUnit, agx::RigidBody* body, bool externalBody);
71
74
75 virtual agx::RigidBody* getBody() override;
76
80 virtual bool store(agxStream::StorageStream& str) const override;
81
85 virtual bool restore(agxStream::StorageStream& str) override;
86
88
89 protected:
91
92 private:
94
95 private:
97 };
98
99
100
101
103 {
104 public:
105 ActuatorRotationalDimension(ActuatorBodyUnit* actuatorBodyUnit, agx::RigidBody* body, bool externalBody);
106
109
111
115 virtual bool store(agxStream::StorageStream& str) const override;
116
120 virtual bool restore(agxStream::StorageStream& str) override;
121
123
124 protected:
126
127 private:
129
130 private:
132 };
133
134
135
136
143 {
144 public:
148 ActuatorBodyUnit(Actuator* actuator, agx::Constraint* constraint, agxPowerLine::Side actuatorSide);
149
150 const Actuator* getActuator() const;
152
153 bool isInputAndOutput() const;
154
156
161
166
167
171 virtual bool store(agxStream::StorageStream& str) const override;
172
176 virtual bool restore(agxStream::StorageStream& str) override;
177
179
181
182 protected:
183
185
189 };
190
192
193}
#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
An ActuatorBodyUnit forms a connection between the power line world and the rest of the simulation.
Definition: ActuatorUnit.h:143
agx::ref_ptr< ActuatorRotationalDimension > m_rotationalDimension
Definition: ActuatorUnit.h:186
const Actuator * getActuator() const
agxPowerLine::ActuatorTranslationalDimension * getTranslationalDimension()
returns a pointer to the rotational dimension
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
agx::ref_ptr< ActuatorTranslationalDimension > m_translationalDimension
Definition: ActuatorUnit.h:187
agx::observer_ptr< Actuator > m_actuator
Definition: ActuatorUnit.h:188
ActuatorBodyUnit(Actuator *actuator, agx::Constraint *constraint, agxPowerLine::Side actuatorSide)
Create a rotational and translational unit.
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
const agx::RigidBody * getRigidBody() const
agxPowerLine::ActuatorRotationalDimension * getRotationalDimension()
returns a pointer to the rotational dimension
const ActuatorBodyUnit * getActuatorBodyUnit() const
void setActuatorBodyUnit(ActuatorBodyUnit *actuatorBodyUnit)
agx::observer_ptr< ActuatorBodyUnit > m_actuatorBodyUnit
Definition: ActuatorUnit.h:61
virtual agx::RigidBody * getBody()=0
void restore(agxStream::InputArchive &in)
void store(agxStream::OutputArchive &out) const
bool store(agxStream::StorageStream &str) const
ActuatorDimension(ActuatorBodyUnit *actuatorBodyUnit)
virtual agxPowerLine::detail::AbstractDimensionState3Dof * getDimensionState()=0
bool restore(agxStream::StorageStream &str)
virtual agxPowerLine::detail::AbstractDimensionState3Dof * getDimensionState() override
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
agxPowerLine::detail::Rotational3DofState * getRotationalDimensionState()
ActuatorRotationalDimension(ActuatorBodyUnit *actuatorBodyUnit, agx::RigidBody *body, bool externalBody)
agx::RigidBody * getBody() override
virtual agxPowerLine::detail::AbstractDimensionState3Dof * getDimensionState() override
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
virtual agx::RigidBody * getBody() override
agxPowerLine::detail::Translational3DofState * getTranslationalDimensionState()
ActuatorTranslationalDimension(ActuatorBodyUnit *actuatorBodyUnit, agx::RigidBody *body, bool externalBody)
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
Abstract base class for connecting a agxPowerLine::Unit to an ordinary constraint such as a Hinge or ...
Definition: Actuator.h:47
The rotational has one rotational degree of freedom.
Pure virtual class.
Definition: Unit.h:72
Base class for the two three dimensional dimension state classes.
Templated three dimensional dimension state.
Class for reading a binary stream of serialized data.
Definition: InputArchive.h:51
Class for writing serialized data in binary format to a stream.
Definition: OutputArchive.h:57
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:49
The base class for a constraint.
Definition: Constraint.h:89
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:49
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
Definition: observer_ptr.h:61
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:30
agxPowerLine contains a collection of connected components that transport power across a system.
Definition: MotorUnit.h:24
agx::ref_ptr< ActuatorBodyUnit > ActuatorBodyUnitRef
Definition: ActuatorUnit.h:191
The agx namespace contains the dynamics/math part of the AGX Dynamics API.