Free Electron
Proximity.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __spatial_Proximity_h__
8 #define __spatial_Proximity_h__
9 
10 #include "signal/signal.h"
11 #include "datatool/datatool.h"
12 #include "math/math.h"
13 #include "shape/shape.h"
14 
15 namespace fe
16 {
17 namespace ext
18 {
19 
20 /** proximity detection interface */
21 class FE_DL_EXPORT ProxI : virtual public Component
22 {
23  public:
24 virtual unsigned int detect( sp<Layout> l_pair,
25  sp<RecordGroup> rg_in,
26  sp<RecordGroup> rg_out) = 0;
27 };
28 
29 /** Handler to detect collisions between bounded particles.
30  Particles in the input group are checked for collisions, and a pair
31  record (registered with setPair) is created for each collision and
32  added to the output group.
33 
34  @copydoc Proximity_info
35  */
36 class Proximity :
37  virtual public HandlerI,
38  virtual public Config,
39  public Initialize<Proximity>
40 {
41  public:
42  Proximity(void);
43 virtual ~Proximity(void);
44 
45  void initialize(void);
46 
47  // AS HandlerI
48 virtual void handleBind(sp<SignalerI> spSignaler,
49  sp<Layout> l_sig);
50 virtual void handle(Record &r_sig);
51 
52  private:
53  sp<Scope> m_spScope;
54 
55  sp<ProxI> m_spProx;
56 
57 };
58 
59 
60 } /* namespace ext */
61 } /* namespace fe */
62 
63 #endif /* __spatial_Proximity_h__ */
64 
Convienience base class for specification and use of path accessors.
Definition: Config.h:19
Handler to detect collisions between bounded particles.
Definition: Proximity.h:36
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
proximity detection interface
Definition: Proximity.h:21
Interface to handle signals from an SignalerI.
Definition: HandlerI.h:22
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Base for all interfacable components.
Definition: Component.h:20