AGX Dynamics  2.37.2.0
DistanceJoint.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 AGX_DISTANCEJOINT_H
18 #define AGX_DISTANCEJOINT_H
19 
20 #include <agx/Constraint.h>
21 
22 namespace agx
23 {
28  {
29  public:
36  DistanceJoint( RigidBody* rb1, Frame* rb1AttachmentFrame, const Vec3& worldAttach );
37 
45  DistanceJoint( RigidBody* rb1, Frame* rb1AttachmentFrame, RigidBody* rb2, Frame* rb2AttachmentFrame );
46 
54  DistanceJoint( RigidBody* rb1, const Vec3& localAttachRB1, RigidBody* rb2, const Vec3& localAttachRB2 );
55 
62  DistanceJoint( RigidBody* rb1, const Vec3& localAttachRB1, const Vec3& worldAttach );
63 
69  virtual RegularizationParameters* getRegularizationParameters( agx::UInt i ) override;
70  virtual const RegularizationParameters* getRegularizationParameters( agx::UInt i ) const override;
71 
75  virtual void setCompliance( Real compliance, agx::Int index = -1 ) override;
76 
80  virtual Real getCompliance( agx::UInt index ) const override;
81 
85  virtual void setDamping( Real damping, agx::Int index = -1 ) override;
86 
90  virtual Real getDamping( agx::UInt index ) const override;
91 
95  virtual int getNumDOF() const override;
96 
98 
99  protected:
100  DistanceJoint();
101  virtual ~DistanceJoint();
102 
106  virtual void render( agxRender::RenderManager *mgr, float scale ) const override;
107 
108  private:
109  class DistanceJointImplementation *m_implementation;
110  };
111 
113 } // namespace agx
114 
115 #endif
AGXFMI_EXPORT InputVariable_Real * setCompliance(agx::Constraint *constraint)
This joint will preserve the initial distance between a body and a point in world coordinate or betwe...
Definition: DistanceJoint.h:27
#define AGXPHYSICS_EXPORT
int32_t Int
Definition: Integer.h:35
Specialization for constraints that have only one degree of freedom such as Hinge and Prismatic...
Definition: Constraint.h:673
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc...
ref_ptr< DistanceJoint > DistanceJointRef
uint32_t UInt
Definition: Integer.h:34
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:54
#define CALLABLE
Definition: Object.h:73
All ghost variables have compliance and damping attributes.
The object defining a frame of reference and providing transformations operations.
Definition: Frame.h:67
AGXFMI_EXPORT InputVariable_Real * setDamping(agx::Constraint *constraint)
#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
double Real
Definition: Real.h:42