AGX Dynamics  2.37.3.2
SolveIslandSplitAlgorithm.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 #ifndef AGX_SOLVEISLANDSPLITALGORITHM_H
18 #define AGX_SOLVEISLANDSPLITALGORITHM_H
19 
20 #include <agx/agx.h>
21 #include <agx/Referenced.h>
22 #include <agxCollide/Geometry.h>
23 #include <agx/RigidBody.h>
24 
25 namespace agx
26 {
27  namespace Physics
28  {
29  class GraphNodeData;
30  }
31 }
32 
33 namespace agx
34 {
35 
37  {
38  public:
39 
40  virtual void setChoosenToSplit(bool splittable) = 0;
41 
42  agx::Index getIslandIndex() const;
43  agx::Index getBodyIndex() const;
44  size_t getWeight() const;
45  void setWeight( size_t weight );
46  void setIslandIndex( agx::Index );
47  bool isSplittable() const;
48  agx::Vec3 getOldAcceleration() const;
49  void setOldAcceleration( agx::Vec3 oldAcc );
50  agx::RigidBody* getRigidBody(const agx::Physics::GraphNodeData* graphNode) const;
51  agxCollide::Geometry* getFirstGeometry(const agx::Physics::GraphNodeData* graphNode) const;
52  protected:
53  virtual ~SplitNode() {}
54 
55  protected:
56  size_t m_weight;
61  };
62 
63 
67 
69  {
70  public:
71  SplitNodeSeparator( size_t weight, agx::Index index );
72  virtual void setChoosenToSplit(bool splittable);
73  protected:
74  virtual ~SplitNodeSeparator();
75  };
77 
78 
83  {
84  public:
85 
86  virtual void collectSplitInformation(agx::Physics::GraphNodeData* graphNode) = 0;
87 
88  SplitNodeRefVector& getSplitInfo();
89 
90  virtual bool getUseHighFidelitySplitting() const;
91 
92  virtual void setUseHighFidelitySplitting( bool highFidelity );
93 
94  virtual void clearSplitState() = 0;
95 
96  virtual void postSolveCleanup() = 0;
97 
98  void clear();
99 
100  protected:
102 
103  protected:
107  void addSplitNode(SplitNode* splitNode);
108  void addSplitSeparatorNode( agx::Physics::GraphNodeData* graphNode, SplitNode* splitNode );
109 
110  SplitNodeRefVector m_splitInfo;
116  };
117 
119 
120 } // namespace agx
121 
122 
123 #endif
agx::ref_ptr< SolveIslandSplitAlgorithm > SolveIslandSplitAlgorithmRef
size_t m_splitInfectedDistance
How many split nodes surrounding the split node in both directions can NOT be split next time step...
AGXTERRAIN_EXPORT void clear()
agx::ref_ptr< SplitNode > SplitNodeRef
#define AGXPHYSICS_EXPORT
Base class providing referencing counted objects.
Definition: Referenced.h:119
The geometry representation used by the collision detection engine.
Definition: Geometry.h:92
The rigid body class, combining a geometric model and a frame of reference.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
agx::ref_ptr< SplitNodeSeparator > SplitNodeSeparatorRef
UInt32 Index
Definition: Integer.h:52
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:54
agx::Vector< SplitNodeRef > SplitNodeRefVector
SplitNodeRefVector::iterator SplitNodeIterator