AGX Dynamics  2.35.0.1
AngularJointBase.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 AGX_ANGULAR_JOINT_BASE_H
18 #define AGX_ANGULAR_JOINT_BASE_H
19 
20 #include <agx/Constraint.h>
21 
22 namespace agx
23 {
25 
32  {
33  public:
34 
43  AngularJointBase( CreateElementaryConstraintsFunction createFunc, agx::RigidBody* rb1, agx::Frame* rb1AttachmentFrame, agx::RigidBody* rb2 = nullptr, agx::Frame* rb2AttachmentFrame = nullptr );
44 
49 
53  const agx::Lock1D* getLock1D( UInt dof ) const;
54 
59 
63  const agx::Motor1D* getMotor1D( UInt dof ) const;
64 
69 
74 
79 
83  const agx::Range1D* getRange1D( UInt dof ) const;
84 
88  agx::Real getAngle( UInt dof ) const;
89 
94 
98  virtual int getNumDOF() const override = 0;
99 
112  virtual UInt getNumControllerOffset() const = 0;
113 
117  virtual int getNumControllers() const = 0;
118 
123 
127  agx::Real getPhi() const;
128 
132  agx::Real getPsi() const;
133 
135 
136  protected:
139  virtual ~AngularJointBase();
140 
144  virtual void render(agxRender::RenderManager* mgr, float scale ) const override;
145 
146  protected:
147  class AngularJointBaseImplementation* m_implementation;
148  };
149 
151 
152 
153 
154 } // namespace agx
155 #endif
#define AGXPHYSICS_EXPORT
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
An angular joint is defined by having 2 rotational degrees of freedom.
virtual int getNumControllers() const =0
agx::Real getPsi() const
const agx::Lock1D * getLock1D(UInt dof) const
agx::Real getCurrentSpeed(UInt dof) const
agx::ElectricMotorController * getElectricMotorController(UInt dof)
agx::Real getAngle(UInt dof) const
class AngularJointBaseImplementation * m_implementation
const agx::Motor1D * getMotor1D(UInt dof) const
agx::Lock1D * getLock1D(UInt dof)
agx::Real getPhi() const
const agx::Range1D * getRange1D(UInt dof) const
virtual ~AngularJointBase()
virtual UInt getNumControllerOffset() const =0
The constraint definition allows for controllers at all constraint angles.
AngularJointBase(CreateElementaryConstraintsFunction createFunc, agx::RigidBody *rb1, agx::Frame *rb1AttachmentFrame, agx::RigidBody *rb2=nullptr, agx::Frame *rb2AttachmentFrame=nullptr)
Create a angular joint given attachment frames and one or two rigid bodies.
const agx::ElectricMotorController * getElectricMotorController(UInt dof) const
agx::Motor1D * getMotor1D(UInt dof)
agx::Range1D * getRange1D(UInt dof)
agx::Real getTheta() const
Returns angle not controlled by controllers.
virtual void render(agxRender::RenderManager *mgr, float scale) const override
Used internally for debug rendering.
virtual int getNumDOF() const override=0
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(agx::AngularJointBase)
The base class for a constraint.
Definition: Constraint.h:89
Implementation of a electric motor controller.
The object defining a frame of reference and providing transformations operations.
Definition: agx/Frame.h:68
Elementary secondary constraint to keep constraint angle at a given target position.
Elementary secondary constraint to keep constraint angle within two given values.
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:55
Elementary secondary constraint to drive something given target speed (translational or rotational).
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:30
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition: Integer.h:48
uint32_t UInt
Definition: Integer.h:34
ref_ptr< AngularJointBase > AngularJointBaseRef
double Real
Definition: Real.h:42
agx::Bool(* CreateElementaryConstraintsFunction)(class HighLevelConstraintImplementation *)