AGXDynamics
2.35.0.3
WireFrictionController.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
#pragma once
18
19
20
#include <
agx/agxPhysics_export.h
>
21
#include <
agxWire/WireDistanceCompositeConstraint.h
>
22
23
DOXYGEN_START_INTERNAL_BLOCK
()
24
25
namespace
agxWire
26
{
27
28
//Forward declaration
29
class
WireFrictionConstraintImplementation;
30
31
class
AGXPHYSICS_EXPORT
WireFrictionController :
public
agx::Referenced
32
{
33
public
:
34
WireFrictionController();
35
39
void
initialize();
40
41
void
updateDirection();
42
43
void
toggleDirection(
NodeIterator
node );
44
void
reset(
NodeConstIterator
node,
bool
useCurrentLength =
false
)
const
;
45
52
bool
updateRowOfSlidingNodes(
NodeIterator
begin
,
NodeIterator
end
);
53
60
bool
update(
NodeIterator
node,
agx::Real
normalForceMagnitude = 0 );
61
72
bool
createFrictionConstraint(
const
NodeIterator
firstSlidingNode,
NodeIterator
& nodeAfterLastSlidingNode, WireFrictionConstraintImplementation* wfci,
agx::Real
compliancePerUnitLength,
agx::Real
damping );
73
78
void
setEnable(
bool
enable );
79
83
inline
bool
getEnable()
const
84
{
85
return
m_enable;
86
}
87
91
void
updateFrictionRestlength(
NodeConstIterator
A,
NodeConstIterator
B,
NodeConstIterator
middleLump,
bool
remove )
const
;
92
96
void
setWire( WireDistanceCompositeConstraint* wire );
97
101
WireDistanceCompositeConstraint* getWire()
const
{
return
m_wire; }
102
103
private
:
104
105
void
updateToggledRestLength(
agxWire::BodyFixedNode
* nextBfn,
agxWire::NodeMaterial
* nMaterial );
106
void
initialize(
NodeIterator
node )
const
;
107
agx::Vec3
calculateNormalForce(
NodeIterator
node )
const
;
108
agx::Bool
isSlidingNode(Node* node)
const
;
109
110
private
:
111
agx::observer_ptr< WireDistanceCompositeConstraint >
m_wire;
112
bool
m_enable;
113
};
114
115
typedef
agx::ref_ptr< WireFrictionController >
WireFrictionControllerRef;
116
}
117
118
119
DOXYGEN_END_INTERNAL_BLOCK
()
agxPhysics_export.h
agx::end
LinearProbingHashSetImplementation< KeyT, HashT >::iterator end(LinearProbingHashSetImplementation< KeyT, HashT > &set)
Definition:
LinearProbingHashSet.h:612
agx::Real
double Real
Definition:
Real.h:42
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition:
macros.h:97
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition:
macros.h:96
agxWire::NodeIterator
NodeContainer::iterator NodeIterator
Definition:
agxWire/Node.h:54
agx::observer_ptr
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
Definition:
observer_ptr.h:60
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agx::begin
LinearProbingHashSetImplementation< KeyT, HashT >::iterator begin(LinearProbingHashSetImplementation< KeyT, HashT > &set)
Definition:
LinearProbingHashSet.h:606
agx::ref_ptr
Smart pointer for handling referenced counted objects.
Definition:
ref_ptr.h:29
agxWire
Implements a Wire model with adaptive resolution.
Definition:
MergedBody.h:39
agxWire::BodyFixedNode
The body fixed node is attached to a body at a given offset.
Definition:
agxWire/Node.h:1225
agxWire::NodeConstIterator
NodeContainer::const_iterator NodeConstIterator
Definition:
agxWire/Node.h:57
agxWire::NodeMaterial
Material definition for a wire node Specifies the friction of a wire for sliding through an EyeNode.
Definition:
agxWire/Node.h:181
agx::Referenced
Base class providing referencing counted objects.
Definition:
Referenced.h:113
agx::Bool
bool Bool
Definition:
Integer.h:48
WireDistanceCompositeConstraint.h
agx::Vec3T< Real >
include
agxWire
WireFrictionController.h
Generated on Fri Feb 10 2023 14:06:22 for AGXDynamics by
1.8.17