AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
AngularJointBase.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_ANGULAR_JOINT_BASE_H
18#define AGX_ANGULAR_JOINT_BASE_H
19
20#include <agx/Constraint.h>
21
22namespace 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
128
133
135
136 protected:
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
const agx::Lock1D * getLock1D(UInt dof) const
agx::Real getPsi() const
agx::Real getCurrentSpeed(UInt dof) const
agx::Real getAngle(UInt dof) const
agx::Motor1D * getMotor1D(UInt dof)
class AngularJointBaseImplementation * m_implementation
agx::Real getPhi() const
virtual ~AngularJointBase()
virtual UInt getNumControllerOffset() const =0
The constraint definition allows for controllers at all constraint angles.
agx::Range1D * getRange1D(UInt dof)
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::Motor1D * getMotor1D(UInt dof) const
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
agx::ElectricMotorController * getElectricMotorController(UInt dof)
const agx::Range1D * getRange1D(UInt dof) const
agx::Lock1D * getLock1D(UInt dof)
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(agx::AngularJointBase)
const agx::ElectricMotorController * getElectricMotorController(UInt dof) const
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:52
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:40
uint64_t UInt
Definition Integer.h:27
ref_ptr< AngularJointBase > AngularJointBaseRef
double Real
Definition Real.h:42
agx::Bool(* CreateElementaryConstraintsFunction)(class HighLevelConstraintImplementation *)