AGX Dynamics  2.35.0.1
Dot1Joint.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_DOT1JOINT_H
18 #define AGX_DOT1JOINT_H
19 
20 #include <agx/Constraint.h>
21 
22 namespace agx
23 {
28  {
29  public:
38  Dot1Joint( RigidBody* rb1, const Vec3& rb1LocalAxis, RigidBody* rb2, const Vec3& rb2LocalAxis );
39 
48  Dot1Joint( RigidBody* rb1, Frame* rb1AttachmentFrame, RigidBody* rb2, Frame* rb2AttachmentFrame );
49 
54  enum DOF
55  {
56  ALL_DOF=-1,
57  ROTATIONAL_1=0,
58  NUM_DOF=1
59  };
60 
64  virtual int getNumDOF() const override { return NUM_DOF; }
65 
67 
68  protected:
70  virtual ~Dot1Joint();
71 
75  virtual void render( agxRender::RenderManager* mgr, float scale ) const override;
76 
77  private:
78  class Dot1JointImplementation* m_implementation;
79  };
80 
82 } //namespace agx
83 
84 #endif
#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
#define AGXPHYSICS_EXPORT
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
The base class for a constraint.
Definition: Constraint.h:89
Given two vectors or directions, this constraint will keep the two vectors orthogonal.
Definition: Dot1Joint.h:28
virtual ~Dot1Joint()
virtual void render(agxRender::RenderManager *mgr, float scale) const override
Used internally for debug rendering.
DOF
Enum used for specifying which Degree of Freedom (DOF) that should be accessed in calls to for exampl...
Definition: Dot1Joint.h:55
Dot1Joint(RigidBody *rb1, Frame *rb1AttachmentFrame, RigidBody *rb2, Frame *rb2AttachmentFrame)
Create dot 1 constraint between one or two bodies given attachment frames where the axis is defined t...
Dot1Joint(RigidBody *rb1, const Vec3 &rb1LocalAxis, RigidBody *rb2, const Vec3 &rb2LocalAxis)
Create dot 1 constraint between one or two bodies.
virtual int getNumDOF() const override
Definition: Dot1Joint.h:64
The object defining a frame of reference and providing transformations operations.
Definition: agx/Frame.h:68
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:55
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.
ref_ptr< Dot1Joint > Dot1JointRef
Definition: Dot1Joint.h:81