AGX Dynamics  2.37.3.2
WireSandbox.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 #include <agxWire/Wire.h>
20 
21 
23 
24 namespace agxWire
25 {
27  class AGXPHYSICS_EXPORT WireSandbox : public agxWire::Wire
28  {
29  public:
30  enum Mode
31  {
32  WIRE_WIRE = (1<<0),
33  NEW_CONTACT_HANDLING = (1<<1),
34  DEFAULT_MODE = WIRE_WIRE | NEW_CONTACT_HANDLING
35  };
36 
37  WireSandbox( agx::Real radius, agx::Real resolutionPerUnitLength, Mode mode = DEFAULT_MODE );
38 
43  virtual Wire* clone();
44 
45  protected:
46  virtual ~WireSandbox();
47 
48  virtual void addNotification();
49  virtual void removeNotification();
50 
51  virtual void preCollide( const agx::TimeStamp& );
52  virtual void pre( const agx::TimeStamp& );
53 
54  private:
58 
59  protected:
60  Mode m_mode;
61  };
62 
63  typedef agx::ref_ptr< WireSandbox > WireSandboxRef;
64 
65 }
66 
#define AGXPHYSICS_EXPORT
agx::Real TimeStamp
Definition: TimeStamp.h:26
Interface and placeholder of controllers/helpers for wires.
Definition: Wire.h:61
virtual void pre(const agx::TimeStamp &t) override
Run stability update.
Implements a Wire model with adaptive resolution.
Definition: MergedBody.h:39
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
virtual void removeNotification() override
Called when this wire is removed from the simulation.
virtual void addNotification() override
Called when this wire is added to a simulation, if this wire hasn&#39;t been initialized before this call...
virtual agxWire::Wire * clone(agxWire::Wire *newWire=nullptr)
Clone this wire object and return an empty, uninitialized wire.
double Real
Definition: Real.h:42
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
virtual void preCollide(const agx::TimeStamp &) override
Update geometries.
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97