AGX Dynamics  2.37.2.0
FrictionModelFilter.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 <agxSDK/ExecuteFilter.h>
20 
21 #include <agx/FrictionModel.h>
22 
23 namespace agxSDK
24 {
31  {
32  public:
38  FrictionModelFilter( const agx::FrictionModel* frictionModel );
39 
40  public:
41  virtual bool match( const agxCollide::GeometryContact& gc ) const override;
42 
44 
45  protected:
46  virtual ~FrictionModelFilter();
47 
48  private:
49  agx::FrictionModelConstObserver m_frictionModel;
50  };
51 
53  {
54  const auto cm = gc.getMaterial( true );
55  return cm != nullptr &&
56  m_frictionModel != nullptr &&
57  cm->getFrictionModel() == m_frictionModel;
58  }
59 }
FrictionModel * getFrictionModel() const
Definition: Material.h:1117
Base class for all friction models with interface and some utility/necessary methods implemented...
Definition: FrictionModel.h:50
Abstract base class that implements a filter that selects which events should trigger a Listener...
Definition: ExecuteFilter.h:33
A contact between two geometries.
Definition: Contacts.h:270
#define AGXPHYSICS_EXPORT
virtual bool match(const agxCollide::GeometryContact &gc) const override
Called when narrow phase tests have determined overlap (when we have detailed intersection between th...
Execute filter matching friction model instance of the geometry contact.
virtual bool match(const agxCollide::GeometryContact &gc) const
Called when narrow phase tests have determined overlap (when we have detailed intersection between th...
agx::ContactMaterial * getMaterial()
If the contact material for this geometry contact is explicit it can be accessed here.
Definition: Contacts.h:758
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30