AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
GenericElementaryConstraint.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#pragma once
18
21
22namespace agx
23{
59 {
60 public:
67
74
79
84
101 Real primaryFrictionCoefficient,
102 Real secondaryFrictionCoefficient,
103 const Vec3& contactPointPosition );
104
111
112 public:
120 virtual Bool onPrepare();
121
127 virtual void onWriteData( GenericConstraintData* constraintData );
128
129#ifndef SWIG
130 public:
135#endif
136
137 public:
138 virtual Bool isActive() const override;
139#ifndef SWIG
141#endif
142
143 void setAttachmentPair( const AttachmentPair* ap ) override;
144
145 protected:
147
148 protected:
153 };
154}
#define AGXPHYSICS_EXPORT
Constraint attachment pair class.
Constraint solver callback interface with context and start rows for context.
Elementary constraint base class with interface and global constraint functionality.
Constraint data used with GenericElementaryConstraint containing data such as; constraint violation,...
Generic elementary constraint with minimal amount of user callbacks to reduce development/prototype t...
virtual Bool isActive() const override
An elementary constraint is defined to be active if enabled.
ConstraintNlmcpCallback * getNlCallback() const override
GenericElementaryConstraint(UInt numRows)
Construct given the number of rows in this elementary constraint.
void setAttachmentPair(const AttachmentPair *ap) override
Call for elementary constraints dependent on attachment pairs.
void setEnableMultiTangentNlCallback(Bool enable, Real primaryFrictionCoefficient, Real secondaryFrictionCoefficient, const Vec3 &contactPointPosition)
const AttachmentPair * getAttachmentPair() const
virtual Bool onPrepare()
Callback when the elementary constraints in the constraint receives the prepare call.
Bool getEnableMultiTangentNlCallback() const
virtual void onWriteData(GenericConstraintData *constraintData)
Callback when to write Jacobian and constraint data if this elementary constraint is active.
GenericElementaryConstraint(UInt numRows, Bool enable)
Construct given the number of rows in this elementary constraint and default enable flag.
GenericConstraintData * getConstraintData() const
void fetchData(const ConstraintRigidBodyContainer &bodies)
Performing callbacks and collecting data in serial.
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
double Real
Definition Real.h:42