AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
Actuator.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#pragma once
17
20#include <agxPowerLine/Sides.h>
21#include <agxPowerLine/Unit.h>
22
23namespace agx
24{
25 class RigidBody;
26}
27
28namespace agxPowerLine
29{
30 class PhysicalDimension;
31 class Connector;
32
33 namespace detail
34 {
36 }
37}
38
39namespace agxPowerLine
40{
42
47 {
48 public:
49
53 Actuator( agx::Constraint* constraint );
54
57
59 virtual agx::Real calculateRelativeValue() const = 0;
60
61 virtual agx::Vec3 calculateLocalDirection(Side side, int dimensionType) const = 0;
63
64 virtual const agx::RigidBody* getRigidBody(Side side) const;
66
68 const agxPowerLine::PhysicalDimension* getPhysicalDimension(Side side, int dimensionType) const;
69
72
76
78
81
82
85
86 //* Vectors in world coordinates to calculate the Jacobian */
87 virtual agx::Vec3 getDir1( ) const = 0;
88 virtual agx::Vec3 getDir2( ) const = 0;
89 virtual agx::Vec3 getCmToAnchorPos1() const = 0;
90 virtual agx::Vec3 getCmToAnchorPos2() const = 0;
91 virtual agx::Vec3 getSeparation() const = 0;
92
96 virtual bool store(agxStream::StorageStream& str) const override;
97
99
103 virtual bool restore(agxStream::StorageStream& str) override;
104
106
108 virtual void store(agxStream::OutputArchive& out) const override;
109 virtual void restore(agxStream::InputArchive& in) override;
110
111 protected:
112 virtual ~Actuator();
113
115
116 protected:
118
120
121 //agx::observer_ptr<agxPowerLine::ActuatorBodyUnit> m_actuatorBodyUnits[Actuator::NUM_BODIES];
123 };
124}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define AGXMODEL_EXPORT
An ActuatorBodyUnit forms a connection between the power line world and the rest of the simulation.
Definition: ActuatorUnit.h:143
Abstract base class for connecting a agxPowerLine::Unit to an ordinary constraint such as a Hinge or ...
Definition: Actuator.h:47
agxPowerLine::detail::Rotational3DofState * getRotationalState(Side side)
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(agxMode::Actuator)
virtual agx::Vec3 calculateWorldDirection(Side side, agxPowerLine::PhysicalDimension::Type dimensionType) const =0
Actuator(agx::Constraint *constraint)
Constructor which will create a connection between this Unit and a specified ordinary Constraint.
const agx::Constraint * getConstraint() const
virtual agxPowerLine::DimensionAndSide getConnectableDimension(agxPowerLine::PhysicalDimension::Type type, agxPowerLine::Side side) override
virtual const agx::RigidBody * getRigidBody(Side side) const
agxPowerLine::detail::AbstractDimensionState3Dof * getDimensionState(agxPowerLine::Side side, agxPowerLine::PhysicalDimension::Type dimensionType)
virtual agx::Vec3 calculateLocalDirection(Side side, int dimensionType) const =0
agxPowerLine::detail::Translational3DofState * getTranslationalState(Side side)
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
virtual void store(agxStream::OutputArchive &out) const override
virtual agx::Vec3 getDir2() const =0
virtual agx::Real calculateRelativeValue() const =0
virtual agx::Vec3 getCmToAnchorPos2() const =0
virtual agx::RigidBody * getRigidBody(Side side)
agxPowerLine::ActuatorBodyUnit * getActuatorBodyUnit(Side side)
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
agx::observer_ptr< agx::Constraint > m_constraint
Definition: Actuator.h:119
virtual agx::Real calculateRelativeGradient() const =0
virtual agx::Vec3 getCmToAnchorPos1() const =0
virtual void restore(agxStream::InputArchive &in) override
virtual agx::Vec3 getSeparation() const =0
bool reverseOrderRelativeConstraint() const
agxPowerLine::PhysicalDimension * getPhysicalDimension(Side side, int dimensionType)
const agxPowerLine::PhysicalDimension * getPhysicalDimension(Side side, int dimensionType) const
const agxPowerLine::ActuatorBodyUnit * getActuatorBodyUnit(Side side) const
virtual agx::Vec3 getDir1() const =0
agx::Constraint * getConstraint()
virtual bool restore(agxStream::StorageStream &str)
Restores internal data from stream.
virtual bool store(agxStream::StorageStream &str) const
Stores internal data into stream.
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
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
double Real
Definition: Real.h:41