AGX Dynamics  2.35.0.1
BeamContactHandler.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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 <agxModel/export.h>
20 
23 
24 #include <agx/BitState.h>
25 
26 namespace agxModel
27 {
37  {
38  public:
43 
53  void setDotThreshold( agx::Real dotThreshold );
54 
60 
66 
71 
72  public:
74 
76 
77  protected:
78  virtual ~BeamContactHandler();
79 
80  virtual void onAddNotification( agxSDK::Simulation* simulation ) override;
81  virtual void onRemoveNotification( agxSDK::Simulation* simulation ) override;
82  virtual void onPreStep() override;
83 
84  using agxSDK::LinkedStructureComponent::onAddNotification;
85  using agxSDK::LinkedStructureComponent::onRemoveNotification;
86 
88 
89  private:
90  enum StateEnum : agx::UInt32
91  {
92  DEBUG_RENDER = 1 << 0,
93  };
94  using State = agx::BitState<StateEnum, agx::UInt32>;
95 
96  private:
98  agx::Real m_dotThreshold;
99  State m_state;
100  };
101 }
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXMODEL_EXPORT
Beam component manipulating contacts with the beam, preventing contact normals from being along the b...
BeamContactHandler()
Default constructor using dot threshold: 0.05.
void setDotThreshold(agx::Real dotThreshold)
Set projection threshold of a contact normal along the beam which triggers the algorithm that modifie...
void setEnableDebugRendering(agx::Bool enable)
Enable/disable debug rendering of contact points handled by this component.
agx::Real getDotThreshold() const
agx::Bool getEnableDebugRendering() const
Base implementation of a component (e.g., specific functionality) in linked structures.
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: FlowUnit.h:37
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint32_t UInt32
Definition: Integer.h:40
bool Bool
Definition: Integer.h:48
double Real
Definition: Real.h:42