AGX Dynamics  2.38.0.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 #pragma once
18 
19 #include <agxModel/export.h>
21 #include <agxPowerLine/Unit.h>
22 
23 namespace agxPowerLine
24 {
29  {
30  public:
35 
36 
38 
42  virtual agx::Real getDeliveredTorque() const;
43 
47  agx::Real getAngle() const;
48 
52  agx::Real getAngularVelocity() const;
53 
57  agx::Real getRPM() const;
58 
62  void setAngularVelocityDamping( agx::Real damping );
63 
67  agxPowerLine::RotationalDimension* getRotationalDimension() const;
68 
72  virtual void setInertia( agx::Real inertia );
73 
74  virtual agx::Real getInertia() const;
75 
79  virtual agx::Vec3 getDirection() const;
80 
84  static agx::Real convertAngularVelocityToRPM( const agx::Real angVel );
85  static agx::Real convertRPMtoAngularVelocity( const agx::Real rpm );
86 
90  virtual bool preUpdate(agx::Real timeStep) override;
91 
94  virtual bool postUpdate(agx::Real timeStep) override;
95 
99  virtual bool store(agxStream::StorageStream& str) const override;
100 
104  virtual bool restore(agxStream::StorageStream& str) override;
105 
107 
108  protected:
109  virtual ~RotationalUnit();
110 
111  protected:
113  };
114 
116 }
agxPowerLine::RotationalUnitRef
agx::ref_ptr< RotationalUnit > RotationalUnitRef
Definition: RotationalUnit.h:115
agxPowerLine::RotationalUnit::m_rotationalDimension
RotationalDimensionRef m_rotationalDimension
Definition: RotationalUnit.h:112
agx::Real
double Real
Definition: Real.h:42
Unit.h
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:51
export.h
agxStream::StorageStream
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:48
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
agxPowerLine::Unit
Pure virtual class.
Definition: Unit.h:71
agx::ref_ptr< RotationalDimension >
agx::UInt8
uint8_t UInt8
Definition: Integer.h:30
agxPowerLine::RotationalDimension
The rotational has one rotational degree of freedom.
Definition: RotationalDimension.h:44
agxPowerLine
agxPowerLine contains a collection of connected components that transport power across a system.
Definition: MotorUnit.h:23
agx::getAngle
Real getAngle(const Vec3 &a, const Vec3 &b, const Vec3 &c)
a and b should be orthogonal
Definition: ConstraintImplementation.h:1419
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition: agxModel/export.h:42
agxPowerLine::RotationalUnit
A rotational unit has one degree of freedom.
Definition: RotationalUnit.h:28
RotationalDimension.h
agx::Vec3T< Real >