AGX Dynamics  2.35.0.1
SolveIslandSplitAlgorithm.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 #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 
44  size_t getWeight() const;
45  void setWeight( size_t weight );
47  bool isSplittable() 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:
75  };
77 
78 
83  {
84  public:
85 
86  virtual void collectSplitInformation(agx::Physics::GraphNodeData* graphNode) = 0;
87 
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 
116  };
117 
119 
120 } // namespace agx
121 
122 
123 #endif
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
Definition: Geometry.h:93
Base class providing referencing counted objects.
Definition: Referenced.h:114
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:55
The rigid body class, combining a geometric model and a frame of reference.
SplitNodeRefVector & getSplitInfo()
virtual void collectSplitInformation(agx::Physics::GraphNodeData *graphNode)=0
virtual bool getUseHighFidelitySplitting() const
size_t m_splitInfectedDistance
How many split nodes surrounding the split node in both directions can NOT be split next time step.
virtual void setUseHighFidelitySplitting(bool highFidelity)
virtual void postSolveCleanup()=0
void addSplitSeparatorNode(agx::Physics::GraphNodeData *graphNode, SplitNode *splitNode)
void addSplitNode(SplitNode *splitNode)
First and last node must be a no-split-node, and every other node must be a splittable node.
virtual void clearSplitState()=0
SplitNodeSeparator(size_t weight, agx::Index index)
virtual void setChoosenToSplit(bool splittable)
bool isSplittable() const
agx::Index getBodyIndex() const
void setWeight(size_t weight)
agx::Vec3 getOldAcceleration() const
agxCollide::Geometry * getFirstGeometry(const agx::Physics::GraphNodeData *graphNode) const
agx::RigidBody * getRigidBody(const agx::Physics::GraphNodeData *graphNode) const
size_t getWeight() const
void setIslandIndex(agx::Index)
void setOldAcceleration(agx::Vec3 oldAcc)
virtual void setChoosenToSplit(bool splittable)=0
agx::Index getIslandIndex() const
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:30
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
agx::ref_ptr< SplitNodeSeparator > SplitNodeSeparatorRef
SplitNodeRefVector::iterator SplitNodeIterator
agx::ref_ptr< SplitNode > SplitNodeRef
agx::ref_ptr< SolveIslandSplitAlgorithm > SolveIslandSplitAlgorithmRef
agx::Vector< SplitNodeRef > SplitNodeRefVector
UInt32 Index
Definition: Integer.h:52