AGXDynamics  2.35.0.3
ElectricMotorConstraint.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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 
agxDriveTrain::ElectricMotorConstraint::ElectricMotorConstraint
ElectricMotorConstraint()
RotationalUnit.h
agxDriveTrain::ElectricMotorConstraint::render
virtual void render(agxRender::RenderManager *, float) const override
Inherited method of how to render this constraint into DebugRenderer.
Definition: ElectricMotorConstraint.h:85
agx::Constraint::setCompliance
virtual void setCompliance(agx::Real compliance, agx::Int dof)
Set the compliance of this constraint for the i:th DOF.
agx::Real
double Real
Definition: Real.h:42
agxDriveTrain::ElectricMotorConstraint
Definition: ElectricMotorConstraint.h:61
agxRender::RenderManager
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
Definition: RenderManager.h:106
agxDriveTrain
A library of agxPowerLine components designed to model the various parts of a vehicle drive train.
Constraint.h
agx::TargetSpeedController
Elementary secondary constraint to drive something given target speed (translational or rotational).
Definition: ElementaryConstraint.h:710
ConstraintImplementation.h
agxStream::StorageStream
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:48
agxDriveTrain::ElectricMotorConstraint::getNumDOF
virtual int getNumDOF() const override
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
agxDriveTrain::ElectricMotorConstraintImplementation::restoreLightData
virtual void restoreLightData(agxStream::StorageStream &str) override
agx::ref_ptr< RotationalDimension >
agxDriveTrain::ElectricMotorConstraint::~ElectricMotorConstraint
virtual ~ElectricMotorConstraint()
agxDriveTrain::ElectricMotorConstraint::setSpeed
void setSpeed(agx::Real speed)
agxPowerLine::RotationalDimension
The rotational has one rotational degree of freedom.
Definition: RotationalDimension.h:45
agx::HighLevelConstraintImplementation
Definition: ConstraintImplementation.h:1028
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
agx::Constraint
The base class for a constraint.
Definition: Constraint.h:88
agxDriveTrain::ElectricMotorConstraint::setCompliance
void setCompliance(agx::Real compliance)
agxDriveTrain::ElectricMotorConstraintImplementation::ElectricMotorConstraintImplementation
ElectricMotorConstraintImplementation()
agxDriveTrain::ElectricMotorConstraintImplementation
Definition: ElectricMotorConstraint.h:32
agxDriveTrain::ElectricMotorConstraintImplementation::storeLightData
virtual void storeLightData(agxStream::StorageStream &str) const override