AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
ElementarySlackConstraint.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
20
21
22
23#ifdef _MSC_VER
24# pragma warning(push)
25# pragma warning(disable: 6011) // Disable warningC6011: dereferencing nullptr pointer
26#endif
27
28
29namespace agx
30{
31
36 class AGXPHYSICS_EXPORT Dot1Slack : public ElementaryConstraintNData< 2, Dot1SlackData >
37 {
38 public:
44
46
48 void setSlack( agx::Real slack );
49 protected:
54
58 virtual ~Dot1Slack();
59
60 virtual agx::UInt getJacobian( agx::Jacobian6DOFElement* G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState ) override;
61 virtual agx::UInt getViolation( agx::Real* g, agx::UInt row ) override;
62 };
63
65
66
70 class AGXPHYSICS_EXPORT Dot2Slack : public ElementaryConstraintNData< 2, Dot2SlackData >
71 {
72 public:
77
79
81 void setSlack( agx::Real slack );
82
83 protected:
88
92 virtual ~Dot2Slack();
93
94 virtual agx::UInt getJacobian( agx::Jacobian6DOFElement* G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState ) override;
95 virtual agx::UInt getViolation( agx::Real* g, agx::UInt row ) override;
96 };
97
98
103 class AGXPHYSICS_EXPORT SphericalRelSlack : public ElementaryConstraintNData< 6, Slack3ConstraintData >
104 {
105 public:
110
112
113
115 void setSlack( agx::Vec3 slack );
116
117 protected:
122
127
128 virtual agx::UInt getJacobian( agx::Jacobian6DOFElement* G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState ) override;
129 virtual agx::UInt getViolation( agx::Real* g, agx::UInt row ) override;
130 };
131
133}
134
135#ifdef _MSC_VER
136# pragma warning(pop)
137#endif
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
Extended Dot1Data with additional slack parameter.
Dot1Slack is similar to the Dot1 elementary constraint but also supports slack and uses twice as many...
Dot1Slack()
Used during serialization restore.
virtual agx::UInt getJacobian(agx::Jacobian6DOFElement *G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState) override
Returns the Jacobian of this elementary constraint.
Dot1Slack(const agx::Dot1SlackData &data)
Construct given Dot1SlackData.
virtual agx::UInt getViolation(agx::Real *g, agx::UInt row) override
Returns the violation of this elementary constraint.
void setSlack(agx::Real slack)
virtual ~Dot1Slack()
Reference counted object, protected destructor.
agx::Real getSlack() const
Data holder class for elementary constraint Dot2Slack.
Dot2Slack is similar to Dot2 elementary constraint.
void setSlack(agx::Real slack)
Dot2Slack()
Used during serialization restore.
virtual agx::UInt getJacobian(agx::Jacobian6DOFElement *G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState) override
Returns the Jacobian of this elementary constraint.
virtual agx::UInt getViolation(agx::Real *g, agx::UInt row) override
Returns the violation of this elementary constraint.
Dot2Slack(const agx::Dot2SlackData &data)
Construct given Dot2SlackData.
agx::Real getSlack() const
virtual ~Dot2Slack()
Reference counted object, protected destructor.
Generic class for holding constraint data including 3 slack parameters.
SphericalRelSalck is similar to the SphericalRel elementary constraint, but also supports slack and u...
agx::Vec3 getSlack() const
void setSlack(agx::Vec3 slack)
virtual ~SphericalRelSlack()
Reference counted object, protected destructor.
virtual agx::UInt getJacobian(agx::Jacobian6DOFElement *G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState) override
Returns the Jacobian of this elementary constraint.
SphericalRelSlack()
Used during serialization restore.
SphericalRelSlack(const agx::Slack3ConstraintData &data)
Construct given SphericalData.
virtual agx::UInt getViolation(agx::Real *g, agx::UInt row) override
Returns the violation of this elementary constraint.
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.
agx::ref_ptr< SphericalRelSlack > SphericalRelSlackRef
uint64_t UInt
Definition Integer.h:27
double Real
Definition Real.h:42
agx::ref_ptr< Dot1Slack > Dot1SlackRef