AGX Dynamics
2.37.2.0
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
19
#include <
agx/ElementaryConstraint.h
>
20
#include <
agx/GenericConstraintData.h
>
21
22
namespace
agx
23
{
53
class
AGXPHYSICS_EXPORT
GenericElementaryConstraint
:
public
agx::ElementaryConstraint
54
{
55
public
:
61
GenericElementaryConstraint
(
agx::UInt
numRows );
62
68
GenericElementaryConstraint
(
agx::UInt
numRows,
agx::Bool
enable );
69
73
const
agx::AttachmentPair
* getAttachmentPair()
const
;
74
90
void
setEnableMultiTangentNlCallback(
agx::Bool
enable,
91
agx::Real
primaryFrictionCoefficient,
92
agx::Real
secondaryFrictionCoefficient,
93
const
agx::Vec3
& contactPointPosition );
94
100
agx::Bool
getEnableMultiTangentNlCallback()
const
;
101
102
public
:
110
virtual
agx::Bool
onPrepare();
111
119
virtual
void
onWriteData(
agx::GenericConstraintBodyData
* rb1Data,
120
agx::GenericConstraintBodyData
* rb2Data,
121
agx::GenericConstraintData
* constraintData );
122
123
#ifndef SWIG
124
public
:
128
void
fetchData();
129
#endif
130
131
public
:
132
void
prepare()
override
;
133
agx::Bool
isActive()
const override
;
134
agx::UInt
getJacobian(
agx::Jacobian6DOFElement
* G,
agx::UInt
numBlocks,
agx::UInt
row, agx::GWriteState::Enum writeState )
override
;
135
agx::UInt
getViolation(
agx::Real
* g,
agx::UInt
row )
override
;
136
agx::UInt
getVelocity(
agx::Real
* v,
agx::UInt
row )
const override
;
137
agx::UInt
getBounds(
agx::RangeReal
* bounds,
agx::UInt
row,
agx::Real
h )
const override
;
138
agx::Bool
isImpacting()
const override
;
139
#ifndef SWIG
140
agx::ConstraintNlmcpCallback
* getNlCallback()
const override
;
141
#endif
142
143
void
setAttachmentPair(
const
agx::AttachmentPair
* ap )
override
;
144
145
protected
:
146
virtual
~
GenericElementaryConstraint
();
147
148
private
:
149
GenericConstraintBodyData
m_rb1Data;
150
GenericConstraintBodyData
m_rb2Data;
151
GenericConstraintData
m_constraintData;
152
const
AttachmentPair
* m_attachmentPair;
153
Bool
m_active;
154
ref_ptr<Referenced>
m_multiTangentNlCallback;
155
};
156
}
ElementaryConstraint.h
agx::ElementaryConstraint
Elementary constraint base class with interface and global constraint functionality.
Definition:
ElementaryConstraint.h:53
agx::Bool
bool Bool
Definition:
Integer.h:48
agx::Jacobian6DOFElementT
Definition:
Jacobian.h:104
agx::GenericElementaryConstraint
Generic elementary constraint with minimal amount of user callbacks to reduce development/prototype t...
Definition:
GenericElementaryConstraint.h:53
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agx::GenericConstraintBodyData
Constraint body data used with GenericElementaryConstraint containing the per body Jacobian data...
Definition:
GenericConstraintData.h:107
agx::GenericConstraintData
Constraint data used with GenericElementaryConstraint containing data such as; constraint violation...
Definition:
GenericConstraintData.h:29
agx::ConstraintNlmcpCallback
Constraint solver callback interface with context and start rows for context.
Definition:
NlmcpCallback.h:246
GenericConstraintData.h
agx::UInt
uint32_t UInt
Definition:
Integer.h:34
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
agx::Range< Real >
agx::ref_ptr
Smart pointer for handling referenced counted objects.
Definition:
ref_ptr.h:29
agx::Vec3T< Real >
agx::Real
double Real
Definition:
Real.h:42
include
agx
GenericElementaryConstraint.h
Generated on Sun Jan 28 2024 11:19:27 for AGX Dynamics by
1.8.13