AGX Dynamics  2.37.3.2
RotationalUnit.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 #ifndef AGXPOWERLINE_ROTATIONAL_UNIT_H
18 #define AGXPOWERLINE_ROTATIONAL_UNIT_H
19 
20 #include <agxModel/export.h>
22 #include <agxPowerLine/Unit.h>
23 
24 namespace agxPowerLine
25 {
30  {
31  public:
36 
37 
39 
43  virtual agx::Real getDeliveredTorque() const;
44 
48  agx::Real getAngle() const;
49 
53  agx::Real getAngularVelocity() const;
54 
58  agx::Real getRPM() const;
59 
63  void setAngularVelocityDamping( agx::Real damping );
64 
68  agxPowerLine::RotationalDimension* getRotationalDimension() const;
69 
73  virtual void setInertia( agx::Real inertia );
74 
75  virtual agx::Real getInertia() const;
76 
80  virtual agx::Vec3 getDirection() const;
81 
85  static agx::Real convertAngularVelocityToRPM( const agx::Real angVel );
86  static agx::Real convertRPMtoAngularVelocity( const agx::Real rpm );
87 
91  virtual bool preUpdate(agx::Real timeStep) override;
92 
95  virtual bool postUpdate(agx::Real timeStep) override;
96 
100  virtual bool store(agxStream::StorageStream& str) const override;
101 
105  virtual bool restore(agxStream::StorageStream& str) override;
106 
108 
109  protected:
110  virtual ~RotationalUnit();
111 
112  protected:
114  };
115 
117 }
118 
119 #endif // AGXMODEL_ROTATIONAL_UNIT_H
RotationalDimensionRef m_rotationalDimension
agx::ref_ptr< RotationalUnit > RotationalUnitRef
A rotational unit has one degree of freedom.
Pure virtual class.
Definition: Unit.h:72
uint8_t UInt8
Definition: Integer.h:38
agxPowerLine contains a collection of connected components that transport power across a system...
Definition: MotorUnit.h:23
The rotational has one rotational degree of freedom.
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:54
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
#define AGXMODEL_EXPORT
double Real
Definition: Real.h:42
Real getAngle(const Vec3 &a, const Vec3 &b, const Vec3 &c)
a and b should be orthogonal