AGX Dynamics
2.35.0.1
ContactForceFilter.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
9
having been advised so by Algoryx Simulation AB for a time limited evaluation,
10
or having purchased a 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/agx_vector_types.h
>
20
#include <
agx/RigidBody.h
>
21
22
#include <
agxSDK/StepEventListener.h
>
23
24
#include <
agxUtil/agxUtil.h
>
25
#include <
agxUtil/Statistic.h
>
26
27
#include <
agx/ContactForceFilterParticipant.h
>
28
29
namespace
agx
30
{
36
class
AGXPHYSICS_EXPORT
ContactForceFilter
:
public
agxSDK::StepEventListener
37
{
38
public
:
40
ContactForceFilter
();
41
42
ContactForceFilter
(
agx::RigidBody
& body1,
agx::RigidBody
& body2);
43
ContactForceFilter
(
agx::RigidBody
& body,
agxCollide::Geometry
& geometry);
44
46
agx::Real
getRestingMedian
()
const
;
47
49
agx::Real
getRestingAverage
()
const
;
50
52
agx::Real
getImpact
()
const
;
53
54
public
:
// Methods called by AGX.
55
virtual
void
preCollide
(
const
agx::TimeStamp
& time)
override
;
56
virtual
void
post
(
const
agx::TimeStamp
& time)
override
;
57
58
protected
:
59
~ContactForceFilter
() =
default
;
60
61
private
:
63
ContactForceFilter
(
64
agx::detail::ContactForceFilterParticipant
participant1,
65
agx::detail::ContactForceFilterParticipant
participant2);
66
67
private
:
68
agx::detail::ContactForceFilterParticipant
m_participant1;
69
agx::detail::ContactForceFilterParticipant
m_participant2;
70
71
agx::Real
m_impactForce;
72
73
agxUtil::MedianStatistic
m_median;
74
agxUtil::ExponentialMovingAverageStatistic
m_average;
75
76
// Set to true if we had at least one contact during the last update.
77
bool
m_hadContact;
78
};
79
}
ContactForceFilterParticipant.h
RigidBody.h
Statistic.h
StepEventListener.h
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agxUtil.h
agx_vector_types.h
agxCollide::Geometry
The geometry representation used by the collision detection engine.
Definition:
Geometry.h:93
agxSDK::StepEventListener
Derive from this class to implement a listener for simulation step events.
Definition:
StepEventListener.h:38
agxUtil::ExponentialMovingAverageStatistic
Exponential moving average statistic.
Definition:
Statistic.h:94
agxUtil::MedianStatistic
Median statistic that keeps a history of a number of observations and reports the median,...
Definition:
Statistic.h:181
agx::ContactForceFilter
A ContactForceFilter provide resting contact forces as seen through either an exponential moving aver...
Definition:
ContactForceFilter.h:37
agx::ContactForceFilter::ContactForceFilter
ContactForceFilter(agx::RigidBody &body1, agx::RigidBody &body2)
agx::ContactForceFilter::getRestingMedian
agx::Real getRestingMedian() const
agx::ContactForceFilter::~ContactForceFilter
~ContactForceFilter()=default
agx::ContactForceFilter::ContactForceFilter
ContactForceFilter()
This constructor will be removed. Used only while experimenting.
agx::ContactForceFilter::ContactForceFilter
ContactForceFilter(agx::RigidBody &body, agxCollide::Geometry &geometry)
agx::ContactForceFilter::post
virtual void post(const agx::TimeStamp &time) override
Called after a step is taken in the simulation Implement this method in the derived class to get call...
agx::ContactForceFilter::getImpact
agx::Real getImpact() const
agx::ContactForceFilter::preCollide
virtual void preCollide(const agx::TimeStamp &time) override
Called before collision detection is performed in the simulation Implement this method in the derived...
agx::ContactForceFilter::getRestingAverage
agx::Real getRestingAverage() const
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:55
agx::detail::ContactForceFilterParticipant
Definition:
ContactForceFilterParticipant.h:32
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:23
agx::Real
double Real
Definition:
Real.h:42
agx::TimeStamp
agx::Real TimeStamp
Definition:
TimeStamp.h:26
include
agx
ContactForceFilter.h
Generated on Fri Jan 20 2023 10:48:11 for AGX Dynamics by
1.9.1