AGX Dynamics  2.35.0.1
GeometryContactConstraint.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 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 
20 
21 #include <agx/Constraint.h>
22 
23 namespace agxCollide
24 {
25  class GeometryContact;
26 }
27 
28 namespace agxSDK
29 {
30  class ExecuteFilter;
31 }
32 
33 namespace agx
34 {
35  class ElementaryContactPointFactory;
36 
38 
51  {
52  public:
62  ElementaryContactPointFactory* elementaryFactory );
63 
68 
75  Bool match( agxCollide::GeometryContact* geometryContact ) const;
76 
83  void add( agxCollide::GeometryContact* geometryContact );
84 
85  public:
90  virtual void addNotification() override;
91 
96  virtual void removeNotification() override;
97 
101  virtual void post( const TimeStamp& ) override;
102 
103  protected:
108 
109  private:
110  ConstraintRef m_constraints;
111  };
112 }
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#define AGXPHYSICS_EXPORT
A contact between two geometries.
Definition: Contacts.h:270
Abstract base class that implements a filter that selects which events should trigger a Listener.
Definition: ExecuteFilter.h:35
Derive from this class to implement a listener for simulation step events.
Interface factory for custom contact point constraint implementations.
Class matching geometry contacts given an execute filter and is solving each matching contact point w...
void add(agxCollide::GeometryContact *geometryContact)
Add geometry contact to be solved using this constraint.
virtual ~GeometryContactConstraint()
Reference counted object, protected destructor.
virtual void post(const TimeStamp &) override
Clearing constraint data and debug rendering (if enabled).
GeometryContactConstraint(agxSDK::ExecuteFilter *contactFilter, ElementaryContactPointFactory *elementaryFactory)
Construct given execute filter matching IMPACT | CONTACT geometry contacts and elementary constraint ...
ElementaryContactPointFactory * getElementaryFactory() const
virtual void addNotification() override
Adding the constraint (agx::Constraint) to the simulation this instance has been added to.
virtual void removeNotification() override
Removing the constraint (agx::Constraint) from the simulation this instance has been removed from.
Bool match(agxCollide::GeometryContact *geometryContact) const
Match if the given geometry contact should be solved using this constraint.
This namespace consists of a set of classes for handling geometric intersection tests including boole...
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition: Integer.h:48
agx::Real TimeStamp
Definition: TimeStamp.h:26