AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
WireParallelCallbacksHandler.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. 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#include <agx/Referenced.h>
20#include <agx/Task.h>
21
23
24namespace agxSDK
25{
26 class Simulation;
27}
28
29namespace agxWire
30{
31 class Wire;
32
36 class AGXPHYSICS_EXPORT WireParallelCallbacksHandler : public agx::Referenced
37 {
38 public:
42 enum CallbackTypes
43 {
44 PRE_COLLIDE,
45 PRE,
46 POST,
47 COLLIDE,
48 COLLECT_SPLIT_INFO,
49 NUM_CALLBACKS
50 };
51
52 public:
56 WireParallelCallbacksHandler( agxSDK::Simulation* simulation );
57
61 virtual void reset( agxSDK::Simulation* simulation );
62
66 virtual void execute( agxWire::WireParallelCallbacksHandler::CallbackTypes type, agxSDK::Simulation* simulation );
67
73 void setExecuteSerial( agx::Bool executeSerial );
74
79 agx::Bool getExecuteSerial() const;
81
82 public:
83 typedef agx::Vector< agx::ref_ptr< agxWire::Wire > > WireContainer;
84
85 protected:
86 virtual ~WireParallelCallbacksHandler() {}
87
91 virtual void executeParallel( agxWire::WireParallelCallbacksHandler::CallbackTypes type, agxSDK::Simulation* simulation );
92
96 virtual void executeSerial( agxWire::WireParallelCallbacksHandler::CallbackTypes type, agxSDK::Simulation* simulation );
97
101 virtual void handleSimplified( agxWire::WireParallelCallbacksHandler::CallbackTypes type, agxSDK::Simulation* simulation );
102
106 virtual void handleLinks( agxWire::WireParallelCallbacksHandler::CallbackTypes type, agxSDK::Simulation* simulation );
107
111 WireContainer prepareAndCollectWires( WireParallelCallbacksHandler::CallbackTypes type, agxSDK::Simulation* simulation );
112
113 protected:
114 agxData::BufferRef m_wireDataBuffer;
115 agx::TaskRef m_executeCallback[ NUM_CALLBACKS ];
116 agx::Bool m_executeSerial;
117 };
118
119 typedef agx::ref_ptr< WireParallelCallbacksHandler > WireParallelCallbacksHandlerRef;
120
121 class AGXPHYSICS_EXPORT WireParallelCallbacksHandlerFactory : public agx::Referenced
122 {
123 public:
124 WireParallelCallbacksHandlerFactory();
125 virtual agxWire::WireParallelCallbacksHandler* create( agxSDK::Simulation* simulation ) const;
126
127 protected:
128 virtual ~WireParallelCallbacksHandlerFactory() {}
129 };
130
131 typedef agx::ref_ptr< WireParallelCallbacksHandlerFactory > WireParallelCallbacksHandlerFactoryRef;
132}
133
#define AGXPHYSICS_EXPORT
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition Simulation.h:126
Base class providing referencing counted objects.
Definition Referenced.h:120
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition macros.h:96
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition Constraint.h:31
Implements a Wire model with adaptive resolution.
Definition MergedBody.h:40
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition Integer.h:40