AGX Dynamics  2.35.0.1
PistonActuatorConstraints.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 
18 #ifndef AGXHYDRAULICS_DETAIL_PISTON_CONSTRAINT_H
19 #define AGXHYDRAULICS_DETAIL_PISTON_CONSTRAINT_H
20 
21 
24 #include <agxHydraulics/export.h>
25 
26 namespace agxHydraulics
27 {
28  class PistonActuator;
29  class PistonActuatorConnector;
30 
32  namespace detail
33  {
38  class AGXHYDRAULICS_EXPORT ElementaryPistonActuatorConstraint : public agxPowerLine::ElementaryActuatorConstraint
39  {
40  public:
41  ElementaryPistonActuatorConstraint();
42 
43  virtual size_t getJacobian(
45  const agxPowerLine::RigidBodyPtrIntHashVector& bodyToIndexTable,
46  const agx::ConstraintRigidBodyContainer& /*bodies*/,
48  const agx::Real /*timeStep*/) override;
49 
51 
52  /*
53  No getViolation because in the PowerLine it is the Connector that is
54  responsible for this.
55  */
56 
57  PistonActuatorConnector* getPistonChamberConnector();
58 
59  AGXSTREAM_DECLARE_SERIALIZABLE(agxHydraulics::detail::ElementaryPistonActuatorConstraint);
60 
61  protected:
62  virtual ~ElementaryPistonActuatorConstraint() {}
63  };
64 
65 
70  class AGXHYDRAULICS_EXPORT PistonActuatorConstraintImplementation : public agxPowerLine::ActuatorConstraintImplementation
71  {
72  public:
73  PistonActuatorConstraintImplementation(PistonActuator* owningActuator);
74 
75  virtual bool updateValid() override;
76 
77  AGXSTREAM_DECLARE_SERIALIZABLE(agxHydraulics::detail::PistonActuatorConstraintImplementation);
78 
79  protected:
80  PistonActuatorConstraintImplementation();
81  virtual ~PistonActuatorConstraintImplementation() {}
82 
83  private:
84  void initialize();
85 
86  private:
87  ElementaryPistonActuatorConstraint* m_pistonConstraint;
88  };
89 
90 
91  }
93 }
94 
95 #endif
96 
#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 AGXHYDRAULICS_EXPORT
virtual size_t getJacobian(agx::Jacobian6DOFElement *, const RigidBodyPtrIntHashVector &, const agx::ConstraintRigidBodyContainer &, const PhysicalDimensionPtrIntTable &, const agx::Real)=0
getJacobian must be implemented for all classes that inherits from this.
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition: Accumulator.h:28
double Real
Definition: Real.h:42