AGX Dynamics  2.37.3.2
SpaceListener.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 
20 namespace agxCollide
21 {
22  class Shape;
23  class Space;
24  class Geometry;
25 
30  {
31  public:
32 
34  SpaceListener();
35 
40  virtual void addNotification(agxCollide::Space* space);
41 
46  virtual void removeNotification(agxCollide::Space* space);
47 
53  virtual void addGeometryNotification(agxCollide::Space* space, agxCollide::Geometry* geometry);
59  virtual void removeGeometryNotification(agxCollide::Space* space, agxCollide::Geometry* geometry);
60 
67  virtual void addShapeNotification(agxCollide::Space* space, agxCollide::Geometry* geometry, agxCollide::Shape* shape);
68 
75  virtual void removeShapeNotification(agxCollide::Space* space, agxCollide::Geometry* geometry, agxCollide::Shape* shape);
76 
77  protected:
78 
80  virtual ~SpaceListener();
81 
82  private:
83  friend class Space;
84 
87 
88 
89 
90  GeometryEvent::CallbackType m_addGeometryCallback;
91  GeometryEvent::CallbackType m_removeGeometryCallback;
92  ShapeEvent::CallbackType m_addShapeCallback;
93  ShapeEvent::CallbackType m_removeShapeCallback;
94  };
95 
97 
98 }
Class for listening for add/remove geometry events for an associated Space.
Definition: SpaceListener.h:29
Base class for a shape.
Definition: Shape.h:53
This namespace consists of a set of classes for handling geometric intersection tests including boole...
#define AGXPHYSICS_EXPORT
Base class providing referencing counted objects.
Definition: Referenced.h:119
The geometry representation used by the collision detection engine.
Definition: Geometry.h:92
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Definition: Space.h:81
Templated callback with three arguments.
Definition: Callback.h:181
Templated callback with two arguments.
Definition: Callback.h:139
An event with two arguments.
Definition: Event.h:121
An event with three arguments.
Definition: Event.h:140
AGX_DECLARE_POINTER_TYPES(SpaceListener)