AGXDynamics  2.35.0.3
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 
48  agx::Lock1D* getLock1D( UInt dof );
49 
53  const agx::Lock1D* getLock1D( UInt dof ) const;
54 
58  agx::Motor1D* getMotor1D( UInt dof );
59 
63  const agx::Motor1D* getMotor1D( UInt dof ) const;
64 
68  agx::ElectricMotorController* getElectricMotorController( UInt dof );
69 
73  const agx::ElectricMotorController* getElectricMotorController( UInt dof ) const;
74 
78  agx::Range1D* getRange1D( UInt dof );
79 
83  const agx::Range1D* getRange1D( UInt dof ) const;
84 
88  agx::Real getAngle( UInt dof ) const;
89 
93  agx::Real getCurrentSpeed( UInt dof ) const;
94 
98  virtual int getNumDOF() const override = 0;
99 
112  virtual UInt getNumControllerOffset() const = 0;
113 
117  virtual int getNumControllers() const = 0;
118 
122  agx::Real getTheta() const;
123 
127  agx::Real getPhi() const;
128 
132  agx::Real getPsi() const;
133 
135 
136  protected:
138  AngularJointBase(bool);
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
agx::AngularJointBase
An angular joint is defined by having 2 rotational degrees of freedom.
Definition: AngularJointBase.h:31
agx::Real
double Real
Definition: Real.h:42
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:54
agxRender::RenderManager
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
Definition: RenderManager.h:106
Constraint.h
agx::TargetSpeedController
Elementary secondary constraint to drive something given target speed (translational or rotational).
Definition: ElementaryConstraint.h:710
agx::LockController
Elementary secondary constraint to keep constraint angle at a given target position.
Definition: ElementaryConstraint.h:1106
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Definition: Serializable.h:221
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition: AddedMassInteraction.h:22
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agx::ref_ptr
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
agx::CreateElementaryConstraintsFunction
agx::Bool(* CreateElementaryConstraintsFunction)(class HighLevelConstraintImplementation *)
Definition: AngularJointBase.h:24
agx::RangeController
Elementary secondary constraint to keep constraint angle within two given values.
Definition: ElementaryConstraint.h:1026
agx::AngularJointBaseRef
ref_ptr< AngularJointBase > AngularJointBaseRef
Definition: AngularJointBase.h:150
agx::HighLevelConstraintImplementation
Definition: ConstraintImplementation.h:1028
agx::ElectricMotorController
Implementation of a electric motor controller.
Definition: ElementaryConstraint.h:934
agx::getAngle
Real getAngle(const Vec3 &a, const Vec3 &b, const Vec3 &c)
a and b should be orthogonal
Definition: ConstraintImplementation.h:1419
agx::UInt
uint32_t UInt
Definition: Integer.h:34
agx::Bool
bool Bool
Definition: Integer.h:48
agx::Constraint
The base class for a constraint.
Definition: Constraint.h:88
agx::Frame
The object defining a frame of reference and providing transformations operations.
Definition: Frame.h:67
agx::AngularJointBase::m_implementation
class AngularJointBaseImplementation * m_implementation
Definition: AngularJointBase.h:147