AGX Dynamics  2.35.0.1
TranslationalUnit.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 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_TRANSLATIONAL_UNIT_H
18 #define AGXPOWERLINE_TRANSLATIONAL_UNIT_H
19 
20 #include <agxModel/export.h>
22 #include <agxPowerLine/Unit.h>
23 
24 namespace agxPowerLine
25 {
27  class AGXMODEL_EXPORT TranslationalUnit : public agxPowerLine::Unit
28  {
29  public:
30 
34  TranslationalUnit();
35 
36 
40  virtual agx::Real getDeliveredForce() const {return m_translationalDimension->getOutputLoad();}
41 
45  agxPowerLine::TranslationalDimension* getTranslationalDimension() const;
46 
50  void setVelocityDamping(agx::Real damping);
51 
52 
56  void setMass( agx::Real mass );
57 
61  virtual agx::Vec3 getWorldDirection() const;
62 
66  virtual bool preUpdate(agx::Real timeStep) override;
70  virtual bool store(agxStream::StorageStream& str) const override;
71 
75  virtual bool restore(agxStream::StorageStream& str) override;
76 
77  AGXSTREAM_DECLARE_SERIALIZABLE(agxPowerLine::TranslationalUnit);
78 
79  protected:
80  virtual ~TranslationalUnit();
81 
82  protected:
83  agxPowerLine::TranslationalDimensionRef m_translationalDimension;
84  };
85 
87 
88 
89  typedef agx::ref_ptr<TranslationalUnit> TranslationalUnitRef;
90 }
91 
92 #endif // AGXMODEL_TRANSLATIONAL_UNIT_H
#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
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:49
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
agxPowerLine contains a collection of connected components that transport power across a system.
Definition: MotorUnit.h:24
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
double Real
Definition: Real.h:42