Free Electron
DodgeOp.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 __grass_DodgeOp_h__
8 #define __grass_DodgeOp_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Operator to move curves away from a collider
17 
18  @ingroup grass
19 *//***************************************************************************/
20 class FE_DL_EXPORT DodgeOp:
21  public OperatorThreaded,
22  public Initialize<DodgeOp>,
23  public ObjectSafe<DodgeOp>
24 {
25  public:
26 
27  DodgeOp(void):
28  m_frame(-1) {}
29 
30 virtual ~DodgeOp(void) {}
31 
32  void initialize(void);
33 
34  //* As HandlerI
35 virtual void handle(Record& a_rSignal);
36 
37  using OperatorThreaded::run;
38 
39 virtual void run(I32 a_id,sp<SpannedRange> a_spRange);
40 
41  private:
42  sp<SurfaceI::ImpactI> hitCheck(SpatialVector a_origin,
43  SpatialVector a_direction,
44  Real a_distance,Real a_radius,
45  BWORD a_anyHit,sp<DrawI> a_spDebug,
46  BWORD a_guard,
47  sp<SurfaceI::ImpactI> a_spLastImpact);
48 
49  sp<SurfaceAccessibleI> m_spInputAccessible;
50  sp<SurfaceI> m_spCollider;
51  sp<SurfaceI> m_spSkin;
52  sp<DrawMode> m_spDebugGroup;
53  sp<DrawI> m_spDrawDebug;
54 
55  I32 m_frame;
56  Real m_repulsionScale;
57 
58  Array<U32> m_passLimitCount;
59  Array<SpatialVector> m_pointCache;
60  Array<SpatialVector> m_lastCache;
61  Array<I32> m_changedCache;
62  I32 m_currentHistory;
63 
64  sp<Profiler> m_spProfiler;
65  sp<Profiler::Profile> m_spProfileAccess;
66  sp<Profiler::Profile> m_spProfilePrepare;
67  sp<Profiler::Profile> m_spProfileCache;
68  sp<Profiler::Profile> m_spProfileRun;
69  sp<Profiler::Profile> m_spProfileFlush;
70  sp<Profiler::Profile> m_spProfileNearest;
71  sp<Profiler::Profile> m_spProfileRepulsion;
72  sp<Profiler::Profile> m_spProfileFirstRay;
73  sp<Profiler::Profile> m_spProfileStepRay;
74  sp<Profiler::Profile> m_spProfileSubRay;
75  sp<Profiler::Profile> m_spProfileLength;
76  sp<Profiler::Profile> m_spProfileLead;
77  sp<Profiler::Profile> m_spProfileProjection;
78 };
79 
80 } /* namespace ext */
81 } /* namespace fe */
82 
83 #endif /* __grass_DodgeOp_h__ */
84 
Object level locking for thread safety.
Definition: Safe.h:216
Handler to move curves away from a collider.
Definition: OperatorThreaded.h:20
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Operator to move curves away from a collider.
Definition: DodgeOp.h:20
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53