AGXDynamics
2.31.1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
ContactForceReader.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2021. 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
#ifndef AGX_CONTACT_FORCE_READER_H
18
#define AGX_CONTACT_FORCE_READER_H
19
20
#include <
agx/agx.h
>
21
#include <
agx/Referenced.h
>
22
#include <
agx/agxPhysics_export.h
>
23
#include <
agxSDK/Simulation.h
>
24
25
namespace
agx
26
{
33
class
CALLABLE
AGXPHYSICS_EXPORT
ContactForceReader
:
public
agx::Referenced
34
{
35
public
:
36
enum
ContactType
37
{
38
IMPACT = (1 << 0),
39
RESTING = (1 << 1),
40
IMPACT_AND_RESTING = (IMPACT & RESTING)
41
};
42
43
ContactForceReader
(
const
agxSDK::Simulation
* sim);
44
52
Vec3
getContactForces(
53
const
agx::RigidBody
* body1,
const
agx::RigidBody
* body2 =
nullptr
,
ContactType
type
= IMPACT_AND_RESTING);
54
62
Vec3
getContactForces(
63
const
agx::RigidBody
* body,
const
agxCollide::Geometry
* geometry,
ContactType
type
= IMPACT_AND_RESTING);
64
72
Vec3
getContactForces(
73
const
agxCollide::Geometry
* geometry1,
const
agxCollide::Geometry
* geometry2 =
nullptr
,
74
ContactType
type
= IMPACT_AND_RESTING);
75
83
Vec3
getNormalContactForces(
84
const
agx::RigidBody
* body1,
const
agx::RigidBody
* body2 =
nullptr
,
ContactType
type
= IMPACT_AND_RESTING);
85
93
Vec3
getNormalContactForces(
94
const
agx::RigidBody
* body,
const
agxCollide::Geometry
* geometry,
ContactType
type
= IMPACT_AND_RESTING);
95
103
Vec3
getNormalContactForces(
104
const
agxCollide::Geometry
* geometry1,
const
agxCollide::Geometry
* geometry2 =
nullptr
,
105
ContactType
type
= IMPACT_AND_RESTING);
106
114
Vec3
getTangentialContactForces(
115
const
agx::RigidBody
* body1,
const
agx::RigidBody
* body2 =
nullptr
,
ContactType
type
= IMPACT_AND_RESTING);
116
124
Vec3
getTangentialContactForces(
125
const
agx::RigidBody
* body,
const
agxCollide::Geometry
* geometry,
ContactType
type
= IMPACT_AND_RESTING);
126
134
Vec3
getTangentialContactForces(
135
const
agxCollide::Geometry
* geometry1,
const
agxCollide::Geometry
* geometry2 =
nullptr
,
136
ContactType
type
= IMPACT_AND_RESTING);
137
145
Vec3
getSumAbsoluteContactForces(
146
const
agx::RigidBody
* body1,
const
agx::RigidBody
* body2 =
nullptr
,
ContactType
type
= IMPACT_AND_RESTING);
147
155
Vec3
getSumAbsoluteContactForces(
156
const
agx::RigidBody
* body,
const
agxCollide::Geometry
* geometry,
ContactType
type
= IMPACT_AND_RESTING);
157
165
Vec3
getSumAbsoluteContactForces(
166
const
agxCollide::Geometry
* geometry1,
const
agxCollide::Geometry
* geometry2 =
nullptr
,
167
ContactType
type
= IMPACT_AND_RESTING);
168
176
Vec3
getSumAbsoluteNormalContactForces(
177
const
agx::RigidBody
* body1,
const
agx::RigidBody
* body2 =
nullptr
,
ContactType
type
= IMPACT_AND_RESTING);
178
186
Vec3
getSumAbsoluteNormalContactForces(
187
const
agx::RigidBody
* body,
const
agxCollide::Geometry
* geometry,
ContactType
type
= IMPACT_AND_RESTING);
188
196
Vec3
getSumAbsoluteNormalContactForces(
197
const
agxCollide::Geometry
* geometry1,
const
agxCollide::Geometry
* geometry2 =
nullptr
,
198
ContactType
type
= IMPACT_AND_RESTING);
199
207
Vec3
getSumAbsoluteTangentialContactForces(
208
const
agx::RigidBody
* body1,
const
agx::RigidBody
* body2 =
nullptr
,
ContactType
type
= IMPACT_AND_RESTING);
209
217
Vec3
getSumAbsoluteTangentialContactForces(
218
const
agx::RigidBody
* body,
const
agxCollide::Geometry
* geometry,
ContactType
type
= IMPACT_AND_RESTING);
219
227
Vec3
getSumAbsoluteTangentialContactForces(
228
const
agxCollide::Geometry
* geometry1,
const
agxCollide::Geometry
* geometry2 =
nullptr
,
229
ContactType
type
= IMPACT_AND_RESTING);
230
232
void
setSimulation(
agxSDK::Simulation
* simulation);
233
234
private
:
235
agx::observer_ptr<const agxSDK::Simulation>
m_sim;
236
};
237
238
typedef
ref_ptr< ContactForceReader >
ContactForceReaderRef
;
239
240
}
// namespace agx
241
242
#endif
agx::observer_ptr< const agxSDK::Simulation >
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agxPhysics_export.h
agx::ContactForceReader::ContactType
ContactType
Definition:
ContactForceReader.h:36
agx::Referenced
Base class providing referencing counted objects.
Definition:
Referenced.h:113
agxCollide::Geometry
The geometry representation used by the collision detection engine.
Definition:
Geometry.h:88
agx::ContactForceReaderRef
ref_ptr< ContactForceReader > ContactForceReaderRef
Definition:
ContactForceReader.h:238
Referenced.h
agx::ref_ptr
Smart pointer for handling referenced counted objects.
Definition:
ref_ptr.h:29
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:52
CALLABLE
#define CALLABLE
Definition:
Object.h:76
agx.h
agx::Vec3T< Real >
agx::ContactForceReader
Class for reading contact forces between rigid bodies and geometries.
Definition:
ContactForceReader.h:33
Simulation.h
agxSDK::Simulation
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition:
Simulation.h:121
type
GLenum type
Definition:
gl.h:5539
include
agx
ContactForceReader.h
Generated on Mon Mar 21 2022 11:52:58 for AGXDynamics by
1.8.5