AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
DistanceJoint.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGX_DISTANCEJOINT_H
18#define AGX_DISTANCEJOINT_H
19
20#include <agx/Constraint.h>
21
22namespace 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
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:
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
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
Specialization for constraints that have only one degree of freedom such as Hinge and Prismatic.
Definition Constraint.h:674
This joint will preserve the initial distance between a body and a point in world coordinate or betwe...
virtual Real getDamping(agx::UInt index) const override
DistanceJoint(RigidBody *rb1, Frame *rb1AttachmentFrame, const Vec3 &worldAttach)
Create a Distance joint given an attachment frame on a rigid body and a fixed point (in world).
virtual ~DistanceJoint()
virtual Real getCompliance(agx::UInt index) const override
DistanceJoint(RigidBody *rb1, const Vec3 &localAttachRB1, RigidBody *rb2, const Vec3 &localAttachRB2)
Create a Distance joint given two rigid bodies and local attachment points.
virtual const RegularizationParameters * getRegularizationParameters(agx::UInt i) const override
virtual void render(agxRender::RenderManager *mgr, float scale) const override
Internal method used for debug rendering.
virtual RegularizationParameters * getRegularizationParameters(agx::UInt i) override
This is a 1D constraint, i.e., only index i = 0 is valid.
DistanceJoint(RigidBody *rb1, const Vec3 &localAttachRB1, const Vec3 &worldAttach)
Create a Distance joint given one rigid body, a local attach point and a world attach point.
virtual void setCompliance(Real compliance, agx::Int index=-1) override
Set compliance for this distance joint.
virtual int getNumDOF() const override
DistanceJoint(RigidBody *rb1, Frame *rb1AttachmentFrame, RigidBody *rb2, Frame *rb2AttachmentFrame)
Create a Distance joint given attachment frames and two rigid bodies.
virtual void setDamping(Real damping, agx::Int index=-1) override
Set damping for this distance joint.
The object defining a frame of reference and providing transformations operations.
Definition agx/Frame.h:68
All ghost variables have compliance and damping attributes.
The rigid body class, combining a geometric model and a frame of reference.
Definition RigidBody.h:52
Smart pointer for handling referenced counted objects.
Definition ref_ptr.h:30
#define CALLABLE
Definition macros.h:72
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
ref_ptr< DistanceJoint > DistanceJointRef
uint64_t UInt
Definition Integer.h:27
double Real
Definition Real.h:42
int64_t Int
Definition Integer.h:28