AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
FrictionModelFilter.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 having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid 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
21#include <agx/FrictionModel.h>
22
23namespace 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:
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}
#define AGXPHYSICS_EXPORT
A contact between two geometries.
Definition Contacts.h:271
agx::ContactMaterial * getMaterial()
If the contact material for this geometry contact is explicit it can be accessed here.
Definition Contacts.h:758
Abstract base class that implements a filter that selects which events should trigger a Listener.
virtual bool match(const agxCollide::GeometryContact &gc) const
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 override
Called when narrow phase tests have determined overlap (when we have detailed intersection between th...
FrictionModelFilter(const agx::FrictionModel *frictionModel)
Construct given friction model instance.
Base class for all friction models with interface and some utility/necessary methods implemented.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition Constraint.h:31