AGX Dynamics  2.38.0.2
GenericElementaryConstraint.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. 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 #pragma once
18 
21 
22 namespace agx
23 {
59  {
60  public:
67 
73  GenericElementaryConstraint( UInt numRows, Bool enable );
74 
78  const AttachmentPair* getAttachmentPair() const;
79 
83  GenericConstraintData* getConstraintData() const;
84 
100  void setEnableMultiTangentNlCallback( Bool enable,
101  Real primaryFrictionCoefficient,
102  Real secondaryFrictionCoefficient,
103  const Vec3& contactPointPosition );
104 
110  Bool getEnableMultiTangentNlCallback() const;
111 
112  public:
120  virtual Bool onPrepare();
121 
127  virtual void onWriteData( GenericConstraintData* constraintData );
128 
129 #ifndef SWIG
130  public:
134  void fetchData( const ConstraintRigidBodyContainer& bodies );
135 #endif
136 
137  public:
138  virtual Bool isActive() const override;
139 #ifndef SWIG
140  ConstraintNlmcpCallback* getNlCallback() const override;
141 #endif
142 
143  void setAttachmentPair( const AttachmentPair* ap ) override;
144 
145  protected:
146  virtual ~GenericElementaryConstraint();
147 
148  protected:
153  };
154 }
agx::UInt
uint64_t UInt
Definition: Integer.h:27
agx::ElementaryConstraint
Elementary constraint base class with interface and global constraint functionality.
Definition: ElementaryConstraint.h:53
agx::Real
double Real
Definition: Real.h:42
agx::Vector< RigidBody * >
agx::GenericElementaryConstraint::m_constraintData
GenericConstraintData m_constraintData
Definition: GenericElementaryConstraint.h:151
agx::AttachmentPair
Constraint attachment pair class.
Definition: Attachment.h:300
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::ConstraintNlmcpCallback
Constraint solver callback interface with context and start rows for context.
Definition: NlmcpCallback.h:246
agx::GenericElementaryConstraint::m_active
Bool m_active
Definition: GenericElementaryConstraint.h:150
agx::GenericElementaryConstraint::m_multiTangentNlCallback
ref_ptr< Referenced > m_multiTangentNlCallback
Definition: GenericElementaryConstraint.h:152
GenericConstraintData.h
agx::GenericElementaryConstraint::m_attachmentPair
const AttachmentPair * m_attachmentPair
Definition: GenericElementaryConstraint.h:149
ElementaryConstraint.h
agx::Bool
bool Bool
Definition: Integer.h:40
agx::Vec3T< Real >
agx::GenericConstraintData
Constraint data used with GenericElementaryConstraint containing data such as; constraint violation,...
Definition: GenericConstraintData.h:69
agx::GenericElementaryConstraint
Generic elementary constraint with minimal amount of user callbacks to reduce development/prototype t...
Definition: GenericElementaryConstraint.h:58