AGX Dynamics  2.35.0.1
StrongInteractionConstraint.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_STRONGINTERACTIONCONSTRAINT_H
18 #define AGX_STRONGINTERACTIONCONSTRAINT_H
19 
20 #include <agx/StrongInteraction.h>
21 #include <agx/Constraint.h>
22 #include <agx/agx_valarray_types.h>
23 
24 namespace agx
25 {
27 
32  {
33  public:
39 
40  public:
44  virtual agx::RigidBody* getRigidBody1() const override;
45 
49  virtual agx::RigidBody* getRigidBody2() const override;
50 
52 
53  protected:
58 
63 
67  virtual void render( agxRender::RenderManager* mgr, float scale ) override;
68 
72  virtual void prepare() override;
73 
77  virtual void writeMatrixData( agx::StrongInteraction::MatrixData rb1DiagonalBlock,
78  agx::StrongInteraction::MatrixData rb2DiagonalBlock,
79  agx::StrongInteraction::MatrixData offDiagonalBlock ) override;
80 
85  agx::Real* rb1Rhs,
87  agx::Real* rb2Rhs,
88  agx::Bool isRestingSolve ) override;
89 
90  protected:
93  };
94 }
95 
96 #endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#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 AGXPHYSICS_EXPORT
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
The base class for a constraint.
Definition: Constraint.h:89
Pointer to a entity instance of type Physics.RigidBody.
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:55
StrongInteractionConstraint()
Default constructor used by serialization.
virtual agx::RigidBody * getRigidBody1() const override
virtual void writeMatrixData(agx::StrongInteraction::MatrixData rb1DiagonalBlock, agx::StrongInteraction::MatrixData rb2DiagonalBlock, agx::StrongInteraction::MatrixData offDiagonalBlock) override
Write data for dynamic bodies.
virtual void prepare() override
Prepares for solve.
virtual ~StrongInteractionConstraint()
Reference counted object, protected destructor.
virtual agx::RigidBody * getRigidBody2() const override
StrongInteractionConstraint(agx::Constraint *constraint)
Construct given constraint.
virtual void writeRhs(agx::Physics::RigidBodyPtr rb1, agx::Real *rb1Rhs, agx::Physics::RigidBodyPtr rb2, agx::Real *rb2Rhs, agx::Bool isRestingSolve) override
Write data to the right hand side, for dynamic bodies.
virtual void render(agxRender::RenderManager *mgr, float scale) override
Render the interaction.
Base class for a strong interaction concept where there interaction is defined in the mass matrix par...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition: Integer.h:48
double Real
Definition: Real.h:42
std::valarray< agx::Real > RealValarray
For this module, vectors are defined using valarray.