AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
GenericConstraint.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
21
22namespace agx
23{
58 {
59 public:
67
76
85
86 public:
90 virtual void onAddNotification() override;
91
95 virtual void onRemoveNotification() override;
96
103 virtual agx::Bool onPreSolve() override;
104
108 virtual void onPostSolve() override;
109
116
117 public:
118 int getNumDOF() const override;
119 void render( class agxRender::RenderManager* manager, float scale ) const override;
120
121 protected:
122 virtual ~GenericConstraint() = default;
123 };
124}
#define AGXPHYSICS_EXPORT
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
The object defining a frame of reference and providing transformations operations.
Definition: agx/Frame.h:68
Compliance matrix data containing the lower triangle (including the diagonal) of the compliance matri...
Generic constraint which by default is empty of elementary constraints.
virtual void onAddNotification() override
Callback when the constraint has been added to a simulation.
virtual agx::Bool onPreSolve() override
Callback before this constraint reaches the solver (actually preSystemCallback).
void render(class agxRender::RenderManager *manager, float scale) const override
Inherited method of how to render this constraint into DebugRenderer.
GenericConstraint(agx::RigidBody *rb1)
Construct given one rigid body (second is null).
virtual void onRemoveNotification() override
Callback when the constraint has been removed from a simulation.
int getNumDOF() const override
virtual void updateComplianceMatrix(GenericConstraintComplianceMatrix *matrix) override
Callback to write data.
virtual ~GenericConstraint()=default
GenericConstraint(agx::RigidBody *rb1, agx::Frame *f1, agx::RigidBody *rb2, agx::Frame *f2)
Construct given two bodies and frames.
GenericConstraint(agx::RigidBody *rb1, agx::RigidBody *rb2)
Construct given two rigid bodies (first has to be != null).
virtual void onPostSolve() override
Callback from after the solve and the solutions been pushed to the elementary constraints.
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:49
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition: Integer.h:40