AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
SpaceListener.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. 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
19
20namespace agxCollide
21{
22 class Shape;
23 class Space;
24 class Geometry;
25
30 {
31 public:
32
35
40 virtual void addNotification(agxCollide::Space* space);
41
47
60
68
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}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
Definition: Geometry.h:92
Base class for a shape.
Definition: Shape.h:58
Class for listening for add/remove geometry events for an associated Space.
Definition: SpaceListener.h:30
virtual void removeGeometryNotification(agxCollide::Space *space, agxCollide::Geometry *geometry)
Called whenever a Geometry is removed from the associated Space.
virtual void removeNotification(agxCollide::Space *space)
Called when this SpaceListener is removed from a space.
virtual void addShapeNotification(agxCollide::Space *space, agxCollide::Geometry *geometry, agxCollide::Shape *shape)
Called whenever a Shape is added to a Geometry, where the geometry belongs to a Space.
virtual void addNotification(agxCollide::Space *space)
Called when this SpaceListener is added to a space.
SpaceListener()
Default constructor.
virtual void removeShapeNotification(agxCollide::Space *space, agxCollide::Geometry *geometry, agxCollide::Shape *shape)
Called whenever a Shape is removed from a Geometry, where the geometry belongs to a Space.
virtual void addGeometryNotification(agxCollide::Space *space, agxCollide::Geometry *geometry)
Called whenever a Geometry is added to the associated Space.
virtual ~SpaceListener()
Destructor.
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Definition: Space.h:86
Templated callback with two arguments.
Definition: Callback.h:140
Templated callback with three arguments.
Definition: Callback.h:182
An event with two arguments.
Definition: Event.h:122
An event with three arguments.
Definition: Event.h:141
Base class providing referencing counted objects.
Definition: Referenced.h:120
This namespace consists of a set of classes for handling geometric intersection tests including boole...