AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
ContactForceFilter.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
9having been advised so by Algoryx Simulation AB for a time limited evaluation,
10or having purchased a valid 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#include <agx/RigidBody.h>
21
23
24#include <agxUtil/agxUtil.h>
25#include <agxUtil/Statistic.h>
26
28
29namespace agx
30{
37 {
38 public:
41
44
47
50
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:
60
61 private:
66
67 private:
70
71 agx::Real m_impactForce;
72
75
76 // Set to true if we had at least one contact during the last update.
77 bool m_hadContact;
78 };
79}
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
Definition Geometry.h:92
Derive from this class to implement a listener for simulation step events.
Exponential moving average statistic.
Definition Statistic.h:94
Median statistic that keeps a history of a number of observations and reports the median,...
Definition Statistic.h:181
A ContactForceFilter provide resting contact forces as seen through either an exponential moving aver...
ContactForceFilter(agx::RigidBody &body1, agx::RigidBody &body2)
agx::Real getRestingMedian() const
ContactForceFilter()
This constructor will be removed. Used only while experimenting.
ContactForceFilter(agx::RigidBody &body, agxCollide::Geometry &geometry)
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::Real getImpact() const
virtual void preCollide(const agx::TimeStamp &time) override
Called before collision detection is performed in the simulation Implement this method in the derived...
agx::Real getRestingAverage() const
The rigid body class, combining a geometric model and a frame of reference.
Definition RigidBody.h:52
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
double Real
Definition Real.h:42
agx::Real TimeStamp
Definition TimeStamp.h:26