AGX Dynamics  2.37.2.0
ElectricMotorConstraint.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
9 having been advised so by Algoryx Simulation AB for a time limited evaluation,
10 or having purchased a 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 
18 #pragma once
19 
20 #include <agx/Constraint.h>
22 
24 
25 namespace agxDriveTrain {
33  {
34  public:
40 
41  virtual void storeLightData(agxStream::StorageStream& str) const override;
42 
43  virtual void restoreLightData(agxStream::StorageStream& str) override;
44 
46 
47  protected:
49 
50  private:
52  agx::TargetSpeedController* m_electricMotorConstraint;
53  agxPowerLine::RotationalDimension* m_rotationalDimension;
54  };
55 
56 
62  {
63  public:
69 
75  void setSpeed(agx::Real speed);
76 
82  void setCompliance(agx::Real compliance);
84 
85  virtual void render(agxRender::RenderManager* /*canvas*/, float /*scale*/) const override {}
86 
88 
89  protected:
91  virtual ~ElectricMotorConstraint();
92  virtual int getNumDOF() const override;
93 
94  private:
95  ElectricMotorConstraintImplementation* m_electricMotorConstraint;
96  };
97 
99 }
100 
101 
AGXFMI_EXPORT InputVariable_Real * setCompliance(agx::Constraint *constraint)
virtual void setCompliance(agx::Real compliance, agx::Int dof)
Set the compliance of this constraint for the i:th DOF.
The base class for a constraint.
Definition: Constraint.h:88
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
A library of agxPowerLine components designed to model the various parts of a vehicle drive train...
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc...
virtual void restoreLightData(agxStream::StorageStream &str) override
The rotational has one rotational degree of freedom.
virtual void render(agxRender::RenderManager *, float) const override
Inherited method of how to render this constraint into DebugRenderer.
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:48
#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
Elementary secondary constraint to drive something given target speed (translational or rotational)...
virtual void storeLightData(agxStream::StorageStream &str) const override
double Real
Definition: Real.h:42