AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
ReconfigureRequest.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
19#include <utility>
20
21#include <agxModel/export.h>
22#include <agx/AffineMatrix4x4.h>
23#include <agx/ref_ptr.h>
24#include <agx/stdint.h>
25#include <agx/Vector.h>
26
27#include <agxSDK/Collection.h>
28
29
30namespace agx
31{
32 class RigidBody;
33 class Constraint;
34}
35
36namespace agxSDK {
37 class Simulation;
38}
39
40namespace agxModel
41{
42
47
50
53
54 // Angle index, 0 in most cases.
56
58 constraint(_c), position(_p), index(_i)
59 {}
60 };
61
62
64
65 using BodyTransform = std::pair<agx::RigidBody*, agx::AffineMatrix4x4>;
67
68
69
96
97 public:
98
100
102
103
137 bool computeTransforms(const agxSDK::Collection* collection,
138 const agx::RigidBody* referenceBody,
139 const agxModel::ConstraintPositionVector& positions,
141 agx::Real* maxViolation = nullptr,
142 bool includeGeometry = false,
143 size_t additionalSteps = 0);
144
145
146
164 const agxModel::ConstraintPositionVector& positions,
166 bool zeroVelocities = true);
167
168
173
174 private:
176
178 agx::ConstraintRefVector m_constraints;
179
180 agx::UInt64 m_state;
181 agx::String m_lastErrorMessage;
182
183 };
184
185}
186
#define AGXMODEL_EXPORT
This class can be used to compute transforms for a collection of constrained bodies given a set of po...
bool computeTransforms(const agxSDK::Collection *collection, const agx::RigidBody *referenceBody, const agxModel::ConstraintPositionVector &positions, agxModel::BodyTransformVector &results, agx::Real *maxViolation=nullptr, bool includeGeometry=false, size_t additionalSteps=0)
Compute new transforms for items in the input collection.
void applyTransforms(agxSDK::Collection *collection, const agxModel::ConstraintPositionVector &positions, agxModel::BodyTransformVector &transforms, bool zeroVelocities=true)
This method applies the results from computeTransforms by updating body transforms.
agx::String getErrorMessage() const
A Collection is a collection of basic simulation objects, such as rigid bodies, constraints,...
Definition: Collection.h:35
The base class for a constraint.
Definition: Constraint.h:89
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:49
Templated vector class.
Definition: agx/Vector.h:53
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:30
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: Space.h:63
std::pair< agx::RigidBody *, agx::AffineMatrix4x4 > BodyTransform
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.
uint64_t UInt64
Definition: Integer.h:33
double Real
Definition: Real.h:41
uint8_t UInt8
Definition: Integer.h:30
Struct that specifies a position for a constraint angle.
agx::Constraint * constraint
Constraint.
ConstraintPosition(agx::Constraint *_c, agx::Real _p, agx::UInt8 _i=0)
agx::Real position
Constraint angle position.